]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: add dmi-to-pci-bridge controller
authorLaine Stump <laine@laine.org>
Wed, 31 Jul 2013 01:37:32 +0000 (21:37 -0400)
committerLaine Stump <laine@laine.org>
Mon, 5 Aug 2013 19:40:49 +0000 (15:40 -0400)
commit62ac6b43541e46605d62a569d6480c3de9805b98
tree82d0389fe96f543d230cfe87b51b5d62f756f86e
parent48a3f48ac59a335b95b445e69f7e47f3e10d930e
qemu: add dmi-to-pci-bridge controller

This PCI controller, named "dmi-to-pci-bridge" in the libvirt config,
and implemented with qemu's "i82801b11-bridge" device, connects to a
PCI Express slot (e.g. one of the slots provided by the pcie-root
controller, aka "pcie.0" on the qemu commandline), and provides 31
*non-hot-pluggable* PCI (*not* PCIe) slots, numbered 1-31.

Any time a machine is defined which has a pcie-root controller
(i.e. any q35-based machinetype), libvirt will automatically add a
dmi-to-pci-bridge controller if one doesn't exist, and also add a
pci-bridge controller. The reasoning here is that any useful domain
will have either an immediate (startup time) or eventual (subsequent
hot-plug) need for a standard PCI slot; since the pcie-root controller
only provides PCIe slots, we need to connect a dmi-to-pci-bridge
controller to it in order to get a non-hot-plug PCI slot that we can
then use to connect a pci-bridge - the slots provided by the
pci-bridge will be both standard PCI and hot-pluggable.

Since pci-bridge devices themselves can not be hot-plugged into a
running system (although you can hot-plug other devices into a
pci-bridge's slots), any new pci-bridge controller that is added can
(and will) be plugged into the dmi-to-pci-bridge as long as it has
empty slots available.

This patch is also changing the qemuxml2xml-pcie test from a "DO_TEST"
to a "DO_DIFFERENT_TEST". This is so that the "before" xml can omit
the automatically added dmi-to-pci-bridge and pci-bridge devices, and
the "after" xml can include it - this way we are testing if libvirt is
properly adding these devices.
14 files changed:
docs/formatdomain.html.in
docs/schemas/domaincommon.rng
src/conf/domain_conf.c
src/conf/domain_conf.h
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
src/qemu/qemu_command.c
src/qemu/qemu_domain.c
tests/qemuxml2argvdata/qemuxml2argv-pcie-root.args
tests/qemuxml2argvdata/qemuxml2argv-q35.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-q35.xml [new file with mode: 0644]
tests/qemuxml2argvtest.c
tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root.xml [new file with mode: 0644]
tests/qemuxml2xmltest.c