Re: [PATCH 1/2] KVM: arm64: Hide FEAT_LS64_ACCDATA from guests

From: Marc Zyngier

Date: Fri Oct 23 2026 - 04:31:54 EST


On Fri, 23 Oct 2026 08:01:09 +0100,
Fuad Tabba <fuad.tabba@xxxxxxxxx> 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.