The pcie-root-port device in (the future) QEMU 11.2 supports "width" and "speed" properties for setting the (apparent) link bandwidth. The new pcie-upstream-port and pcie-downstream-port devices always support these properties. See also QEMU commit 432b3f707a3c (hw/pci-bridge: Make speed and width for PCIe ports non-experimental). Signed-off-by: David Vrabel <david.vrabel@nutanix.com> --- src/qemu/qemu_capabilities.c | 6 ++++++ src/qemu/qemu_capabilities.h | 4 ++++ tests/qemucapabilitiesdata/caps_11.2.0_x86_64.xml | 2 ++ 3 files changed, 12 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index de03a515d1..d8217bd72e 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -778,6 +778,10 @@ VIR_ENUM_IMPL(virQEMUCaps, "win-dmp.guest-aware", /* QEMU_CAPS_WIN_DMP_GUEST_AWARE */ "pcie-upstream-port", /* QEMU_CAPS_DEVICE_PCIE_UPSTREAM_PORT */ "pcie-downstream-port", /* QEMU_CAPS_DEVICE_PCIE_DOWNSTREAM_PORT */ + + /* 505 */ + "pcie-root-port.speed", /* QEMU_CAPS_PCIE_ROOT_PORT_SPEED */ + "pcie-root-port.width", /* QEMU_CAPS_PCIE_ROOT_PORT_WIDTH */ ); @@ -1542,6 +1546,8 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioNet[] = { static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsPCIeRootPort[] = { { "hotplug", QEMU_CAPS_PCIE_ROOT_PORT_HOTPLUG, NULL }, + { "speed", QEMU_CAPS_PCIE_ROOT_PORT_SPEED, NULL }, + { "width", QEMU_CAPS_PCIE_ROOT_PORT_WIDTH, NULL }, }; static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsUSBHost[] = { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 4ee10f18bb..18a21dfaff 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -753,6 +753,10 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ QEMU_CAPS_DEVICE_PCIE_UPSTREAM_PORT, /* -device pcie-upstream-port */ QEMU_CAPS_DEVICE_PCIE_DOWNSTREAM_PORT, /* -device pcie-downstream-port */ + /* 505 */ + QEMU_CAPS_PCIE_ROOT_PORT_SPEED, /* pcie-root-port.speed */ + QEMU_CAPS_PCIE_ROOT_PORT_WIDTH, /* pcie-root-port.width */ + QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_11.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_11.2.0_x86_64.xml index d30e487094..e5ba4520bd 100644 --- a/tests/qemucapabilitiesdata/caps_11.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_11.2.0_x86_64.xml @@ -227,6 +227,8 @@ <flag name='win-dmp.guest-aware'/> <flag name='pcie-upstream-port'/> <flag name='pcie-downstream-port'/> + <flag name='pcie-root-port.speed'/> + <flag name='pcie-root-port.width'/> <version>11001050</version> <microcodeVersion>43100288</microcodeVersion> <package>v11.1.0-1950-gf7ada39eda</package> -- 2.43.0