[PATCH] KVM: arm64: Pass on SVE mapping failures

Fuad Tabba tabba at google.com
Tue Nov 12 07:41:08 PST 2024


On Tue, 12 Nov 2024 at 10:56, James Clark <james.clark at linaro.org> wrote:
>
> This function can fail but its return value isn't passed onto the
> caller. Presumably this could result in a broken state.
>
> Fixes: 66d5b53e20a6 ("KVM: arm64: Allocate memory mapped at hyp for host sve state in pKVM")
> Signed-off-by: James Clark <james.clark at linaro.org>
> ---
>  arch/arm64/kvm/hyp/nvhe/setup.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/arm64/kvm/hyp/nvhe/setup.c b/arch/arm64/kvm/hyp/nvhe/setup.c
> index 8fec099c2775..cbdd18cd3f98 100644
> --- a/arch/arm64/kvm/hyp/nvhe/setup.c
> +++ b/arch/arm64/kvm/hyp/nvhe/setup.c
> @@ -146,8 +146,7 @@ static int recreate_hyp_mappings(phys_addr_t phys, unsigned long size,
>                         return ret;
>         }
>
> -       pkvm_create_host_sve_mappings();
> -       return 0;
> +       return pkvm_create_host_sve_mappings();
>  }

Reviewed-by: Fuad Tabba <tabba at google.com>

Thanks,
/fuad

>
>  static void update_nvhe_init_params(void)
> --
> 2.34.1
>



More information about the linux-arm-kernel mailing list