[PATCH 0/2] KVM: arm64: Control visibility of S1PIE related sysregs to userspace

Marc Zyngier maz at kernel.org
Wed Aug 21 09:40:06 PDT 2024


On Wed, 21 Aug 2024 16:19:59 +0100,
Mark Brown <broonie at 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.



More information about the linux-arm-kernel mailing list