KVM: arm64: Handle all ID registers trapped for a protected VM
authorMarc Zyngier <maz@kernel.org>
Thu, 9 Jun 2022 12:12:19 +0000 (13:12 +0100)
committerMarc Zyngier <maz@kernel.org>
Thu, 9 Jun 2022 12:24:02 +0000 (13:24 +0100)
commitfa7a17214488ef7df347dcd1a5594f69ea17f4dc
tree29d486fefb316121606bc491066440e68b9f0f46
parentae187fec75aa670a551d9662f83e3947d3f02a69
KVM: arm64: Handle all ID registers trapped for a protected VM

A protected VM accessing ID_AA64ISAR2_EL1 gets punished with an UNDEF,
while it really should only get a zero back if the register is not
handled by the hypervisor emulation (as mandated by the architecture).

Introduce all the missing ID registers (including the unallocated ones),
and have them to return 0.

Reported-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220609121223.2551-3-will@kernel.org
arch/arm64/kvm/hyp/nvhe/sys_regs.c