aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Zyngier <[email protected]>2025-08-13 16:37:47 +0000
committerOliver Upton <[email protected]>2025-08-15 18:51:18 +0000
commitd19c541d269eddd9702b687fd4ba587c7da497a2 (patch)
treed4d968afa5fcfca3fd7ae105e6364a16ed8b2bbf
parentKVM: arm64: selftest: Add standalone test checking for KVM's own UUID (diff)
downloadkernel-d19c541d269eddd9702b687fd4ba587c7da497a2.tar.gz
kernel-d19c541d269eddd9702b687fd4ba587c7da497a2.zip
KVM: arm64: Correctly populate FAR_EL2 on nested SEA injection
vcpu_write_sys_reg()'s signature is not totally obvious, and it is rather easy to write something that looks correct, except that... Oh wait... Swap addr and FAR_EL2 to restore some sanity in the nested SEA department. Fixes: 9aba641b9ec2a ("KVM: arm64: nv: Respect exception routing rules for SEAs") Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
-rw-r--r--arch/arm64/kvm/emulate-nested.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/emulate-nested.c b/arch/arm64/kvm/emulate-nested.c
index 90cb4b7ae0ff..af69c897c2c3 100644
--- a/arch/arm64/kvm/emulate-nested.c
+++ b/arch/arm64/kvm/emulate-nested.c
@@ -2833,7 +2833,7 @@ int kvm_inject_nested_sea(struct kvm_vcpu *vcpu, bool iabt, u64 addr)
iabt ? ESR_ELx_EC_IABT_LOW : ESR_ELx_EC_DABT_LOW);
esr |= ESR_ELx_FSC_EXTABT | ESR_ELx_IL;
- vcpu_write_sys_reg(vcpu, FAR_EL2, addr);
+ vcpu_write_sys_reg(vcpu, addr, FAR_EL2);
if (__vcpu_sys_reg(vcpu, SCTLR2_EL2) & SCTLR2_EL1_EASE)
return kvm_inject_nested(vcpu, esr, except_type_serror);