KVM: arm64: Eagerly restore host fpsimd/sve state in pKVM
When running in protected mode we don't want to leak protected guest state to the host, including whether a guest has used fpsimd/sve. Therefore, eagerly restore the host state on guest exit when running in protected mode, which happens only if the guest has used fpsimd/sve. Reviewed-by:Oliver Upton <oliver.upton@linux.dev> Signed-off-by:
Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20240603122852.3923848-7-tabba@google.com Signed-off-by:
Marc Zyngier <maz@kernel.org>
Showing
- arch/arm64/kvm/hyp/include/hyp/switch.h 12 additions, 1 deletionarch/arm64/kvm/hyp/include/hyp/switch.h
- arch/arm64/kvm/hyp/nvhe/hyp-main.c 64 additions, 3 deletionsarch/arm64/kvm/hyp/nvhe/hyp-main.c
- arch/arm64/kvm/hyp/nvhe/pkvm.c 2 additions, 0 deletionsarch/arm64/kvm/hyp/nvhe/pkvm.c
- arch/arm64/kvm/hyp/nvhe/switch.c 15 additions, 1 deletionarch/arm64/kvm/hyp/nvhe/switch.c
Please register or sign in to comment