Conversation
Introduce PciExpressCap modelling the PCI Express Capability along with a ctor for a root port device. Signed-off-by: Ilias Stamatis <ilstam@amazon.com>
PciConfiguration only supported Type 0 headers until now. Add new_type1() for PCI-to-PCI bridges such as PCIe root ports. Signed-off-by: Ilias Stamatis <ilstam@amazon.com>
Add a hot-plug capable PCIe root port model: a Type 1 header with a PCI Express Capability advertising a hot-plug capable slot, plus a one-vector MSI-X capability for delivering hot-plug events. This patch only defines the device model, no root ports are introduced in the topology yet. Signed-off-by: Ilias Stamatis <ilstam@amazon.com>
Add unit tests that cover the root port's configuration header and PCI Express Capability, the Slot Control / Slot Status register semantics, hot-plug interrupt gating and the power-indicator-off acknowledgement. Signed-off-by: Ilias Stamatis <ilstam@amazon.com>
Add a machine-config option for the number of PCIe root ports to create. Each port accepts a single hot-plugged device, so this is the maximum number of devices that can be hot-plugged into the VM. Setting the option does not modify the PCI bus topology yet. Signed-off-by: Ilias Stamatis <ilstam@amazon.com>
Create the number of PCI root ports the user has requested and attach them to the primary PCI bus. The root ports are provisioned after the boot devices have been attached, so they take the root bus slots that follow them. Secondary bus numbers are handed out by port index rather than by the slot each port ended up in so they stay contiguous starting from 1. Signed-off-by: Ilias Stamatis <ilstam@amazon.com>
Add unit tests for root port provisioning and move the mock PCI device out of test_next_device_bdf() to module scope so that other tests can use it. Signed-off-by: Ilias Stamatis <ilstam@amazon.com>
ilstam
marked this pull request as ready for review
September 17, 2026 17:15
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## ilstam-hotplug-1 #6227 +/- ##
====================================================
- Coverage 83.07% 82.99% -0.09%
====================================================
Files 277 279 +2
Lines 31508 31826 +318
====================================================
+ Hits 26176 26414 +238
- Misses 5332 5412 +80
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ilstam
added this pull request to stack #6230
September 17, 2026 17:16
This will allow hot-plugging test to allocate the necessary number of ports using @pin_hotplug_ports(n). Signed-off-by: Ilias Stamatis <ilstam@amazon.com>
Add a new test_pci_topology.py file with tests about the PCI topology when root ports are and are not provisioned. Signed-off-by: Ilias Stamatis <ilstam@amazon.com>
ilstam
force-pushed
the
ilstam-hotplug-2
branch
from
September 17, 2026 18:11
84fa2db to
81b9cb4
Compare
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.
This PR introduces a new PCIe root port device model and a way for the user to provision root ports.