summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm/fpsimd.c
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2021-03-11 13:51:44 +0000
committerMarc Zyngier <maz@kernel.org>2021-03-18 11:23:48 +0000
commit83857371d4cbeff8551fa770e045be9c6b04715c (patch)
tree1931103dc17a4b853102b4cefc533e8053af8221 /arch/arm64/kvm/fpsimd.c
parent297b8603e356ad82c1345cc75fad4d89310a3c34 (diff)
downloadlinux-stable-83857371d4cbeff8551fa770e045be9c6b04715c.tar.gz
linux-stable-83857371d4cbeff8551fa770e045be9c6b04715c.tar.bz2
linux-stable-83857371d4cbeff8551fa770e045be9c6b04715c.zip
KVM: arm64: Use {read,write}_sysreg_el1 to access ZCR_EL1
Switch to the unified EL1 accessors for ZCR_EL1, which will make things easier for nVHE support. Acked-by: Will Deacon <will@kernel.org> Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'arch/arm64/kvm/fpsimd.c')
-rw-r--r--arch/arm64/kvm/fpsimd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm64/kvm/fpsimd.c b/arch/arm64/kvm/fpsimd.c
index 3e081d556e81..b7e36a506d3d 100644
--- a/arch/arm64/kvm/fpsimd.c
+++ b/arch/arm64/kvm/fpsimd.c
@@ -11,6 +11,7 @@
#include <linux/kvm_host.h>
#include <asm/fpsimd.h>
#include <asm/kvm_asm.h>
+#include <asm/kvm_hyp.h>
#include <asm/kvm_mmu.h>
#include <asm/sysreg.h>
@@ -112,7 +113,7 @@ void kvm_arch_vcpu_put_fp(struct kvm_vcpu *vcpu)
fpsimd_save_and_flush_cpu_state();
if (guest_has_sve)
- __vcpu_sys_reg(vcpu, ZCR_EL1) = read_sysreg_s(SYS_ZCR_EL12);
+ __vcpu_sys_reg(vcpu, ZCR_EL1) = read_sysreg_el1(SYS_ZCR);
} else if (host_has_sve) {
/*
* The FPSIMD/SVE state in the CPU has not been touched, and we