Kernel: support second VMD rootbus on Arrow Lake (fixes #107)#113
Open
mastacontrola wants to merge 1 commit into
Open
Kernel: support second VMD rootbus on Arrow Lake (fixes #107)#113mastacontrola wants to merge 1 commit into
mastacontrola wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 mainlinevmddriver 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 aspatch/kernel/linux.patch, whichbuild.shalready picks up automatically for all kernel builds:0c9ff92b2efcUBUNTU: SAUCE: PCI: vmd: Clean up vmd_enable_domain functiond20355bdd463UBUNTU: SAUCE: PCI: vmd: Add VMD PCH rootbus supporte7b7195e3706UBUNTU: SAUCE: PCI: vmd: Add WA for VMD PCH rootbus support040d304c75b9UBUNTU: SAUCE: PCI: vmd: Fix use-after-free bug in resource name assignmentAdaptation to 6.12.35: dropped the
pci_lock_rescan_remove()/pci_unlock_rescan_remove()calls and theaspm_os_controlfield, which exist only in Ubuntu's tree. Everything else is verbatim.Verification
vmd.cwas diffed against Ubuntu's final tree at040d304c75b9: 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.patch -p1against a pristine 6.12.35 tree — the exact invocationbuild.shuses — and reproduces the validated file byte-for-byte.drivers/pci/controller/vmd.obuilds cleanly (zero warnings atW=1) against vanilla 6.12.35 configured withconfigs/kernelx64.config(CONFIG_VMD=y).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