ANDROID: KVM: arm64: Reintroduce __sve_save_state

Now that the hypervisor is handling the guest state in protected
mode, it needs to be able to save the guest state.

This reverts commit e66425fc9b ("KVM: arm64: Remove unused
__sve_save_state").

Suggested-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 233587962
Change-Id: Iada80e9355082e5576d016221fabc7d30ffde46b
This commit is contained in:
Fuad Tabba
2022-06-20 13:13:12 +00:00
committed by Will Deacon
parent ec5f16f968
commit d7d7605050
2 changed files with 7 additions and 0 deletions

View File

@@ -93,6 +93,7 @@ void __debug_restore_host_buffers_nvhe(struct kvm_vcpu *vcpu);
void __fpsimd_save_state(struct user_fpsimd_state *fp_regs);
void __fpsimd_restore_state(struct user_fpsimd_state *fp_regs);
void __sve_save_state(void *sve_pffr, u32 *fpsr);
void __sve_restore_state(void *sve_pffr, u32 *fpsr);
#ifndef __KVM_NVHE_HYPERVISOR__

View File

@@ -25,3 +25,9 @@ SYM_FUNC_START(__sve_restore_state)
sve_load 0, x1, x2, 3
ret
SYM_FUNC_END(__sve_restore_state)
SYM_FUNC_START(__sve_save_state)
mov x2, #1
sve_save 0, x1, x2, 3
ret
SYM_FUNC_END(__sve_save_state)