Skip to content

Kernel: support second VMD rootbus on Arrow Lake (fixes #107)#113

Open
mastacontrola wants to merge 1 commit into
masterfrom
vmd-pch-rootbus
Open

Kernel: support second VMD rootbus on Arrow Lake (fixes #107)#113
mastacontrola wants to merge 1 commit into
masterfrom
vmd-pch-rootbus

Conversation

@mastacontrola

@mastacontrola mastacontrola commented Jul 5, 2026

Copy link
Copy Markdown
Member

Problem

On Arrow Lake desktop platforms (Core Ultra 200S) with VMD enabled in BIOS, NVMe drives attached through the PCH sit on a second VMD rootbus hardwired to bus 0x80. The mainline vmd driver only enumerates the first rootbus, so the drive is invisible to FOS — imaging fails with no disks found (#107). Arrow Lake laptops (H/HX/U) route NVMe over CPU lanes on the first rootbus, which is why they work fine today.

Why not just bump the kernel

Intel's upstream fix ("PCI: vmd: Add support for second rootbus under VMD", Szymon Durawa) is at v5 (2026-06-25) and still unmerged — no mainline or stable kernel has it, so no version bump can fix this yet.

What this does

Ubuntu ships the fix as SAUCE patches in linux-oem-6.11 (Launchpad #2085853), confirmed working on affected hardware since 6.11.0-1008.8. This PR combines those four commits and adapts them to our vanilla 6.12.35 as patch/kernel/linux.patch, which build.sh already picks up automatically for all kernel builds:

  • 0c9ff92b2efc UBUNTU: SAUCE: PCI: vmd: Clean up vmd_enable_domain function
  • d20355bdd463 UBUNTU: SAUCE: PCI: vmd: Add VMD PCH rootbus support
  • e7b7195e3706 UBUNTU: SAUCE: PCI: vmd: Add WA for VMD PCH rootbus support
  • 040d304c75b9 UBUNTU: SAUCE: PCI: vmd: Fix use-after-free bug in resource name assignment

Adaptation to 6.12.35: dropped the pci_lock_rescan_remove()/pci_unlock_rescan_remove() calls and the aspm_os_control field, which exist only in Ubuntu's tree. Everything else is verbatim.

Verification

  • The patched vmd.c was diffed against Ubuntu's final tree at 040d304c75b9: the only remaining differences are known 6.11↔6.12.35 base deltas (raw spinlocks, Xen bypass block, MSI_FLAG_NO_AFFINITY) plus the two Ubuntu-only items above.
  • The combined patch applies cleanly with patch -p1 against a pristine 6.12.35 tree — the exact invocation build.sh uses — and reproduces the validated file byte-for-byte.
  • Balanced-brace/paren check and symbol-usage check pass; no leftover references to the omitted locking calls.
  • Compile-tested: drivers/pci/controller/vmd.o builds cleanly (zero warnings at W=1) against vanilla 6.12.35 configured with configs/kernelx64.config (CONFIG_VMD=y).
  • Still needs testing on real Arrow Lake desktop hardware (the VMD not working with desktop intel core ultra 2 series (arrow lake) platforms #107 reporter's machine is the ideal test case).

The patch file carries a provenance header noting it should be removed once the upstream series lands in whatever stable kernel FOS builds from.

Fixes #107

🤖 Generated with Claude Code

On Arrow Lake desktop (Core Ultra 200S) systems with VMD enabled,
NVMe drives routed through the PCH live on a second VMD rootbus
hardwired to bus 0x80. The mainline vmd driver only enumerates the
first rootbus, so FOS never sees the disk and imaging fails.

Intel's upstream fix (v5, 2026-06-25) is not yet merged in any
mainline/stable kernel, so a kernel version bump cannot fix this yet.
Ubuntu ships the same fix as SAUCE patches in linux-oem-6.11
(Launchpad #2085853), where it is confirmed working on affected
hardware. This adds those four patches (0c9ff92b2efc, d20355bdd463,
e7b7195e3706, 040d304c75b9) combined and adapted to vanilla 6.12.35
as patch/kernel/linux.patch, which build.sh already applies to all
kernel builds. The patched vmd.c was diffed against Ubuntu's final
tree to confirm only known base-version differences remain, and the
patch was verified to apply cleanly the same way build.sh does.

Harmless for arm64/x86 builds: the file patches identically and
CONFIG_VMD is only enabled on x64.

Fixes #107

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

VMD not working with desktop intel core ultra 2 series (arrow lake) platforms

1 participant