From: Marc Zyngier <maz@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Oliver Upton <oliver.upton@linux.dev>,
James Morse <james.morse@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>, Joey Gouly <joey.gouly@arm.com>,
linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] KVM: arm64: Control visibility of S1PIE related sysregs to userspace
Date: Wed, 21 Aug 2024 17:40:06 +0100 [thread overview]
Message-ID: <86bk1lygm1.wl-maz@kernel.org> (raw)
In-Reply-To: <5304749b-04c8-44f4-b4de-b2d0cef61169@sirena.org.uk>
On Wed, 21 Aug 2024 16:19:59 +0100,
Mark Brown <broonie@kernel.org> wrote:
>
> On Wed, Aug 21, 2024 at 03:45:20PM +0100, Marc Zyngier wrote:
>
> > Ultimately, we need to revisit the way we deal with visibility, as
> > adding a myriad of helpers checking a combination of features doesn't
> > scale. That information should exist as a static table, just like the
> > trap bits.
>
> Indeed, I was wondering about just adding a description of the relevant
> ID register field to the sys_regs table.
You'd need more than that.
How would you express the visibility of TCR2_EL2? It depends on both
ID_AA64PFR0_EL1.EL2==1 *and* ID_AA64MMFR3_EL1.TCRX==1. So it cannot be
just a single tuple { idreg, field, value }. It needs to be an
arbitrary conjunction of those.
The good news is that it is a much smaller table than the monster trap
routing table: it is "enum vcpu_sysreg" plus things that are
synthesised (anything with a .get_user callback).
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2024-08-21 16:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-21 13:07 [PATCH 0/2] KVM: arm64: Control visibility of S1PIE related sysregs to userspace Mark Brown
2024-08-21 13:07 ` [PATCH 1/2] KVM: arm64: Hide TCR2_EL1 from userspace when disabled for guests Mark Brown
2024-08-21 13:07 ` [PATCH 2/2] KVM: arm64: Hide S1PIE registers " Mark Brown
2024-08-21 13:46 ` [PATCH 0/2] KVM: arm64: Control visibility of S1PIE related sysregs to userspace Marc Zyngier
2024-08-21 14:01 ` Mark Brown
2024-08-21 14:45 ` Marc Zyngier
2024-08-21 15:19 ` Mark Brown
2024-08-21 16:40 ` Marc Zyngier [this message]
2024-08-22 15:30 ` Mark Brown
2024-08-22 17:44 ` Marc Zyngier
2024-08-28 15:10 ` Mark Brown
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=86bk1lygm1.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=joey.gouly@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oliver.upton@linux.dev \
--cc=suzuki.poulose@arm.com \
--cc=will@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).