Skip to content

KVM: arm64: nv: Fix SError injection at EL2

Oliver Upton kvmarm 1 version Applied

Status from this message: Applied to next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2KVM: arm64: nv: Treat AMO as 1 when at EL2 and {E2H,TGE} = {1, 0}arch/arm64/include/asm/kvm_emulate.h+14 -00 replies
2/2KVM: arm64: selftests: Test effective value of HCR_EL2.AMOtools/testing/selftests/kvm/arm64/external_aborts.c+38 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] KVM: arm64: nv: Fix SError injection at EL2

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

Signature · 1 line
2.47.3