KVM: arm64: Snapshot all non-zero RES0/RES1 sysreg fields for later checking
authorMarc Zyngier <maz@kernel.org>
Wed, 14 Feb 2024 13:18:26 +0000 (13:18 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Mon, 19 Feb 2024 17:13:02 +0000 (17:13 +0000)
commitb80b701d5a67d07f4df4a21e09cb31f6bc1feeca
treede9c7b7d0939f1356bbc61c27c103ca680500192
parent84de212d739ecd16c6289ec4ed47e27b0080bac6
KVM: arm64: Snapshot all non-zero RES0/RES1 sysreg fields for later checking

As KVM now strongly relies on accurately handling the RES0/RES1 bits
on a number of paths, add a compile-time checker that will blow in
the face of the innocent bystander, should they try to sneak in an
update that changes any of these RES0/RES1 fields.

It is expected that such an update will come with the relevant
KVM update if needed.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240214131827.2856277-26-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/check-res-bits.h [new file with mode: 0644]
arch/arm64/kvm/sys_regs.c