diff options
author | Marc Zyngier <maz@kernel.org> | 2019-07-04 17:25:09 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-07-07 09:28:37 +0100 |
commit | 308472c69213cea9b22a2156a19ea9ec06ea3bc1 (patch) | |
tree | 549eff9de3af468920a84cc6bd1060065ae70531 /arch/arm64/kvm | |
parent | 71071acfd392c51d9c0b286067033534b59f6be4 (diff) | |
download | lwn-308472c69213cea9b22a2156a19ea9ec06ea3bc1.tar.gz lwn-308472c69213cea9b22a2156a19ea9ec06ea3bc1.zip |
KVM: arm64: sve: Use __vcpu_sys_reg() instead of raw sys_regs access
Now that we have a wrapper for the sysreg accesses, let's use that
consistently.
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'arch/arm64/kvm')
-rw-r--r-- | arch/arm64/kvm/fpsimd.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm64/kvm/fpsimd.c b/arch/arm64/kvm/fpsimd.c index e329a36b2bee..e503caff14d1 100644 --- a/arch/arm64/kvm/fpsimd.c +++ b/arch/arm64/kvm/fpsimd.c @@ -109,12 +109,10 @@ void kvm_arch_vcpu_put_fp(struct kvm_vcpu *vcpu) local_irq_save(flags); if (vcpu->arch.flags & KVM_ARM64_FP_ENABLED) { - u64 *guest_zcr = &vcpu->arch.ctxt.sys_regs[ZCR_EL1]; - fpsimd_save_and_flush_cpu_state(); if (guest_has_sve) - *guest_zcr = read_sysreg_s(SYS_ZCR_EL12); + __vcpu_sys_reg(vcpu, ZCR_EL1) = read_sysreg_s(SYS_ZCR_EL12); } else if (host_has_sve) { /* * The FPSIMD/SVE state in the CPU has not been touched, and we |