libvirt/src/bhyve
Laine Stump d1cc4605d7 conf/qemu: change the way VIR_PCI_CONNECT_TYPE_* flags work
The flags used to determine which devices could be plugged into which
controllers were quite confusing, as they tried to create classes of
connections, then put particular devices into possibly multiple
classes, while sometimes setting multiple flags for the controllers
themselves. The attempt to have a single flag indicate, e.g. that a
root-port or a switch-downstream-port could connect was not only
confusing, it was leading to a situation where it would be impossible
to specify exactly the right combinations for a new controller.

The solution is for the VIR_PCI_CONNECT_TYPE_* flags to have a 1:1
correspondence with each type of PCI controller, plus a flag for a PCI
endpoint device and another for a PCIe endpoint device (the only
exception to this is that pci-bridge and pcie-expander-bus controllers
have their upstream connection classified as
VIR_PCI_CONNECT_TYPE_PCI_DEVICE since they can be plugged into
*exactly* the same ports as any endpoint device).  Each device then
has a single flag for connect type (plus the HOTPLUG flag if that
device can e hotplugged), and each controller sets the CONNECT bits
for all controllers that can be plugged into it, as well as for either
type of endpoint device that can be plugged in (and the HOTPLUG flag
if it can accept hotplugged devices).

With this change, it is *slightly* easier to understand the matching
of connections (as long as you remember that the flag for a
device/upstream-facing connection of a controller is the same as that
device's type, while the flags for a controller's downstream
connections is the OR of all device types that can be plugged into
that controller). More importantly, it will be possible to correctly
specify what can be plugged into a pcie-switch-expander-bus, when
support for it is added.
2016-04-14 14:00:34 -04:00
..
bhyve_capabilities.c bhyve: caps: Log error message when CPU init fails 2016-03-18 18:33:53 -04:00
bhyve_capabilities.h bhyve: add UTC clock support 2015-07-22 19:05:09 +03:00
bhyve_command.c conf: store bootindex as unsigned int 2016-04-06 09:27:23 +02:00
bhyve_command.h bhyve: Support /domain/bootloader configuration for non-FreeBSD guests. 2014-11-12 09:55:22 +01:00
bhyve_device.c conf/qemu: change the way VIR_PCI_CONNECT_TYPE_* flags work 2016-04-14 14:00:34 -04:00
bhyve_device.h bhyve: implement PCI address allocation 2014-06-13 19:25:27 +04:00
bhyve_domain.c conf: refactor checking for unsupported memory devices 2016-03-09 10:09:16 +01:00
bhyve_domain.h bhyve: monitor: do not override domain's privateData 2015-11-17 12:44:26 +03:00
bhyve_driver.c bhyve: fix invalid hostsysinfo freeing 2016-03-29 15:58:07 +03:00
bhyve_driver.h bhyve: fix preprocessor indentation 2016-02-06 05:26:51 +03:00
bhyve_monitor.c bhyve: monitor: do not override domain's privateData 2015-11-17 12:44:26 +03:00
bhyve_monitor.h drvbhyve: Automatically tear down guest domains on shutdown 2014-12-04 11:03:13 +01:00
bhyve_process.c bhyve: Fix the build 2016-02-05 22:58:02 +01:00
bhyve_process.h bhyve: reconnect to domains after libvirtd restart 2014-07-18 21:07:35 +04:00
bhyve_utils.h conf: Split virDomainObjList into a separate file 2015-11-30 13:55:10 +01:00