Skip to content

Commit 87bb39e

Browse files
Fuad TabbaMarc Zyngier
authored andcommitted
KVM: arm64: Reintroduce __sve_save_state
Now that the hypervisor is handling the host sve state in protected mode, it needs to be able to save it. This reverts commit e66425f ("KVM: arm64: Remove unused __sve_save_state"). Reviewed-by: Oliver Upton <[email protected]> Signed-off-by: Fuad Tabba <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Zyngier <[email protected]>
1 parent 47eb2d6 commit 87bb39e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

arch/arm64/include/asm/kvm_hyp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ void __debug_restore_host_buffers_nvhe(struct kvm_vcpu *vcpu);
111111

112112
void __fpsimd_save_state(struct user_fpsimd_state *fp_regs);
113113
void __fpsimd_restore_state(struct user_fpsimd_state *fp_regs);
114+
void __sve_save_state(void *sve_pffr, u32 *fpsr);
114115
void __sve_restore_state(void *sve_pffr, u32 *fpsr);
115116

116117
u64 __guest_enter(struct kvm_vcpu *vcpu);

arch/arm64/kvm/hyp/fpsimd.S

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@ SYM_FUNC_START(__sve_restore_state)
2525
sve_load 0, x1, x2, 3
2626
ret
2727
SYM_FUNC_END(__sve_restore_state)
28+
29+
SYM_FUNC_START(__sve_save_state)
30+
mov x2, #1
31+
sve_save 0, x1, x2, 3
32+
ret
33+
SYM_FUNC_END(__sve_save_state)

0 commit comments

Comments
 (0)