KVM: arm64: Do not let a L1 hypervisor access the *32_EL2 sysregs
authorMarc Zyngier <maz@kernel.org>
Mon, 23 Oct 2023 09:54:43 +0000 (10:54 +0100)
committerOliver Upton <oliver.upton@linux.dev>
Wed, 25 Oct 2023 00:24:57 +0000 (00:24 +0000)
commitc7d11a61c7f7de75e4e269485644ea8c5a4e0bf6
tree032cd89e3aecf8b6f413f8dc861629186658982c
parent04cf5465055442c15c37bbedb1febe2d8f3a47be
KVM: arm64: Do not let a L1 hypervisor access the *32_EL2 sysregs

DBGVCR32_EL2, DACR32_EL2, IFSR32_EL2 and FPEXC32_EL2 are required to
UNDEF when AArch32 isn't implemented, which is definitely the case when
running NV.

Given that this is the only case where these registers can trap,
unconditionally inject an UNDEF exception.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Link: https://lore.kernel.org/r/20231023095444.1587322-5-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/sys_regs.c