Skip to content

xrt-smi: enumerate PF and VF devices for SR-IOV - #9977

Merged
stsoe merged 1 commit into
Xilinx:masterfrom
aktondak:sriov_handling
Aug 13, 2026
Merged

xrt-smi: enumerate PF and VF devices for SR-IOV#9977
stsoe merged 1 commit into
Xilinx:masterfrom
aktondak:sriov_handling

Conversation

@aktondak

@aktondak aktondak commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

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 :

System Configuration
  OS Name              : Linux
  Release              : 7.1.0-rc7
  Machine              : x86_64
  CPU Cores            : 20
  Memory               : 31344 MB
  Distribution         : Ubuntu 24.04.3 LTS
  GLIBC                : 2.39
  Model                : Plum-MDS1
  BIOS Vendor          : AMD
  BIOS Version         : WMP66603N_239
  Processor            : AMD Eng Sample: 100-000001713-33_N

XRT
  Version              : 2.26.0
  Branch               : master
  Hash                 : 270ba11886e2e3cf5530deedd96ca7090e34d5fc
  Hash Date            : Wed, 5 Aug 2026 16:31:12 -0700
  amdxdna Version      : 2.26.0_20260806, f7965010734f044eeaf05b2bb575e44f0b7f7960
  virtio-pci Version   : 7.1.0-rc7
  NPU Firmware Version : 2.5.0.172
  CERT Firmware Version: 1.5.0.39

Device(s) Present
|BDF             |Name             |Architecture  |Topology  |
|----------------|-----------------|--------------|----------|
|[0000:c6:00.1]  |RyzenAI-npu9-vf  |aie4          |6x3       |
|[0000:c6:00.3]  |RyzenAI-npu9-vf  |aie4          |6x3       |
|[0000:c6:00.5]  |RyzenAI-npu9-vf  |aie4          |6x3       |
|[0000:c6:00.7]  |RyzenAI-npu9-vf  |aie4          |6x3       |
|[0000:c5:00.1]  |RyzenAI-npu9-pf  |aie4          |N/A       |

Documentation impact (if any)

None

@github-actions

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@aktondak
aktondak force-pushed the sriov_handling branch 2 times, most recently from b967cf4 to fc972f7 Compare August 10, 2026 19:52
@github-actions

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@github-actions

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@github-actions

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@aktondak
aktondak requested review from xdavidz and removed request for xdavidz August 10, 2026 22:08
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();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

@github-actions

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@aktondak aktondak added the do not merge hold off on merging label Aug 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@aktondak
aktondak requested review from maxzhen and sonals August 12, 2026 21:37
Extend xrt-smi user-domain enumeration to include management PF devices
on Ryzen (NPU) platforms only, show user/mgmt in the host report Device ID
column, and default to the first enumerated device when --device is omitted
on multi-device hosts. Skip the default device when none are present so
no-device CI environments can still run host-only examine reports.

Signed-off-by: Akshay Tondak <[email protected]>
Co-authored-by: Cursor <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@stsoe
stsoe merged commit e9db9ab into Xilinx:master Aug 13, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge hold off on merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants