]> 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)
commitd5b18438c866e2cf933e5e0d493d96f10d8b9c00
tree29d486fefb316121606bc491066440e68b9f0f46
parent00e4cb66bf1789fe0cee41855d22953e90dbc1cf
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