[PATCH v2 04/45] KVM: arm64: Turn vgic-v3 errata traps into a patched-in constant

Mark Brown broonie at kernel.org
Thu Nov 13 10:01:57 PST 2025


On Sun, Nov 09, 2025 at 05:15:38PM +0000, Marc Zyngier wrote:
> 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..

We're seeing the no-vgic-v3 failures in -next with slightly different
symptoms to those that were seen in mainline and fixed with Sacha's
change da888524c393 ("KVM: arm64: vgic-v3: Trap all if no in-kernel
irqchip").  That change generated a conflict with this patch which
Stephen resolved in what looks like a reasonable fashion tactically but
I suspect needs some wider changes.  The test now fails with:

# selftests: kvm: no-vgic-v3
# Random seed: 0x6b8b4567
# ==== Test Assertion Failure ====
#   lib/arm64/processor.c:487: false
#   pid=2080 tid=2080 errno=4 - Interrupted system call
#      1	0x0000000000413d27: assert_on_unhandled_exception at processor.c:487
#      2	0x0000000000406c1f: _vcpu_run at kvm_util.c:1699
#      3	 (inlined by) vcpu_run at kvm_util.c:1710
#      4	0x000000000040308b: test_run_vcpu at no-vgic-v3.c:124
#      5	0x0000000000402253: test_guest_no_gicv3 at no-vgic-v3.c:155
#      6	 (inlined by) main at no-vgic-v3.c:174
#      7	0x0000ffff9dc17543: ?? ??:0
#      8	0x0000ffff9dc17617: ?? ??:0
#      9	0x000000000040242f: _start at ??:?
#   Unexpected exception (vector:0x4, ec:0x18)
not ok 25 selftests: kvm: no-vgic-v3 # exit=254

Log showing the failure:

   https://lava.sirena.org.uk/scheduler/job/2079953#L2994

This is on i.MX8MP-EVK, 4xA53 and a GICv3.

No bisect or anything, between unrelated DRM breakage in -next and the
same test failing in Linus' tree in -rc3 which the kvm-arm tree is based
on it's a bit of a mess.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20251113/e4f0a7bb/attachment.sig>


More information about the linux-arm-kernel mailing list