We only support hotplugging SCSI controllers, USB and virtio-serial related code is useless here. --- src/conf/domain_addr.c | 21 --------------------- src/conf/domain_addr.h | 4 ---- src/libvirt_private.syms | 1 - src/qemu/qemu_hotplug.c | 18 ------------------ 4 files changed, 44 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index ca5803e..c7eab0c 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -884,27 +884,6 @@ virDomainVirtioSerialAddrSetAddControllers(virDomainVirtioSerialAddrSetPtr addrs return 0; } -/* virDomainVirtioSerialAddrSetRemoveController - * - * Removes a virtio serial controller from the address set. - */ -void -virDomainVirtioSerialAddrSetRemoveController(virDomainVirtioSerialAddrSetPtr addrs, - virDomainControllerDefPtr cont) -{ - ssize_t pos; - - if (cont->type != VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL) - return; - - VIR_DEBUG("Removing virtio serial controller index %u " - "from the address set", cont->idx); - - pos = virDomainVirtioSerialAddrFindController(addrs, cont->idx); - - if (pos >= 0) - VIR_DELETE_ELEMENT(addrs->controllers, pos, addrs->ncontrollers); -} void virDomainVirtioSerialAddrSetFree(virDomainVirtioSerialAddrSetPtr addrs) diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h index 2220a79..74f414e 100644 --- a/src/conf/domain_addr.h +++ b/src/conf/domain_addr.h @@ -209,10 +209,6 @@ int virDomainVirtioSerialAddrSetAddController(virDomainVirtioSerialAddrSetPtr addrs, virDomainControllerDefPtr cont) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -void -virDomainVirtioSerialAddrSetRemoveController(virDomainVirtioSerialAddrSetPtr addrs, - virDomainControllerDefPtr cont) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); int virDomainVirtioSerialAddrSetAddControllers(virDomainVirtioSerialAddrSetPtr addrs, virDomainDefPtr def) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 63d8618..536acab 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -115,7 +115,6 @@ virDomainVirtioSerialAddrSetAddController; virDomainVirtioSerialAddrSetAddControllers; virDomainVirtioSerialAddrSetCreate; virDomainVirtioSerialAddrSetFree; -virDomainVirtioSerialAddrSetRemoveController; # conf/domain_audit.h diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index eae5418..9bd4238 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -442,7 +442,6 @@ int qemuDomainAttachControllerDevice(virQEMUDriverPtr driver, char *devstr = NULL; qemuDomainObjPrivatePtr priv = vm->privateData; bool releaseaddr = false; - bool addedToAddrSet = false; if (controller->type != VIR_DOMAIN_CONTROLLER_TYPE_SCSI) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, @@ -484,20 +483,6 @@ int qemuDomainAttachControllerDevice(virQEMUDriverPtr driver, if (qemuAssignDeviceControllerAlias(vm->def, priv->qemuCaps, controller) < 0) goto cleanup; - if (controller->type == VIR_DOMAIN_CONTROLLER_TYPE_USB && - controller->model == -1 && - !virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_PIIX3_USB_UHCI)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("USB controller hotplug unsupported in this QEMU binary")); - goto cleanup; - } - - if (controller->type == VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL && - virDomainVirtioSerialAddrSetAddController(priv->vioserialaddrs, - controller) < 0) - goto cleanup; - addedToAddrSet = true; - if (!(devstr = qemuBuildControllerDevStr(vm->def, controller, priv->qemuCaps, NULL))) goto cleanup; } @@ -526,9 +511,6 @@ int qemuDomainAttachControllerDevice(virQEMUDriverPtr driver, } cleanup: - if (ret != 0 && addedToAddrSet) - virDomainVirtioSerialAddrSetRemoveController(priv->vioserialaddrs, - controller); if (ret != 0 && releaseaddr) qemuDomainReleaseDeviceAddress(vm, &controller->info, NULL); -- 2.4.6 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list