diff options
author | Marc Zyngier <maz@kernel.org> | 2024-08-20 15:17:58 +0200 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2024-08-27 08:59:27 +0200 |
commit | ef3be86021c3bdf384c36d9d4aa1ee9fe65b95af (patch) | |
tree | 8c138860a4c6038f873ef7e454e34ecc0dbdff34 /arch/arm64/include/asm/kvm_host.h | |
parent | KVM: arm64: Move FPMR into the sysreg array (diff) | |
download | linux-ef3be86021c3bdf384c36d9d4aa1ee9fe65b95af.tar.xz linux-ef3be86021c3bdf384c36d9d4aa1ee9fe65b95af.zip |
KVM: arm64: Add save/restore support for FPMR
Just like the rest of the FP/SIMD state, FPMR needs to be context
switched.
The only interesting thing here is that we need to treat the pKVM
part a bit differently, as the host FP state is never written back
to the vcpu thread, but instead stored locally and eagerly restored.
Reviewed-by: Mark Brown <broonie@kernel.org>
Tested-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20240820131802.3547589-5-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'arch/arm64/include/asm/kvm_host.h')
-rw-r--r-- | arch/arm64/include/asm/kvm_host.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index 021f7a1845f2..a6b684c08fe7 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -599,6 +599,16 @@ struct kvm_host_data { struct cpu_sve_state *sve_state; }; + union { + /* HYP VA pointer to the host storage for FPMR */ + u64 *fpmr_ptr; + /* + * Used by pKVM only, as it needs to provide storage + * for the host + */ + u64 fpmr; + }; + /* Ownership of the FP regs */ enum { FP_STATE_FREE, |