[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86bk1lygm1.wl-maz@kernel.org>
Date: Wed, 21 Aug 2024 17:40:06 +0100
From: Marc Zyngier <maz@...nel.org>
To: Mark Brown <broonie@...nel.org>
Cc: Oliver Upton <oliver.upton@...ux.dev>,
James Morse <james.morse@....com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Joey Gouly <joey.gouly@....com>,
linux-arm-kernel@...ts.infradead.org,
kvmarm@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/2] KVM: arm64: Control visibility of S1PIE related sysregs to userspace
On Wed, 21 Aug 2024 16:19:59 +0100,
Mark Brown <broonie@...nel.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.
Powered by blists - more mailing lists