From: Marc Zyngier <maz@kernel.org>
To: Fuad Tabba <fuad.tabba@linux.dev>
Cc: Oliver Upton <oupton@kernel.org>,
kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
Joey Gouly <joey.gouly@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>,
Steffen Eiden <seiden@linux.ibm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Yicong Yang <yangyicong@hisilicon.com>,
Zhou Wang <wangzhou1@hisilicon.com>,
Arnd Bergmann <arnd@arndb.de>, Fuad Tabba <tabba@google.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] KVM: arm64: Hide FEAT_LS64_ACCDATA from guests
Date: Fri, 23 Oct 2026 09:31:32 +0100 [thread overview]
Message-ID: <86fqxwzul7.wl-maz@kernel.org> (raw)
In-Reply-To: <20261023070110.1833446-2-fuad.tabba@linux.dev>
On Fri, 23 Oct 2026 08:01:09 +0100,
Fuad Tabba <fuad.tabba@linux.dev> wrote:
>
> Since commit 58ce78667a641 ("arm64: Add support for FEAT_{LS64,
> LS64_V}"), a guest sees the host's ID_AA64ISAR1_EL1.LS64, but KVM only
> enables the FEAT_LS64 and FEAT_LS64_V instructions in HCRX_EL2. On a
> host with FEAT_LS64_ACCDATA, a guest's ST64BV0 therefore traps and hits
> the WARN_ON_ONCE() in handle_other(). ACCDATA_EL1 isn't trapped or
> context-switched either, so every guest on that CPU shares it.
>
> Rather than support FEAT_LS64_ACCDATA, which requires ACCDATA_EL1 to be
> context-switched, cap the field at LS64_V. The guest's ACCDATA_EL1
> accesses then UNDEF. This hides FEAT_LS64WB too, as it implies
> FEAT_LS64_ACCDATA.
Why settle for the least capable option? Context switching ACCDATA_EL1
is easy enough, can be gated on guest features, and avoid the
userspace horror story.
I'd rather see that.
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2026-10-23 8:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 7:01 [PATCH 0/2] KVM: arm64: Stop advertising FEAT_LS64_ACCDATA to guests Fuad Tabba
2026-10-23 7:01 ` [PATCH 1/2] KVM: arm64: Hide FEAT_LS64_ACCDATA from guests Fuad Tabba
2026-10-23 8:31 ` Marc Zyngier [this message]
2026-10-23 9:08 ` Fuad Tabba
2026-10-23 10:28 ` Marc Zyngier
2026-10-23 10:37 ` Fuad Tabba
2026-10-23 14:10 ` Arnd Bergmann
2026-10-24 7:14 ` Fuad Tabba
2026-10-23 7:01 ` [PATCH 2/2] KVM: arm64: selftests: Test ID_AA64ISAR1_EL1.LS64 on its own Fuad Tabba
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=86fqxwzul7.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=fuad.tabba@linux.dev \
--cc=joey.gouly@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=oupton@kernel.org \
--cc=seiden@linux.ibm.com \
--cc=suzuki.poulose@arm.com \
--cc=tabba@google.com \
--cc=wangzhou1@hisilicon.com \
--cc=will@kernel.org \
--cc=yangyicong@hisilicon.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®