]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: nv: Treat AMO as 1 when at EL2 and {E2H,TGE} = {1, 0}
authorOliver Upton <oliver.upton@linux.dev>
Thu, 18 Sep 2025 16:46:31 +0000 (09:46 -0700)
committerMarc Zyngier <maz@kernel.org>
Fri, 19 Sep 2025 09:41:56 +0000 (10:41 +0100)
commitff37a41db8b47834b747b3bb427825fc75bc86a7
tree21da09aec69c23a7ea2a6390a76c03900f23a2f3
parentb320789d6883cc00ac78ce83bccbfe7ed58afcf0
KVM: arm64: nv: Treat AMO as 1 when at EL2 and {E2H,TGE} = {1, 0}

SErrors are not deliverable at EL2 when the effective value of
HCR_EL2.{TGE,AMO} = {0, 0}. This is bothersome to deal with in nested
as we need to use auxiliary pending state to track the pending vSError
since HCR_EL2.VSE has no mechanism for honoring the guest HCR. On top of
that, we have no way of making that auxiliary pending state visible in
ISR_EL1.

A defect against the architecture now allows an implementation to treat
HCR_EL2.AMO as 1 when HCR_EL2.{E2H,TGE} = {1, 0}. Let's do exactly that,
meaning SErrors are always deliverable at EL2 for the typical E2H=RES1
VM.

Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_emulate.h