[PATCH 01/10] KVM: arm64: Provide KVM's own save/restore SVE primitives

Quentin Perret qperret at google.com
Tue Mar 16 10:31:46 GMT 2021


On Tuesday 16 Mar 2021 at 10:13:03 (+0000), Marc Zyngier wrote:
> diff --git a/arch/arm64/kvm/hyp/fpsimd.S b/arch/arm64/kvm/hyp/fpsimd.S
> index 01f114aa47b0..e4010d1acb79 100644
> --- a/arch/arm64/kvm/hyp/fpsimd.S
> +++ b/arch/arm64/kvm/hyp/fpsimd.S
> @@ -19,3 +19,13 @@ SYM_FUNC_START(__fpsimd_restore_state)
>  	fpsimd_restore	x0, 1
>  	ret
>  SYM_FUNC_END(__fpsimd_restore_state)
> +
> +SYM_FUNC_START(__sve_restore_state)
> +	sve_load 0, x1, x2, 3, x4
> +	ret
> +SYM_FUNC_END(__sve_restore_state)

Nit: maybe this could be named __sve_load_state() for consistency with
the EL1 version?

> +SYM_FUNC_START(__sve_save_state)
> +	sve_save 0, x1, 2
> +	ret
> +SYM_FUNC_END(__sve_restore_state)

SYM_FUNC_END(__sve_save_state) here?

Thanks,
Quentin



More information about the linux-arm-kernel mailing list