Re: [PATCH v21 02/15] KVM: arm64: Refuse to start a guest with S1PIE or S1POE but not TCR2

From: Lorenzo Stoakes (ARM)

Date: Wed Oct 14 2026 - 11:59:09 EST


On Sat, Oct 03, 2026 at 01:30:05PM +0100, Marc Zyngier wrote:
> This *absolutely* needs to be data driven, and we're not going back to
> over two years ago. We already have most of what is needed in
> config.c, and it is only a matter of making sure that S1PxE is only
> enabled for the guest if TCR2 and ATS1A are also present. If that
> means additional sanitisation of the idregs when finalised, so be it.
>
> If userspace decides to expose crap in the ID registers, that's its
> own problem, and we're not in the business of enforcing idiotic
> configurations. The only thing that matters is that the state that KVM
> deals with is consistent.

As I understand it: don't return an error for a configuration that doesn't
make sense, enforce RES0 instead.

So I'm guessing something like the below against the series (+ obviously
adjusting tests to reflect that)?

Cheers, Lorenzo

----8<----