xrt-smi: enumerate PF and VF devices for SR-IOV - #9977
Open
aktondak wants to merge 1 commit into
Open
Conversation
aktondak
requested review from
AShivangi,
chvamshi-xilinx,
rbramand-xilinx and
stsoe
as code owners
August 10, 2026 18:26
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
aktondak
force-pushed
the
sriov_handling
branch
2 times, most recently
from
August 10, 2026 19:52
b967cf4 to
fc972f7
Compare
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
aktondak
force-pushed
the
sriov_handling
branch
from
August 10, 2026 20:30
fc972f7 to
aa31fab
Compare
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
Use get_available_bdfs for default -d resolution in both xrt-smi and xbmgmt so domain-aware device selection works without a VF-only helper. Update multi-device NOTE to report the selected BDF as running target. Signed-off-by: Akshay Tondak <aktondak@amd.com> Co-authored-by: Cursor <cursoragent@cursor.com>
aktondak
force-pushed
the
sriov_handling
branch
from
August 10, 2026 21:02
aa31fab to
af4263f
Compare
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
rchane
reviewed
Aug 10, 2026
| if (vm["device"].defaulted() && available_devices.size() > 1) { | ||
| const auto bdf = xrt_core::query::pcie_bdf::to_string( | ||
| xrt_core::device_query<xrt_core::query::pcie_bdf>(device)); | ||
| std::cout << (boost::format("NOTE: Multiple devices found, running for '%s'\n\n") % bdf).str(); |
Collaborator
There was a problem hiding this comment.
Thanks for including this warning, but can we get approval for this behavioral change? There are also edge cases that we should verify, like if running validate should happen on one or multiple devices in the same system.
AShivangi
approved these changes
Aug 10, 2026
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.
Problem solved by the commit
This PR extends user-domain device enumeration to include mgmt PF devices alongside user VFs, dedupe duplicate amdxdna driver version lines, and update the PCI hardware map with explicit npu7-npu11 PF/VF entries.
Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered
https://jira.xilinx.com/browse/AIESW-40239
https://jira.xilinx.com/browse/AIESW-40240
Discovered through internal SRIOV efforts
How problem was solved, alternative solutions (if any) and why they were rejected
Solved via handling PF specific dev ids and altering xrt-smi to enumerate pf devices as well.
This future work for this effort is to decide on the list of commands applicable to PF devices and handling pf specific configuration generation to run specific commands on pf devices.
The change also relaxes the multiple devices case and allows running on first device when -d is not specified.
Risks (if any) associated the changes in the commit
This is a new addition and should not affect existing flows
What has been tested and how, request additional testing if necessary
Tested on a custom SRIOV setup on linux device :
Documentation impact (if any)
None