kerf: preserve PCI host bridge metadata - #11
Draft
nickolaev wants to merge 2 commits into
Draft
Conversation
nickolaev
force-pushed
the
sriov-vf-assignment
branch
2 times, most recently
from
July 30, 2026 16:41
2a44f01 to
d98d1e8
Compare
Kerf rebuilds an instance device tree from the parsed baseline. Dropping pci-host-bridges during that round trip leaves the spawned kernel without the immutable ECAM descriptors required to construct its synthetic PCI roots. Add a PCI host-bridge model, parse it from binary and source device trees, validate segment and bus ranges, ECAM alignment, and overlap, and emit the metadata into generated instance trees. Cover valid round trips and malformed descriptors in the baseline tests. Signed-off-by: Nikolay Nikolaev <nicknickolaev@gmail.com>
The device-tree compiler can render CPU lists with an explicit /bits/ width and hexadecimal cells. Treating that syntax as plain decimal values makes Kerf reject valid extracted instance trees.\n\nAccept the 32-bit and 64-bit forms, parse each cell with base detection, and limit the lookup to direct /resources properties so nested NUMA CPU lists cannot shadow the global inventory. Cover the legacy and explicit-width forms in the parser tests.\n\nSigned-off-by: Nikolay Nikolaev <nicknickolaev@gmail.com>
nickolaev
force-pushed
the
sriov-vf-assignment
branch
from
July 30, 2026 22:05
d98d1e8 to
5104ec1
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.
Kerf must preserve PCI host-bridge information when parsing and generating Multikernel device trees. A spawned kernel
needs the PCI segment, bus range, and ECAM base to discover and access its assigned SR-IOV VF.
This change:
This complements the Linux SR-IOV assignment work in multikernel/linux#4.