For guests with passthrough PCIe devices, in order to make the guest PCIe topology have the same apparent bandwidth as the underlying hardware we need to be able to set the capabilities (speed and width) of the virtual root, upstream, and downstream ports.
Promote the existing experimental `x-speed` and `x-width` options to non-experimental `speed` and `width`. Signed-off-by: David Vrabel <[email protected]> --- hw/pci-bridge/gen_pcie_downstream_port.c | 4 ++-- hw/pci-bridge/gen_pcie_root_port.c | 4 ++-- hw/pci-bridge/gen_pcie_upstream_port.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/pci-bridge/gen_pcie_downstream_port.c b/hw/pci-bridge/gen_pcie_downstream_port.c index d593846ac1..8fe71382aa 100644 --- a/hw/pci-bridge/gen_pcie_downstream_port.c +++ b/hw/pci-bridge/gen_pcie_downstream_port.c @@ -163,9 +163,9 @@ static const VMStateDescription vmstate_gen_pcie_downstream_port = { static const Property gen_pcie_downstream_port_props[] = { DEFINE_PROP_BIT(COMPAT_PROP_PCP, PCIDevice, cap_present, QEMU_PCIE_SLTCAP_PCP_BITNR, true), - DEFINE_PROP_PCIE_LINK_SPEED("x-speed", PCIESlot, + DEFINE_PROP_PCIE_LINK_SPEED("speed", PCIESlot, speed, PCIE_LINK_SPEED_64), - DEFINE_PROP_PCIE_LINK_WIDTH("x-width", PCIESlot, + DEFINE_PROP_PCIE_LINK_WIDTH("width", PCIESlot, width, PCIE_LINK_WIDTH_32), }; diff --git a/hw/pci-bridge/gen_pcie_root_port.c b/hw/pci-bridge/gen_pcie_root_port.c index 5434d693d9..d3ace7f0db 100644 --- a/hw/pci-bridge/gen_pcie_root_port.c +++ b/hw/pci-bridge/gen_pcie_root_port.c @@ -129,9 +129,9 @@ static const Property gen_rp_props[] = { res_reserve.mem_pref_32, -1), DEFINE_PROP_SIZE("pref64-reserve", GenPCIERootPort, res_reserve.mem_pref_64, -1), - DEFINE_PROP_PCIE_LINK_SPEED("x-speed", PCIESlot, + DEFINE_PROP_PCIE_LINK_SPEED("speed", PCIESlot, speed, PCIE_LINK_SPEED_16), - DEFINE_PROP_PCIE_LINK_WIDTH("x-width", PCIESlot, + DEFINE_PROP_PCIE_LINK_WIDTH("width", PCIESlot, width, PCIE_LINK_WIDTH_32), }; diff --git a/hw/pci-bridge/gen_pcie_upstream_port.c b/hw/pci-bridge/gen_pcie_upstream_port.c index 57d7e09485..edd5bfcafc 100644 --- a/hw/pci-bridge/gen_pcie_upstream_port.c +++ b/hw/pci-bridge/gen_pcie_upstream_port.c @@ -139,9 +139,9 @@ static const VMStateDescription vmstate_gen_pcie_upstream_port = { }; static const Property gen_pcie_upstream_port_props[] = { - DEFINE_PROP_PCIE_LINK_SPEED("x-speed", GenPCIEUpstreamPort, + DEFINE_PROP_PCIE_LINK_SPEED("speed", GenPCIEUpstreamPort, speed, PCIE_LINK_SPEED_64), - DEFINE_PROP_PCIE_LINK_WIDTH("x-width", GenPCIEUpstreamPort, + DEFINE_PROP_PCIE_LINK_WIDTH("width", GenPCIEUpstreamPort, width, PCIE_LINK_WIDTH_32), }; -- 2.43.0
