Skip to content

Commit 1f1c08d

Browse files
committed
KVM: arm64: nv: Enable vSErrors when HCRX_EL2.TMEA is set
Per R_CDCKC, vSErrors are enabled if HCRX_EL2.TMEA is set, regardless of HCR_EL2.AMO. Reviewed-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent 59b6d08 commit 1f1c08d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

arch/arm64/include/asm/kvm_emulate.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,11 @@ static inline bool is_nested_ctxt(struct kvm_vcpu *vcpu)
259259

260260
static inline bool vserror_state_is_nested(struct kvm_vcpu *vcpu)
261261
{
262-
return is_nested_ctxt(vcpu) && vcpu_el2_amo_is_set(vcpu);
262+
if (!is_nested_ctxt(vcpu))
263+
return false;
264+
265+
return vcpu_el2_amo_is_set(vcpu) ||
266+
(__vcpu_sys_reg(vcpu, HCRX_EL2) & HCRX_EL2_TMEA);
263267
}
264268

265269
/*

0 commit comments

Comments
 (0)