On Tue, Sep 15, 2026 at 13:46:16 +0000, David Vrabel wrote:
When a VM has been assigned a number of PCIe devices behind a common PCIe switch and the VM intends to use peer-to-peer (P2P) transfers between the devices, it is useful to be able to more report the apparent PCIe bandwidth so it reflects the real handwidth of the underlying hardware. This allows software in the VM (such as NCCL[1]) to make better decisions about whether to use P2P or not.
Newer versions[1] of QEMU will support new upstream and downstream port models that have configurable speed and width properties and extend the existing root port model to support the same options.
If supported by QEMU, prefer the new upstream and downstream port models, and support new attributes to set the speed and width.
David
[1] See patches here:
https://patchew.org/QEMU/20260908155223.164787-1-david.vrabel@nutanix.com/
These are not merged upstream. Patches you propose here will need to wait until that happens. Proposing patches like this is okay (but you should next time make it more obvious). What is not okay is messing with the capability dump as you did in patch 2. Once your qemu patches get merged to the master branch upstream let me know and I'll regenerate the capability dump so that the property is properly present. Do not change it in existing dump files.