Skip to content

openvmm_entry,vmm_core: unblock and test pcie with x64 linux direct#2904

Merged
jackschefer-msft merged 2 commits intomicrosoft:mainfrom
jackschefer-msft:pcie-linux-direct
Mar 9, 2026
Merged

openvmm_entry,vmm_core: unblock and test pcie with x64 linux direct#2904
jackschefer-msft merged 2 commits intomicrosoft:mainfrom
jackschefer-msft:pcie-linux-direct

Conversation

@jackschefer-msft
Copy link
Contributor

This change:

  • Moves ECAM below 4G to appease the linux kernel
  • Removes the legacy PCI bus from unenlightened linux direct
  • Generates ACPI tables (an SSDT) describing PCIe roots for x64 linux direct like we do for UEFI

@jackschefer-msft jackschefer-msft requested a review from a team as a code owner March 6, 2026 20:11
Copilot AI review requested due to automatic review settings March 6, 2026 20:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables PCIe support for x64 Linux direct boot in OpenVMM by addressing three issues that prevented it from working: the ECAM was placed above 4GB (at 32GB) which the Linux kernel doesn't support, the legacy PCI bus conflicted with PCIe, and ACPI tables describing PCIe roots (SSDT) were not generated for the Linux direct path.

Changes:

  • Moves the PCIe ECAM region below 4GB by placing it just below the low PCI MMIO range (which is itself below the platform MMIO gap), instead of at a fixed 32GB base address. Removes the now-unused DEFAULT_PCIE_ECAM_BASE constant.
  • Removes the legacy PCI bus from unenlightened Linux direct boot (with_generic_pci_bus: false) to avoid conflicts with PCIe.
  • Generates ACPI SSDT tables describing PCIe root complexes in the common build_acpi_tables_inner path (used by Linux direct), matching what was already done for UEFI. Adds a linux_direct_x64 test variant and updates PCI device parsing to use sysfs and full 24-bit class codes.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
openvmm/openvmm_defs/src/config.rs Removes the DEFAULT_PCIE_ECAM_BASE constant (was 32GB, above 4G)
openvmm/openvmm_entry/src/lib.rs Restructures ECAM placement to be below low PCI MMIO (below 4G), removes DEFAULT_PCIE_ECAM_BASE import
vmm_core/vm_manifest_builder/src/lib.rs Sets with_generic_pci_bus: false for UnenlightenedLinuxDirect; updates doc comment
vmm_core/src/acpi_builder.rs Adds SSDT generation for PCIe host bridges in build_acpi_tables_inner, used by Linux direct boot
vmm_tests/vmm_tests/tests/tests/multiarch/pcie.rs Adds linux_direct_x64 test variant, switches Linux PCI enumeration from lspci to sysfs, changes class_code from u16 to u32 (full 24-bit class code)

@github-actions
Copy link

github-actions bot commented Mar 6, 2026

@jackschefer-msft jackschefer-msft requested a review from a team March 6, 2026 23:05
@jackschefer-msft jackschefer-msft merged commit da4a1ae into microsoft:main Mar 9, 2026
56 checks passed
@jackschefer-msft jackschefer-msft deleted the pcie-linux-direct branch March 9, 2026 16:38
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.

3 participants