]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: arm64: Make ICC_*SGI*_EL1 undef in the absence of a vGICv3
authorMarc Zyngier <maz@kernel.org>
Tue, 20 Aug 2024 10:03:38 +0000 (11:03 +0100)
committerOliver Upton <oliver.upton@linux.dev>
Thu, 22 Aug 2024 08:08:37 +0000 (08:08 +0000)
commit3e6245ebe7ef341639e9a7e402b3ade8ad45a19f
tree96302ec46dd93c975c20824f8ebe574cd157491a
parent1d8c3c23a6bc1527e253b305b4b68c03d833b824
KVM: arm64: Make ICC_*SGI*_EL1 undef in the absence of a vGICv3

On a system with a GICv3, if a guest hasn't been configured with
GICv3 and that the host is not capable of GICv2 emulation,
a write to any of the ICC_*SGI*_EL1 registers is trapped to EL2.

We therefore try to emulate the SGI access, only to hit a NULL
pointer as no private interrupt is allocated (no GIC, remember?).

The obvious fix is to give the guest what it deserves, in the
shape of a UNDEF exception.

Reported-by: Alexander Potapenko <glider@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240820100349.3544850-2-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/sys_regs.c
arch/arm64/kvm/vgic/vgic.h