]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit3aeb844d5f4c6f30ed634fc096a4e30575c53cba
tree29d486fefb316121606bc491066440e68b9f0f46
parentdd28142974eddcf6eaa081b0ce13c927fceee442
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