[PATCH v2 04/45] KVM: arm64: Turn vgic-v3 errata traps into a patched-in constant
Marc Zyngier
maz at kernel.org
Fri Nov 14 01:37:37 PST 2025
On Thu, 13 Nov 2025 18:01:57 +0000,
Mark Brown <broonie at kernel.org> wrote:
>
> [1 <text/plain; us-ascii (quoted-printable)>]
> 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
Fix at 20251114093541.3216162-1-maz at kernel.org based on kvmarm/next. I
haven't tried -next.
M.
--
Without deviation from the norm, progress is not possible.
More information about the linux-arm-kernel
mailing list