KVM: arm64: Handle SCXTNUM_ELx traps
authorMarc Zyngier <maz@kernel.org>
Tue, 10 Nov 2020 14:13:08 +0000 (14:13 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 12 Nov 2020 21:22:46 +0000 (21:22 +0000)
commited4ffaf49bf9ce1002b516d8c6aa04937b7950bc
treea4ba52faaa43190143bcd19c3ed8bf10a3e4e6bd
parent338b17933a6077bb5406b33d8b9fb9616fffc1af
KVM: arm64: Handle SCXTNUM_ELx traps

As the kernel never sets HCR_EL2.EnSCXT, accesses to SCXTNUM_ELx
will trap to EL2. Let's handle that as gracefully as possible
by injecting an UNDEF exception into the guest. This is consistent
with the guest's view of ID_AA64PFR0_EL1.CSV2 being at most 1.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20201110141308.451654-4-maz@kernel.org
arch/arm64/include/asm/sysreg.h
arch/arm64/kvm/sys_regs.c