[PATCH v2 06/25] KVM: arm64: nv: Add sanitising to VNCR-backed HCRX_EL2

Oliver Upton oliver.upton at linux.dev
Fri Feb 2 11:17:37 PST 2024


On Fri, Feb 02, 2024 at 05:15:51PM +0000, Oliver Upton wrote:
> On Fri, Feb 02, 2024 at 02:56:50PM +0000, Marc Zyngier wrote:
> > No amount of warnings will do, because people don't give a damn.
> > 
> > I'm actually in favour of something far more radical: we snapshot the
> > raw value of all the used RES0/1, and put BUILD_BUG_ON()s that fire if
> > any value has changed. They will have to touch the KVM code to fix
> > that, and we catch them red-handed.
> 
> Oh I like that a lot more.

Unsure which registers you planned to give this treatment, but all of
the ID registers we know about should probably go in this bucket too.

-- 
Thanks,
Oliver



More information about the linux-arm-kernel mailing list