Laine Stump
0702f48ef4
qemu: auto-add pcie-root-port/dmi-to-pci-bridge controllers as needed
...
Previously libvirt would only add pci-bridge devices automatically
when an address was requested for a device that required a legacy PCI
slot and none was available. This patch expands that support to
dmi-to-pci-bridge (which is needed in order to add a pci-bridge on a
machine with a pcie-root), and pcie-root-port (which is needed to add
a hotpluggable PCIe device). It does *not* automatically add
pcie-switch-upstream-ports or pcie-switch-downstream-ports (and
currently there are no plans for that).
Given the existing code to auto-add pci-bridge devices, automatically
adding pcie-root-ports is fairly straightforward. The
dmi-to-pci-bridge support is a bit tricky though, for a few reasons:
1) Although the only reason to add a dmi-to-pci-bridge is so that
there is a reasonable place to plug in a pci-bridge controller,
most of the time it's not the presence of a pci-bridge *in the
config* that triggers the requirement to add a dmi-to-pci-bridge.
Rather, it is the presence of a legacy-PCI device in the config,
which triggers auto-add of a pci-bridge, which triggers auto-add of
a dmi-to-pci-bridge (this is handled in
virDomainPCIAddressSetGrow() - if there's a request to add a
pci-bridge we'll check if there is a suitable bus to plug it into;
if not, we first add a dmi-to-pci-bridge).
2) Once there is already a single dmi-to-pci-bridge on the system,
there won't be a need for any more, even if it's full, as long as
there is a pci-bridge with an open slot - you can also plug
pci-bridges into existing pci-bridges. So we have to make sure we
don't add a dmi-to-pci-bridge unless there aren't any
dmi-to-pci-bridges *or* any pci-bridges.
3) Although it is strongly discouraged, it is legal for a pci-bridge
to be directly plugged into pcie-root, and we don't want to
auto-add a dmi-to-pci-bridge if there is already a pci-bridge
that's been forced directly into pcie-root.
Although libvirt will now automatically create a dmi-to-pci-bridge
when it's needed, the code still remains for now that forces a
dmi-to-pci-bridge on all domains with pcie-root (in
qemuDomainDefAddDefaultDevices()). That will be removed in a future
patch.
For now, the pcie-root-ports are added one to a slot, which is a bit
wasteful and means it will fail after 31 total PCIe devices (30 if
there are also some PCI devices), but helps keep the changeset down
for this patch. A future patch will have 8 pcie-root-ports sharing the
functions on a single slot.
2016-11-14 14:19:36 -05:00
..
2016-02-16 14:58:58 +01:00
2016-02-16 15:42:20 +01:00
2016-02-16 15:42:20 +01:00
2016-05-18 11:27:56 +02:00
2016-05-18 11:27:56 +02:00
2016-05-18 11:27:56 +02:00
2016-02-16 15:42:20 +01:00
2016-02-16 15:39:57 +01:00
2016-02-16 15:39:57 +01:00
2016-09-16 14:13:07 +02:00
2016-06-17 18:30:04 +02:00
2016-06-17 18:30:04 +02:00
2016-05-25 17:15:21 +02:00
2016-11-14 14:18:06 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-10-25 17:20:17 -04:00
2016-10-05 18:53:55 -04:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-08-03 06:36:22 -04:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-06-14 08:25:25 +02:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-07-27 13:38:53 +02:00
2016-04-18 12:31:50 -04:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-04-26 10:29:44 -04:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-22 10:10:52 +00:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-07-01 15:46:24 -04:00
2016-06-21 14:31:19 -04:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-03-01 14:17:09 +01:00
2016-03-01 14:17:09 +01:00
2016-03-01 14:17:09 +01:00
2016-03-01 14:17:09 +01:00
2016-06-09 14:43:39 +02:00
2016-06-09 14:43:15 +02:00
2016-03-01 14:17:09 +01:00
2016-03-01 14:17:09 +01:00
2016-06-09 14:43:15 +02:00
2016-09-22 15:40:08 +02:00
2016-03-01 14:17:09 +01:00
2016-05-20 10:05:55 +02:00
2016-06-09 14:42:48 +02:00
2016-04-11 13:50:55 +02:00
2016-06-09 14:42:48 +02:00
2016-05-20 10:05:55 +02:00
2016-03-01 14:17:09 +01:00
2016-06-09 14:42:48 +02:00
2016-03-01 14:17:09 +01:00
2016-03-01 14:17:09 +01:00
2016-03-01 14:17:09 +01:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-04-18 12:31:50 -04:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-04-18 12:31:50 -04:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-03-28 13:10:18 -04:00
2016-02-09 16:09:01 -05:00
2016-03-28 13:10:18 -04:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-07-12 12:36:13 +02:00
2016-02-09 16:09:01 -05:00
2016-05-17 10:41:45 +02:00
2016-05-02 17:01:40 +02:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-05-04 09:59:14 -04:00
2016-05-04 09:59:14 -04:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-07-01 15:46:52 -04:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-11-10 17:36:55 +01:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-05-17 10:41:45 +02:00
2016-05-17 10:41:45 +02:00
2016-07-01 21:13:31 -04:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-09-09 16:16:59 +02:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-03-01 14:17:09 +01:00
2016-03-01 14:17:09 +01:00
2016-05-20 13:54:26 -04:00
2016-02-09 16:09:01 -05:00
2016-03-01 14:17:09 +01:00
2016-04-14 14:00:34 -04:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-04-14 14:00:34 -04:00
2016-04-14 14:00:33 -04:00
2016-06-16 13:48:25 -04:00
2016-04-14 14:00:33 -04:00
2016-04-14 14:00:33 -04:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-04-14 14:00:33 -04:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-08-04 16:23:15 +02:00
2016-08-12 17:38:02 +02:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-10-17 10:04:54 +02:00
2016-11-14 14:19:36 -05:00
2016-11-14 14:18:06 -05:00
2016-04-14 14:00:33 -04:00
2016-04-14 14:00:33 -04:00
2016-04-14 14:00:33 -04:00
2016-11-14 14:18:06 -05:00
2016-04-14 14:00:33 -04:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-05-02 17:01:40 +02:00
2016-05-02 17:01:40 +02:00
2016-05-02 17:01:40 +02:00
2016-05-02 17:01:40 +02:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-03-01 14:17:09 +01:00
2016-02-09 16:09:01 -05:00
2016-05-23 09:39:40 +02:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-03-01 14:17:09 +01:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-10-24 16:05:33 +02:00
2016-09-09 08:09:03 -04:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-11-02 16:05:39 +01:00
2016-11-02 16:05:39 +01:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-08-12 17:38:02 +02:00
2016-08-04 16:23:15 +02:00
2016-08-04 16:23:15 +02:00
2016-02-09 16:09:01 -05:00
2016-08-04 16:23:15 +02:00
2016-08-04 16:23:15 +02:00
2016-07-18 10:55:35 +02:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-06-07 12:42:54 +02:00
2016-06-07 12:42:54 +02:00
2016-03-01 14:17:09 +01:00
2016-10-12 17:46:48 +02:00
2016-06-09 14:44:08 +02:00
2016-03-01 14:17:09 +01:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-02-09 16:09:01 -05:00
2016-04-26 11:43:33 -04:00
2016-02-09 16:09:01 -05:00