mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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>,
	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 11:28:17 +0100	[thread overview]
Message-ID: <86ecdgzp6m.wl-maz@kernel.org> (raw)
In-Reply-To: <CA+EHjTw08SZC_3Uodt6ew6vXVH-doW-8G41fVCF-rmaKsv+0fQ@mail.gmail.com>

On Fri, 23 Oct 2026 10:08:11 +0100,
Fuad Tabba <fuad.tabba@linux.dev> wrote:
> 
> Hi Marc,
> 
> On Fri, 23 Oct 2026 09:31:32 +0100, Marc Zyngier <maz@kernel.org> wrote:
> [...]
> > 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.
> 
> Context switching it means accessing ACCDATA_EL1 at EL2, which traps
> to EL3 unless SCR_EL3.ADEn is set. booting.rst doesn't require ADEn
> today, and TF-A only sets it when built with ENABLE_FEAT_LS64_ACCDATA,
> which defaults to off.

I couldn't care less.

booting.rst is not authoritative and has absolutely no value when it
comes to trap bits. Firmware could perfectly enable a feature on trap
instead of catching fire.  Additionally, shipping firmware that
doesn't support features that the CPU advertises is a bug, and I want
to see these systems burn.

> On such a host, KVM traps to EL3 the first time
> it switches ACCDATA_EL1 for a VM, and every VM has LS64_ACCDATA by
> default. The cap leaves the register alone, and the fine-grained trap
> takes priority over ADEn, so it works whatever ADEn is set to.
> 
> Should we keep the cap as the fix for stable, and post ACCDATA support
> on top? If you agree, I'd rebase your patches 3, 4 and 8 from [1], add
> a booting.rst requirement for ADEn and EnAS0, and lift the cap and the
> compat.

No, I want this fixed by enabling ACCDATA support by default, which is
what we have *already* promised to userspace, and see the fireworks.
You can add an arm64.nols64 kernel option if you want, which is
consistent with what we do for CNTPOFF, NV3, and other extensions that
depend on FW enabling them.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2026-10-23 10:28 UTC|newest]

Thread overview: 8+ 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
2026-10-23  9:08     ` Fuad Tabba
2026-10-23 10:28       ` Marc Zyngier [this message]
2026-10-23 10:37         ` Fuad Tabba
2026-10-23 14:10           ` Arnd Bergmann
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=86ecdgzp6m.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=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®