Skip to content

Conversation

@seijikun
Copy link
Contributor

@seijikun seijikun commented Nov 21, 2025

  • Refactored return type from standard BTreeSet<PciIoAddress> to custom PciTree struct with tree topology information
  • Removed special FullPciIoAddress type, since segment number is fixed per PciRoot
  • During enumeration, skip branches we have already seen
  • During enumeration, collect tree topology information (which child bus linked from where)
  • Add complicated pci structure in integration test vm
  • Print child busses for every device entry in integration test

Previously, we iterated over the bus range from the ACPI descriptor. I changed this in my last MR to only visit the first in the range. I changed this back to iterate over all of the entries, but skip the ones we have seen previously - now that that's easily possible. I decided that better safe than sorry is the best way. The iteration over all child busses already saved our ass once - let's not willingly take this safety net away. Sorry for the back and forth here.

The plan for device paths is now to add something like: PciTree::device_path(&self, addr: PciIoAddress) -> PoolDevicePath.

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See the Rewriting History guide for help.
  • Update the changelog (if necessary)

Copy link
Member

@phip1611 phip1611 left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! My main concern is my lack of domain knowledge of PCIe. Please elaborate a little more to help me understand what's going on :)

@seijikun seijikun force-pushed the mr-pci-enumerate3 branch 2 times, most recently from 602c776 to a82b06c Compare November 22, 2025 11:26
@seijikun seijikun requested a review from phip1611 November 22, 2025 12:08
Copy link
Member

@phip1611 phip1611 left a comment

Choose a reason for hiding this comment

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

We're almost there! Just a few nits

@seijikun seijikun force-pushed the mr-pci-enumerate3 branch 2 times, most recently from e6d359c to de89b6d Compare November 23, 2025 11:20
@seijikun seijikun requested a review from phip1611 November 23, 2025 13:06
…ation

- Refactored return type from standard BTreeSet to custom PciTree struct
- Removed special FullPciIoAddress type, since segment number is PciRoot dependent
- During enumeration, skip branches we have already seen
- During enumeration, collect tree topology information (which child bus linked from where)
- Add complicated pci structure in integration test vm
- Print child busses for every device entry in integration test
@seijikun
Copy link
Contributor Author

Okay, I think I got everything. I now went with PciTree::child_bus_of_iter().

Copy link
Member

@phip1611 phip1611 left a comment

Choose a reason for hiding this comment

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

LGTM! @nicholasbishop would you mind to also look over this? I think you might have more PCI(e) knowledge than I do

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