Skip to content

arm64: errata: treat the T8152 vGIC SEIS as broken (KVM guests on the J873g, M6 Mac mini) - #1794

Open
sithglan wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
sithglan:thomas/j873-kvm-el2
Open

sithglan wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
sithglan:thomas/j873-kvm-el2

Conversation

@sithglan

Copy link
Copy Markdown
Contributor

#1728 made KVM guests boot on the J813 (M5 MacBook Air, T8142) at EL2. This is the one piece the J873g (Mac mini M6, T8152) still needs on top of it.

With a padded Mach-O Stage 1 (CTXR execute window, as aura#77 describes), the J873g under the macOS 27.2 stub runs Linux at EL2 on all twelve CPUs, and CONFIG_ARM64_CTXR_EXECMEM confines its code to the window. I read the relevant ID registers there with a small module:

  • ICH_VTR_EL2 is 0x90580007 on all twelve CPUs, E (part 0x072) and P (0x073) cores alike: eight list registers with SEIS set, the same value as T8142. This PR adds the two T8152 parts to apple_broken_seis_cpus.
  • The sanitised ID_AA64PFR1_EL1 is 0x00000f0002000201 (MTE2, MTE_frac NI), also the same as T8142. arm64, KVM, irqchip/apple-aic: KVM guests on the J813 (M5 MacBook Air) at EL2 #1728's MTE_frac fix-up therefore already covers it.
  • The AIC needs no change. apple,t8152-aic3 has no T8152-specific match here; it binds through the generic apple,t8122-aic3 entry, so the vm_timer_fiq_readonly handling for T8142 doesn't apply. VM_TMR_FIQ_ENA_EL2 takes writes on T8152.

Testing

Run on the J873g. The kernel is integration/aurora 673f618 with aurora-wip 210c8f6 merged in, because integration doesn't have #1197's J873g NVMe and 10GbE yet. It also has #1652 and this commit, with CONFIG_KVM=y and CONFIG_ARM64_CTXR_EXECMEM=y. It was booted through aura's kboot, which places the kernel in the CTXR window.

  • Boot: "CPU: All CPU(s) started at EL2", "CPU features: detected: Known broken GICv3 SEIS implementation", "kvm [1]: VHE mode initialized successfully". The execmem-confine boot verify passes with 520 mappings and 0 violations. All twelve CPUs come up, the root is on the NVMe, and 10GbE and Wi-Fi work.
  • KVM guests: libvirt 12.9.0 and QEMU 11.1.3 (-accel kvm -cpu host -M virt,gic-version=3), Debian 13 arm64 nocloud with UEFI (AAVMF).
    • 4 vCPUs: login prompt in about 21 s, with network and DNS working.
    • 12 vCPUs, alongside the 4-vCPU guest: login prompt in about 21 s.
  • Build: this branch (integration/aurora + the commit) builds Image.gz, modules and dtbs with CONFIG_KVM=y (LLVM 22). checkpatch --strict is clean.

The same entry, together with #1728's MTE_frac fix, also runs on the M6's linux-aurora j873 desktop kernel (7.1, where the list is still broken_seis in vgic-v3.c). There, guests reach a login prompt in 17 s with 4 vCPUs and with 12.

Jens's #1724 adds the T6050 parts to the same list, so whichever lands second needs a trivial rebase.

cc @Acelogic @DjDeveloperr @RyanTheTide @LiamRay10

ICH_VTR_EL2 on the J873g (Mac mini M6, T8152, macOS 27.2 stub) reads
0x90580007 at EL2 on all twelve CPUs, E (part 0x072) and P (0x073) cores
alike: eight list registers and SEIS set, the value of T8142 and the
other Apple cores in apple_broken_seis_cpus. Add the two T8152 parts so
that KVM does not trust the locally generated SError the vGIC claims to
support, as for those cores.

With it the kernel reports "Known broken GICv3 SEIS implementation" and
KVM guests with 4 and 12 vCPUs boot on the J873g.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
@sithglan
sithglan force-pushed the thomas/j873-kvm-el2 branch from 871cad7 to 46319d8 Compare November 13, 2026 16:54
@sithglan

Copy link
Copy Markdown
Contributor Author

Rebased onto integration/aurora a34d26c. It is now 46319d8 (was 871cad7). The old head no longer merged because #1724 adds the T6050 pair to the same apple_broken_seis_cpus[] list. The T8152 pair now follows the T6050 pair; nothing else changed. arch/arm64/kernel/cpu_errata.o builds with W=1 and no warnings (LLVM 22).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant