vmm_tests: boot UEFI NVMe across multiple root complexes#3772
Draft
jstarks wants to merge 1 commit into
Draft
Conversation
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.
Member
Author
|
This is in draft until microsoft/mu_msvm#87 is merged and we update our UEFI dependency. |
Contributor
There was a problem hiding this comment.
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_bootto build a 5-root-complex, 2-segment topology and boot from an NVMe controller not on the first root complex. - Made
with_pcie_root_topologyadditive so it can be called multiple times to construct asymmetric topologies. - Added
PetriVmBuilder::with_pcie_boot_portto select which PCIe root port hosts the boot NVMe controller (default remainss0rc0rp0).
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; |
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.
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.