On Tue, Sep 15, 2026 at 13:46:17 +0000, David Vrabel wrote:
QEMUs pcie-upstream-port and pcie-downstream-port devices are more capable generic replacements for the x3130-upstream and xio3130-downstream devices which emulate a vintage TI XIO3130 PCIe switch.
If QEMU supports the pcie-upstream-port and pcie-downstream-port devices, prefer these over the older XIO3130 devices.
This useful when used with passthrough devices to make the in-guest apparent bandwidth match the hardware bandwidth as the XIO3130 ports are limited to 2.5 GT/s and x1 but the generic ports report 64 GT/s and x32. This allows in-guest software (such as NCCL) to make better decisions about whether to use P2P transfers etc.
Signed-off-by: David Vrabel <david.vrabel@nutanix.com> --- src/conf/domain_conf.c | 2 + src/conf/domain_conf.h | 2 + src/conf/schemas/domaincommon.rng | 2 + src/qemu/qemu_capabilities.c | 250 +++++++++--------- src/qemu/qemu_capabilities.h | 248 ++++++++--------- src/qemu/qemu_domain_address.c | 10 +- src/qemu/qemu_validate.c | 10 +- ...ream-port-model-generic.x86_64-latest.args | 47 ++++ ...tream-port-model-generic.x86_64-latest.xml | 91 +++++++ ...e-switch-downstream-port-model-generic.xml | 44 +++ ...ream-port-model-generic.x86_64-latest.args | 42 +++ ...tream-port-model-generic.x86_64-latest.xml | 66 +++++ ...cie-switch-upstream-port-model-generic.xml | 37 +++ tests/qemuxmlconftest.c | 2 + 14 files changed, 603 insertions(+), 250 deletions(-) create mode 100644 tests/qemuxmlconfdata/pcie-switch-downstream-port-model-generic.x86_64-latest.args create mode 100644 tests/qemuxmlconfdata/pcie-switch-downstream-port-model-generic.x86_64-latest.xml create mode 100644 tests/qemuxmlconfdata/pcie-switch-downstream-port-model-generic.xml create mode 100644 tests/qemuxmlconfdata/pcie-switch-upstream-port-model-generic.x86_64-latest.args create mode 100644 tests/qemuxmlconfdata/pcie-switch-upstream-port-model-generic.x86_64-latest.xml create mode 100644 tests/qemuxmlconfdata/pcie-switch-upstream-port-model-generic.xml
[...]
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index bc2b0412dc..091eb88729 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -343,436 +343,438 @@ VIR_ENUM_IMPL(virQEMUCaps, "ioh3420", /* QEMU_CAPS_DEVICE_IOH3420 */ "x3130-upstream", /* QEMU_CAPS_DEVICE_X3130_UPSTREAM */ "xio3130-downstream", /* QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM */ - "rtl8139", /* QEMU_CAPS_DEVICE_RTL8139 */ + "pcie-upstream-port", /* QEMU_CAPS_DEVICE_PCIE_UPSTREAM_PORT */
/* 195 */ + "pcie-downstream-port", /* QEMU_CAPS_DEVICE_PCIE_DOWNSTREAM_PORT */ + "rtl8139", /* QEMU_CAPS_DEVICE_RTL8139 */
We consider this list append-only so you must not add stuff randomly in the middle of the list. Also any patch adding a new capability must be a separate standalone commit. The patch also misses any update to the capability outputs, which is something I'd expect if a new capability is added. [...]