]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: arm64: nv: Fold GICv3 host trapping requirements into guest setup
authorMarc Zyngier <maz@kernel.org>
Tue, 25 Feb 2025 17:29:28 +0000 (17:29 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Mon, 3 Mar 2025 22:57:10 +0000 (14:57 -0800)
commit89896cc1591188bfaf2f550abd5b8119b9a9787f
treec381f8e3aceddd25f3396a6bd63316daef062b38
parent7682c023212e77babc68f04c44fe895091d9a5a9
KVM: arm64: nv: Fold GICv3 host trapping requirements into guest setup

Popular HW that is able to use NV also has a broken vgic implementation
that requires trapping.

On such HW, propagate the host trap bits into the guest's shadow
ICH_HCR_EL2 register, making sure we don't allow an L2 guest to bring
the system down.

This involves a bit of tweaking so that the emulation code correctly
poicks up the shadow state as needed, and to only partially sync
ICH_HCR_EL2 back with the guest state to capture EOIcount.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20250225172930.1850838-15-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/vgic/vgic-v3-nested.c