All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Upton <oliver.upton@linux.dev>
To: kvmarm@lists.linux.dev
Cc: Marc Zyngier <maz@kernel.org>, Joey Gouly <joey.gouly@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>,
	Oliver Upton <oliver.upton@linux.dev>
Subject: [PATCH 0/2] KVM: arm64: nv: Fix SError injection at EL2
Date: Thu, 18 Sep 2025 09:46:30 -0700	[thread overview]
Message-ID: <20250918164632.410404-1-oliver.upton@linux.dev> (raw)

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


             reply	other threads:[~2025-09-18 16:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-18 16:46 Oliver Upton [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250918164632.410404-1-oliver.upton@linux.dev \
    --to=oliver.upton@linux.dev \
    --cc=joey.gouly@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=maz@kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=yuzenghui@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.