Skip to content

Commit 308472c

Browse files
author
Marc Zyngier
committed
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 <[email protected]>
1 parent 71071ac commit 308472c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

arch/arm64/kvm/fpsimd.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,10 @@ void kvm_arch_vcpu_put_fp(struct kvm_vcpu *vcpu)
109109
local_irq_save(flags);
110110

111111
if (vcpu->arch.flags & KVM_ARM64_FP_ENABLED) {
112-
u64 *guest_zcr = &vcpu->arch.ctxt.sys_regs[ZCR_EL1];
113-
114112
fpsimd_save_and_flush_cpu_state();
115113

116114
if (guest_has_sve)
117-
*guest_zcr = read_sysreg_s(SYS_ZCR_EL12);
115+
__vcpu_sys_reg(vcpu, ZCR_EL1) = read_sysreg_s(SYS_ZCR_EL12);
118116
} else if (host_has_sve) {
119117
/*
120118
* The FPSIMD/SVE state in the CPU has not been touched, and we

0 commit comments

Comments
 (0)