]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: Turn vgic-v3 errata traps into a patched-in constant
authorMarc Zyngier <maz@kernel.org>
Thu, 20 Nov 2025 17:24:54 +0000 (17:24 +0000)
committerOliver Upton <oupton@kernel.org>
Mon, 24 Nov 2025 22:29:11 +0000 (14:29 -0800)
commit8d3dfab1d305d61359454d9c09b736f077a9fce4
treee7e843ca1035f3f340bac4a09adc42b96f3f8a04
parent08f4f41c1e95ffb1ce525a07d25daa577110d748
KVM: arm64: Turn vgic-v3 errata traps into a patched-in constant

The trap bits are currently only set to manage CPU errata. However,
we are about to make use of them for purposes beyond beating broken
CPUs into submission.

For this purpose, turn these errata-driven bits into a patched-in
constant that is merged with the KVM-driven value at the point of
programming the ICH_HCR_EL2 register, rather than being directly
stored with with the shadow value..

This allows the KVM code to distinguish between a trap being handled
for the purpose of an erratum workaround, or for KVM's own need.

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-5-maz@kernel.org
Signed-off-by: Oliver Upton <oupton@kernel.org>
arch/arm64/kernel/image-vars.h
arch/arm64/kvm/hyp/vgic-v3-sr.c
arch/arm64/kvm/vgic/vgic-v3-nested.c
arch/arm64/kvm/vgic/vgic-v3.c
arch/arm64/kvm/vgic/vgic.h