Skip to content

vmm_tests: boot UEFI NVMe across multiple root complexes#3772

Draft
jstarks wants to merge 1 commit into
microsoft:mainfrom
jstarks:uefi_multi_rc
Draft

vmm_tests: boot UEFI NVMe across multiple root complexes#3772
jstarks wants to merge 1 commit into
microsoft:mainfrom
jstarks:uefi_multi_rc

Conversation

@jstarks

@jstarks jstarks commented Jun 17, 2026

Copy link
Copy Markdown
Member

Extend pcie_nvme_boot to cover a richer PCIe topology: five root complexes split asymmetrically across two segments, booting from an NVMe controller that is not on the first root complex. This exercises UEFI's enumeration of multiple root complexes sharing segment numbers, which the prior single-RC topology never touched.

Supporting this, with_pcie_root_topology is now additive (successive calls append to fresh segments), and a new with_pcie_boot_port allows placing the boot NVMe controller on a port other than s0rc0rp0.

Extend pcie_nvme_boot to cover a richer PCIe topology: five root
complexes split asymmetrically across two segments, booting from an
NVMe controller that is not on the first root complex. This exercises
UEFI's enumeration of multiple root complexes sharing segment numbers,
which the prior single-RC topology never touched.

Supporting this, with_pcie_root_topology is now additive (successive
calls append to fresh segments), and a new with_pcie_boot_port allows
placing the boot NVMe controller on a port other than s0rc0rp0.
Copilot AI review requested due to automatic review settings June 17, 2026 22:15
@jstarks

jstarks commented Jun 17, 2026

Copy link
Copy Markdown
Member Author

This is in draft until microsoft/mu_msvm#87 is merged and we update our UEFI dependency.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Extends the existing PCIe/NVMe UEFI boot test to cover a more complex, asymmetric PCIe topology (multiple root complexes across two segments) and introduces supporting Petri configuration knobs to place the boot NVMe controller on a non-default root port.

Changes:

  • Expanded pcie_nvme_boot to build a 5-root-complex, 2-segment topology and boot from an NVMe controller not on the first root complex.
  • Made with_pcie_root_topology additive so it can be called multiple times to construct asymmetric topologies.
  • Added PetriVmBuilder::with_pcie_boot_port to select which PCIe root port hosts the boot NVMe controller (default remains s0rc0rp0).

Reviewed changes

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

File Description
vmm_tests/vmm_tests/tests/tests/multiarch/pcie.rs Updates pcie_nvme_boot to use an asymmetric multi-segment topology and assert both NVMe controllers enumerate.
petri/src/vm/openvmm/modify.rs Updates with_pcie_root_topology so successive calls append new segments/RCs rather than restarting numbering.
petri/src/vm/mod.rs Adds a builder option/method to override the boot NVMe controller’s PCIe port for BootDeviceType::PcieNvme.

.map(|rc| u64::from(rc.segment) + 1)
.max()
.unwrap_or(0);
let index_base = self.config.pcie_root_complexes.len() as u64;
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.

2 participants