Skip to content

Commit d19c541

Browse files
Marc Zyngieroupton
authored andcommitted
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: 9aba641 ("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]>
1 parent 85acc29 commit d19c541

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kvm/emulate-nested.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2833,7 +2833,7 @@ int kvm_inject_nested_sea(struct kvm_vcpu *vcpu, bool iabt, u64 addr)
28332833
iabt ? ESR_ELx_EC_IABT_LOW : ESR_ELx_EC_DABT_LOW);
28342834
esr |= ESR_ELx_FSC_EXTABT | ESR_ELx_IL;
28352835

2836-
vcpu_write_sys_reg(vcpu, FAR_EL2, addr);
2836+
vcpu_write_sys_reg(vcpu, addr, FAR_EL2);
28372837

28382838
if (__vcpu_sys_reg(vcpu, SCTLR2_EL2) & SCTLR2_EL1_EASE)
28392839
return kvm_inject_nested(vcpu, esr, except_type_serror);

0 commit comments

Comments
 (0)