Skip to content

Conversation

@christoph-zededa
Copy link
Contributor

the iommu group is important when using pci-passthrough as the whole group has to be passed through (unless using some hacks). Therefore it is an important piece of information that should be part of pci.Device.

@christoph-zededa
Copy link
Contributor Author

Unfortunately the testdata snapshots are missing iommu_group, because https://github.com/jaypipes/ghw/pull/430/files#diff-c323fae3280c0026e1b7b84ae55a794abb3e4c6e9643284700f9bc4420936ee0R65 is not in main branch yet.

I am not sure if I should add another snapshot from my laptop?

@jaypipes
Copy link
Owner

Unfortunately the testdata snapshots are missing iommu_group, because https://github.com/jaypipes/ghw/pull/430/files#diff-c323fae3280c0026e1b7b84ae55a794abb3e4c6e9643284700f9bc4420936ee0R65 is not in main branch yet.

I am not sure if I should add another snapshot from my laptop?

@christoph-zededa yep, go for it! :)

@christoph-zededa christoph-zededa force-pushed the pci_iommu_group branch 2 times, most recently from d749e83 to a132eea Compare October 27, 2025 15:48
@christoph-zededa
Copy link
Contributor Author

Unfortunately the testdata snapshots are missing iommu_group, because https://github.com/jaypipes/ghw/pull/430/files#diff-c323fae3280c0026e1b7b84ae55a794abb3e4c6e9643284700f9bc4420936ee0R65 is not in main branch yet.
I am not sure if I should add another snapshot from my laptop?

@christoph-zededa yep, go for it! :)

done.

@christoph-zededa christoph-zededa marked this pull request as ready for review October 27, 2025 15:48
Copy link
Owner

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

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

couple tiny requests inline, thank you @christoph-zededa :)

pkg/pci/pci.go Outdated
Driver string `json:"driver"`
Node *topology.Node `json:"node,omitempty"`
Driver string `json:"driver"`
IommuGroup string `json:"iommu_group"`
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
IommuGroup string `json:"iommu_group"`
IOMMUGroup string `json:"iommu_group"`

See here for a discussion on naming conventions for Initialisms in Go.

Copy link
Owner

Choose a reason for hiding this comment

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

Also, if you could add a code comment above IOMMUGroup that explains the field's value, including perhaps a link to this document.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed it to IOMMUGroup and I added the link.

@christoph-zededa christoph-zededa force-pushed the pci_iommu_group branch 3 times, most recently from c659bac to e22af2b Compare October 28, 2025 11:00
@jaypipes
Copy link
Owner

@christoph-zededa not entirely sure what happened to this PR... did you push commits from a different branch into yours? Typically what you want to do is git rebase to pull in commits from a main or upstream branch.

this snapshot includes the iommu_group of the pci devices,
so that it can be tested from the go tests.

Signed-off-by: Christoph Ostarek <[email protected]>
the iommu group is important when using pci-passthrough
as the whole group has to be passed through (unless
using some hacks). Therefore it is an important piece
of information that should be part of `pci.Device`.

Signed-off-by: Christoph Ostarek <[email protected]>
@christoph-zededa
Copy link
Contributor Author

@christoph-zededa not entirely sure what happened to this PR... did you push commits from a different branch into yours? Typically what you want to do is git rebase to pull in commits from a main or upstream branch.

Hmm, weird. Now it looks ok to me (i.e. 2 commits in this PR).

Copy link
Owner

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

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

👍 thank you @christoph-zededa! :)

@jaypipes jaypipes merged commit 5595b94 into jaypipes:main Oct 28, 2025
14 checks passed
@christoph-zededa
Copy link
Contributor Author

👍 thank you @christoph-zededa! :)

thank you for the help and your review :-)

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