]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: restrict what type of buses will accept a pci-bridge
authorLaine Stump <laine@laine.org>
Sun, 7 Aug 2016 21:13:58 +0000 (17:13 -0400)
committerLaine Stump <laine@laine.org>
Fri, 14 Oct 2016 18:32:42 +0000 (14:32 -0400)
commit538220c3c42cad0adbd818b6a931c69492a572de
treecc520625a02397f0784b961d979d7c2fc40be32b
parentf29b13f8307985cffbd8a1a8c25bc4421db6f8a5
conf: restrict what type of buses will accept a pci-bridge

A pci-bridge has *almost* the same rules as a legacy PCI endpoint
device for where it can be automatically connected, and until now both
had been considered identical. There is one pairing that is okay when
specifically requested by the user (i.e. manual assignment), but we
want to avoid it when auto-assigning addresses - plugging a pci-bridge
directly into pcie-root (it is cleaner to plug in a dmi-to-pci-bridge,
then plug the pci-bridge into that).

In order to allow that difference, this patch makes a separate
CONNECT_TYPE for pci-bridge, and uses it to restrict auto-assigned
addresses for pci-bridges to be only on pci-root, pci-expander-bus,
dmi-to-pci-bridge, or on another pci-bridge.

NB: As with other discouraged-but-seem-to-work configurations
(e.g. plugging a legacy PCI device into a pcie-root-port) if someone
*really* wants to, they can still force a pci-bridge to be plugged
into pcie-root (by manually specifying its PCI address.)
src/conf/domain_addr.c
src/conf/domain_addr.h