Commit 1f1c08d9 authored by Oliver Upton's avatar Oliver Upton
Browse files

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: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20250708172532.1699409-21-oliver.upton@linux.dev


Signed-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
parent 59b6d086
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -259,7 +259,11 @@ static inline bool is_nested_ctxt(struct kvm_vcpu *vcpu)

static inline bool vserror_state_is_nested(struct kvm_vcpu *vcpu)
{
	return is_nested_ctxt(vcpu) && vcpu_el2_amo_is_set(vcpu);
	if (!is_nested_ctxt(vcpu))
		return false;

	return vcpu_el2_amo_is_set(vcpu) ||
	       (__vcpu_sys_reg(vcpu, HCRX_EL2) & HCRX_EL2_TMEA);
}

/*