summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/kvm_emulate.h
diff options
context:
space:
mode:
authorOliver Upton <oliver.upton@linux.dev>2025-07-08 10:25:25 -0700
committerOliver Upton <oliver.upton@linux.dev>2025-07-08 11:36:35 -0700
commit1f1c08d9896cf439cca829960df3d6ec3c03619b (patch)
tree951a86aaa92a6be838a5086b620173bb93e3e5f4 /arch/arm64/include/asm/kvm_emulate.h
parent59b6d08666f0424f3e0ade08ab664fac65a09c5d (diff)
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 <maz@kernel.org> Link: https://lore.kernel.org/r/20250708172532.1699409-21-oliver.upton@linux.dev Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'arch/arm64/include/asm/kvm_emulate.h')
-rw-r--r--arch/arm64/include/asm/kvm_emulate.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/kvm_emulate.h b/arch/arm64/include/asm/kvm_emulate.h
index 71ecdc20523e..fa8a08a1ccd5 100644
--- a/arch/arm64/include/asm/kvm_emulate.h
+++ b/arch/arm64/include/asm/kvm_emulate.h
@@ -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);
}
/*