Skip to content

Conversation

jackschefer-msft
Copy link
Contributor

This change introduces a new pcie crate, which contains emulators for PCI Express topology components.

Additional support for endpoints will come in subsequent PRs.

@jackschefer-msft jackschefer-msft requested a review from a team October 3, 2025 19:39
@jackschefer-msft jackschefer-msft requested review from a team as code owners October 3, 2025 19:39
@Copilot Copilot AI review requested due to automatic review settings October 3, 2025 19:39
Copy link
Contributor

@Copilot 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 introduces a new pcie crate containing emulators for PCI Express topology components, specifically focusing on root complex and root port emulation. The main purpose is to provide PCIe infrastructure support for OpenVMM.

Key changes include:

  • Introduction of the GenericPcieRootComplex emulator as a ChipsetDevice
  • Implementation of ECAM MMIO intercept registration and configuration space probing
  • Integration of the new PCIe emulators into OpenVMM's chipset builder

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
vm/devices/pci/pcie/Cargo.toml New crate definition with required dependencies for PCIe emulation
vm/devices/pci/pcie/src/lib.rs Core constants and module definitions for PCIe emulation
vm/devices/pci/pcie/src/root.rs Implementation of GenericPcieRootComplex and RootPort emulators with ECAM support
vm/devices/pci/pcie/src/test_helpers.rs Test utilities for PCIe emulation including mock MMIO registration and endpoint implementations
openvmm/hvlite_core/Cargo.toml Added pcie crate dependency
openvmm/hvlite_core/src/worker/dispatch.rs Integration of GenericPcieRootComplex into OpenVMM's chipset builder
Cargo.toml Added pcie workspace member

Copy link

@amy-microsoft amy-microsoft left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for addressing feedback. Great to see this coming along so well!

@amy-msft amy-msft removed their assignment Oct 8, 2025
@jackschefer-msft jackschefer-msft merged commit a851a58 into microsoft:main Oct 8, 2025
29 checks passed
@jackschefer-msft jackschefer-msft deleted the pcie-rc-rp-emu branch October 8, 2025 19:27
const PAGE_SHIFT: u32 = PAGE_SIZE.trailing_zeros();

const VENDOR_ID: u16 = 0x1414;
const ROOT_PORT_DEVICE_ID: u16 = 0xF111;
Copy link
Contributor

Choose a reason for hiding this comment

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

Note that all MSFT device IDs are managed and we will need to grant you with several device IDs to be used by virtual root ports and switch ports.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Definitely, I am asking around about this, this particular ID is a placeholder to stand things up (that probably warranted a comment in the code, thanks for mentioning it)

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.

5 participants