]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: Remove dubious code from virDomainPCIAddressSetGrow()
authorAndrea Bolognani <abologna@redhat.com>
Tue, 27 Mar 2018 12:23:29 +0000 (14:23 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 9 Apr 2018 07:12:21 +0000 (09:12 +0200)
I haven't been able to come up with a single scenario in which
the code in question would be executed; even if there was one,
it would be due to the user specifying a *partial* PCI topology
in the guest XML, which is of course entirely unsupportable and
thus providing even the slightest hint that doing so is in any
way a good idea is actively harmful.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/conf/domain_addr.c

index ca50dc70ce33fd10216aa38e1df1aec155174e53..8964973e03a9984220380a8e7e0ee4025532c7a8 100644 (file)
@@ -477,15 +477,6 @@ virDomainPCIAddressSetGrow(virDomainPCIAddressSetPtr addrs,
                 addr->bus++;
             }
         }
-    } else if (flags & VIR_PCI_CONNECT_TYPE_PCI_BRIDGE &&
-               addrs->buses[0].model == VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT) {
-        /* NB: if the root bus is pci-root, and we couldn't find an
-         * open place to connect a pci-bridge, then there is nothing
-         * we can do (since the only way to gain a new slot that
-         * accepts a pci-bridge is to add *a pci-bridge* (which is the
-         * reason we're here in the first place!)
-         */
-        model = VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE;
     } else if (flags & (VIR_PCI_CONNECT_TYPE_PCIE_DEVICE |
                         VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_UPSTREAM_PORT)) {
         model = VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT;