Skip to content

kerf: preserve PCI host bridge metadata#11

Draft
nickolaev wants to merge 1 commit into
multikernel:mainfrom
nickolaev:sriov-vf-assignment
Draft

kerf: preserve PCI host bridge metadata#11
nickolaev wants to merge 1 commit into
multikernel:mainfrom
nickolaev:sriov-vf-assignment

Conversation

@nickolaev

Copy link
Copy Markdown

Kerf currently drops PCI host-bridge information when it parses and rewrites a
Multikernel device tree. As a result, a spawned kernel may receive its assigned
PCI device without the ECAM metadata needed to discover and access it.

This change:

  • adds PCI host bridges to Kerf’s hardware model;
  • parses the metadata from both DTB and DTS input;
  • validates segments, bus ranges, ECAM alignment, and overlapping ranges; and
  • preserves the metadata when generating an instance device tree.

Device trees without a pci-host-bridges section continue to work unchanged.

This complements the Linux SR-IOV assignment series, allowing the secondary
kernel to discover its assigned VF while the primary retains the PF.

Works alongside the relevant SR-IOV changes in the kernel multikernel/linux#4 .

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.

1 participant