diff options
author | Marc Zyngier <maz@kernel.org> | 2024-03-01 20:42:31 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2024-04-12 15:58:59 +0300 |
commit | 5294afdbf45aced5295fe5941c58b40c41c23800 (patch) | |
tree | b4a85c3bf837fea6eb4ad2214dbf2b90045c5066 /arch/arm64/kvm/hyp/nvhe/switch.c | |
parent | 51e09b5572d665645ce394f94f24a7d6ec32bda9 (diff) | |
download | linux-5294afdbf45aced5295fe5941c58b40c41c23800.tar.xz |
KVM: arm64: Exclude FP ownership from kvm_vcpu_arch
In retrospect, it is fairly obvious that the FP state ownership
is only meaningful for a given CPU, and that locating this
information in the vcpu was just a mistake.
Move the ownership tracking into the host data structure, and
rename it from fp_state to fp_owner, which is a better description
(name suggested by Mark Brown).
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'arch/arm64/kvm/hyp/nvhe/switch.c')
-rw-r--r-- | arch/arm64/kvm/hyp/nvhe/switch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/hyp/nvhe/switch.c b/arch/arm64/kvm/hyp/nvhe/switch.c index 544a419b9a39..1f82d531a494 100644 --- a/arch/arm64/kvm/hyp/nvhe/switch.c +++ b/arch/arm64/kvm/hyp/nvhe/switch.c @@ -337,7 +337,7 @@ int __kvm_vcpu_run(struct kvm_vcpu *vcpu) __sysreg_restore_state_nvhe(host_ctxt); - if (vcpu->arch.fp_state == FP_STATE_GUEST_OWNED) + if (*host_data_ptr(fp_owner) == FP_STATE_GUEST_OWNED) __fpsimd_save_fpexc32(vcpu); __debug_switch_to_host(vcpu); |