All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: arm64: nv: Fix SError injection at EL2
@ 2025-09-18 16:46 Oliver Upton
  2025-09-18 16:46 ` [PATCH 1/2] KVM: arm64: nv: Treat AMO as 1 when at EL2 and {E2H,TGE} = {1, 0} Oliver Upton
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Oliver Upton @ 2025-09-18 16:46 UTC (permalink / raw)
  To: kvmarm; +Cc: Marc Zyngier, Joey Gouly, Suzuki K Poulose, Zenghui Yu,
	Oliver Upton

FEAT_NV2 keeps us out of the loop on changes to HCR_EL2. That really
sucks when the guest hypervisor toggles bits that affect the hyp
context, such as TGE and xMO.

The architecture now allows an implementation to treat HCR_EL2.AMO as 1
any time that HCR_EL2.{E2H,TGE} = {1, 0}, effectively allowing us to
hide what would otherwise be a quality of emulation bug in SError
injection.

Unfortunately there's nothing to be done for E2H0 VMs, although given
the direction of the architecture the offending hypervisor should just
get with the times...

I've included the selftests change for demonstration purposes only, I
plan to incorporate it in my EL2 selftests which it currently depends
on.

Applies to 6.17-rc4.

Oliver Upton (2):
  KVM: arm64: nv: Treat AMO as 1 when at EL2 and {E2H,TGE} = {1, 0}
  KVM: arm64: selftests: Test effective value of HCR_EL2.AMO

 arch/arm64/include/asm/kvm_emulate.h          | 14 +++++++
 .../selftests/kvm/arm64/external_aborts.c     | 38 +++++++++++++++++++
 2 files changed, 52 insertions(+)


base-commit: b320789d6883cc00ac78ce83bccbfe7ed58afcf0
-- 
2.47.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-09-19 12:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-18 16:46 [PATCH 0/2] KVM: arm64: nv: Fix SError injection at EL2 Oliver Upton
2025-09-18 16:46 ` [PATCH 1/2] KVM: arm64: nv: Treat AMO as 1 when at EL2 and {E2H,TGE} = {1, 0} Oliver Upton
2025-09-18 16:46 ` [PATCH 2/2] [DO NOT SUBMIT] KVM: arm64: selftests: Test effective value of HCR_EL2.AMO Oliver Upton
2025-09-19  9:58 ` [PATCH 0/2] KVM: arm64: nv: Fix SError injection at EL2 Marc Zyngier
2025-09-19 12:39 ` Marc Zyngier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.