]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: GICv3: Detect and work around the lack of ICV_DIR_EL1 trapping
authorMarc Zyngier <maz@kernel.org>
Thu, 20 Nov 2025 17:24:56 +0000 (17:24 +0000)
committerOliver Upton <oupton@kernel.org>
Mon, 24 Nov 2025 22:29:11 +0000 (14:29 -0800)
commit2a28810cbb8b21a4016182617cc1fd72eddf4a36
treefbe99281eac800a46aacb8056aa766117eb65053
parent567ebfedb5bd204a8ce6a11695f02730f1bf57f4
KVM: arm64: GICv3: Detect and work around the lack of ICV_DIR_EL1 trapping

A long time ago, an unsuspecting architect forgot to add a trap
bit for ICV_DIR_EL1 in ICH_HCR_EL2. Which was unfortunate, but
what's a bit of spec between friends? Thankfully, this was fixed
in a later revision, and ARM "deprecates" the lack of trapping
ability.

Unfortuantely, a few (billion) CPUs went out with that defect,
anything ARMv8.0 from ARM, give or take. And on these CPUs,
you can't trap DIR on its own, full stop.

As the next best thing, we can trap everything in the common group,
which is a tad expensive, but hey ho, that's what you get. You can
otherwise recycle the HW in the neaby bin.

Tested-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Tested-by: Mark Brown <broonie@kernel.org>
Link: https://msgid.link/20251120172540.2267180-7-maz@kernel.org
Signed-off-by: Oliver Upton <oupton@kernel.org>
arch/arm64/include/asm/virt.h
arch/arm64/kernel/cpufeature.c
arch/arm64/kernel/hyp-stub.S
arch/arm64/kvm/vgic/vgic-v3.c
arch/arm64/tools/cpucaps