-
Notifications
You must be signed in to change notification settings - Fork 156
openvmm/pcie: introduce and consume pcie root complex and port emulators #2081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
openvmm/pcie: introduce and consume pcie root complex and port emulators #2081
Conversation
There was a problem hiding this 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 aChipsetDevice
- 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 |
There was a problem hiding this 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!
const PAGE_SHIFT: u32 = PAGE_SIZE.trailing_zeros(); | ||
|
||
const VENDOR_ID: u16 = 0x1414; | ||
const ROOT_PORT_DEVICE_ID: u16 = 0xF111; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
This change introduces a new
pcie
crate, which contains emulators for PCI Express topology components.GenericPcieRootComplex
emulator, aChipsetDevice
GenericPcieRootComplex
emulators in OpenVMM based on the configuration changes in openvmm/vmcore: Add PCIe root complex support from CLI through ACPI generation #2027Additional support for endpoints will come in subsequent PRs.