break;
+ case VIR_DOMAIN_CONTROLLER_TYPE_PCI:
+ switch (def->model) {
+ case VIR_DOMAIN_CONTROLLER_MODEL_PCI_BRIDGE:
+ if (def->idx == 0) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("PCI bridge index should be > 0"));
+ goto error;
+ }
+ virBufferAsprintf(&buf, "pci-bridge,chassis_nr=%d,id=pci.%d",
+ def->idx, def->idx);
+ break;
+ case VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT:
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("wrong function called for pci-root"));
+ return NULL;
+ }
+ break;
+
/* We always get an IDE controller, whether we want it or not. */
case VIR_DOMAIN_CONTROLLER_TYPE_IDE:
default:
int contOrder[] = {
/* We don't add an explicit IDE or FD controller because the
* provided PIIX4 device already includes one. It isn't possible to
- * remove the PIIX4. */
+ * remove the PIIX4.
+ *
+ * We don't add PCI root controller either, because it's implicit,
+ * but we do add PCI bridges. */
+ VIR_DOMAIN_CONTROLLER_TYPE_PCI,
VIR_DOMAIN_CONTROLLER_TYPE_USB,
VIR_DOMAIN_CONTROLLER_TYPE_SCSI,
VIR_DOMAIN_CONTROLLER_TYPE_SATA,
continue;
}
+ /* Skip pci-root */
+ if (cont->type == VIR_DOMAIN_CONTROLLER_TYPE_PCI &&
+ cont->model == VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT) {
+ continue;
+ }
+
/* Only recent QEMU implements a SATA (AHCI) controller */
if (cont->type == VIR_DOMAIN_CONTROLLER_TYPE_SATA) {
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_ICH9_AHCI)) {
QEMU_CAPS_DEVICE_CIRRUS_VGA,
QEMU_CAPS_DEVICE_VMWARE_SVGA,
QEMU_CAPS_DEVICE_USB_SERIAL,
- QEMU_CAPS_DEVICE_USB_NET);
+ QEMU_CAPS_DEVICE_USB_NET,
+ QEMU_CAPS_DEVICE_PCI_BRIDGE);
DO_TEST("qemu-kvm-0.12.3", 12003, 1, 0,
QEMU_CAPS_VNC_COLON,
QEMU_CAPS_NO_REBOOT,
QEMU_CAPS_DEVICE_CIRRUS_VGA,
QEMU_CAPS_DEVICE_VMWARE_SVGA,
QEMU_CAPS_DEVICE_USB_SERIAL,
- QEMU_CAPS_DEVICE_USB_NET);
+ QEMU_CAPS_DEVICE_USB_NET,
+ QEMU_CAPS_DEVICE_PCI_BRIDGE);
DO_TEST("qemu-kvm-0.12.1.2-rhel61", 12001, 1, 0,
QEMU_CAPS_VNC_COLON,
QEMU_CAPS_NO_REBOOT,
QEMU_CAPS_DEVICE_CIRRUS_VGA,
QEMU_CAPS_DEVICE_VMWARE_SVGA,
QEMU_CAPS_DEVICE_USB_SERIAL,
- QEMU_CAPS_DEVICE_USB_NET);
+ QEMU_CAPS_DEVICE_USB_NET,
+ QEMU_CAPS_DEVICE_PCI_BRIDGE);
DO_TEST("qemu-kvm-0.12.1.2-rhel62-beta", 12001, 1, 0,
QEMU_CAPS_VNC_COLON,
QEMU_CAPS_NO_REBOOT,
QEMU_CAPS_VNC,
QEMU_CAPS_DEVICE_QXL,
QEMU_CAPS_DEVICE_VGA,
- QEMU_CAPS_DEVICE_CIRRUS_VGA);
+ QEMU_CAPS_DEVICE_CIRRUS_VGA,
+ QEMU_CAPS_DEVICE_PCI_BRIDGE);
DO_TEST("qemu-1.0", 1000000, 0, 0,
QEMU_CAPS_VNC_COLON,
QEMU_CAPS_NO_REBOOT,
QEMU_CAPS_DEVICE_USB_SERIAL,
QEMU_CAPS_DEVICE_USB_NET,
QEMU_CAPS_DTB,
- QEMU_CAPS_IPV6_MIGRATION);
+ QEMU_CAPS_IPV6_MIGRATION,
+ QEMU_CAPS_DEVICE_PCI_BRIDGE);
DO_TEST("qemu-1.2.0", 1002000, 0, 0,
QEMU_CAPS_VNC_COLON,
QEMU_CAPS_NO_REBOOT,
QEMU_CAPS_DEVICE_USB_NET,
QEMU_CAPS_DTB,
QEMU_CAPS_SCSI_MEGASAS,
- QEMU_CAPS_IPV6_MIGRATION);
+ QEMU_CAPS_IPV6_MIGRATION,
+ QEMU_CAPS_DEVICE_PCI_BRIDGE);
DO_TEST("qemu-kvm-1.2.0", 1002000, 1, 0,
QEMU_CAPS_VNC_COLON,
QEMU_CAPS_NO_REBOOT,
QEMU_CAPS_DEVICE_USB_NET,
QEMU_CAPS_DTB,
QEMU_CAPS_SCSI_MEGASAS,
- QEMU_CAPS_IPV6_MIGRATION);
+ QEMU_CAPS_IPV6_MIGRATION,
+ QEMU_CAPS_DEVICE_PCI_BRIDGE);
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
}