<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 19, 2016 at 11:13 PM, Laine Stump <span dir="ltr"><<a href="mailto:laine@laine.org" target="_blank">laine@laine.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If you're going to say in the commit that you're reverting something, you should list the commit id of the patch you're reverting (even if, as in this case, the revert couldn't be done with "git revert").<br>
<br>
Usually, though, a revert is done to remove something that shouldn't have been committed in the first place, while these bits were correct.<br>
<br>
Of course I think that after review it would be more proper to squash this patch into the one that actually enables hot-unplug of multifunction devices. ACK on what it does, though.<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div>Agree. Will change the commit message.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
<br>
On 05/18/2016 05:29 PM, Shivaprasad G Bhat wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This has to go. The unlugging is going to be supported.<br>
<br>
Signed-off-by: Shivaprasad G Bhat <<a href="mailto:sbhat@linux.vnet.ibm.com" target="_blank">sbhat@linux.vnet.ibm.com</a>><br>
---<br>
  src/qemu/qemu_hotplug.c |   60 -----------------------------------------------<br>
  1 file changed, 60 deletions(-)<br>
<br>
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c<br>
index f40b34d..5b822f9 100644<br>
--- a/src/qemu/qemu_hotplug.c<br>
+++ b/src/qemu/qemu_hotplug.c<br>
@@ -2770,35 +2770,6 @@ qemuDomainChangeGraphics(virQEMUDriverPtr driver,<br>
      return ret;<br>
  }<br>
  -<br>
-static int qemuComparePCIDevice(virDomainDefPtr def ATTRIBUTE_UNUSED,<br>
-                                virDomainDeviceDefPtr device ATTRIBUTE_UNUSED,<br>
-                                virDomainDeviceInfoPtr info1,<br>
-                                void *opaque)<br>
-{<br>
-    virDomainDeviceInfoPtr info2 = opaque;<br>
-<br>
-    if (info1->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI ||<br>
-        info2->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI)<br>
-        return 0;<br>
-<br>
-    if (info1->addr.pci.domain == info2->addr.pci.domain &&<br>
-        info1->addr.pci.bus == info2->addr.pci.bus &&<br>
-        info1->addr.pci.slot == info2->addr.pci.slot &&<br>
-        info1->addr.pci.function != info2->addr.pci.function)<br>
-        return -1;<br>
-    return 0;<br>
-}<br>
-<br>
-static bool qemuIsMultiFunctionDevice(virDomainDefPtr def,<br>
-                                      virDomainDeviceInfoPtr dev)<br>
-{<br>
-    if (virDomainDeviceInfoIterate(def, qemuComparePCIDevice, dev) < 0)<br>
-        return true;<br>
-    return false;<br>
-}<br>
-<br>
-<br>
  static int<br>
  qemuDomainRemoveDiskDevice(virQEMUDriverPtr driver,<br>
                             virDomainObjPtr vm,<br>
@@ -3407,13 +3378,6 @@ qemuDomainDetachVirtioDiskDevice(virQEMUDriverPtr driver,<br>
      int ret = -1;<br>
      qemuDomainObjPrivatePtr priv = vm->privateData;<br>
  -    if (qemuIsMultiFunctionDevice(vm->def, &detach->info)) {<br>
-        virReportError(VIR_ERR_OPERATION_FAILED,<br>
-                       _("cannot hot unplug multifunction PCI device: %s"),<br>
-                       detach->dst);<br>
-        goto cleanup;<br>
-    }<br>
-<br>
      if (qemuDomainMachineIsS390CCW(vm->def) &&<br>
          virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_VIRTIO_CCW)) {<br>
          if (!virDomainDeviceAddressIsValid(&detach->info,<br>
@@ -3636,14 +3600,6 @@ int qemuDomainDetachControllerDevice(virQEMUDriverPtr driver,<br>
          goto cleanup;<br>
      }<br>
  -    if (detach->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI &&<br>
-        qemuIsMultiFunctionDevice(vm->def, &detach->info)) {<br>
-        virReportError(VIR_ERR_OPERATION_FAILED,<br>
-                       _("cannot hot unplug multifunction PCI device: %s"),<br>
-                       dev->data.disk->dst);<br>
-        goto cleanup;<br>
-    }<br>
-<br>
      if (qemuDomainControllerIsBusy(vm, detach)) {<br>
          virReportError(VIR_ERR_OPERATION_FAILED, "%s",<br>
                         _("device cannot be detached: device is busy"));<br>
@@ -3679,17 +3635,8 @@ qemuDomainDetachHostPCIDevice(virQEMUDriverPtr driver,<br>
                                virDomainHostdevDefPtr detach)<br>
  {<br>
      qemuDomainObjPrivatePtr priv = vm->privateData;<br>
-    virDomainHostdevSubsysPCIPtr pcisrc = &detach->source.subsys.u.pci;<br>
      int ret;<br>
  -    if (qemuIsMultiFunctionDevice(vm->def, detach->info)) {<br>
-        virReportError(VIR_ERR_OPERATION_FAILED,<br>
-                       _("cannot hot unplug multifunction PCI device: %.4x:%.2x:%.2x.%.1x"),<br>
-                       pcisrc->addr.domain, pcisrc->addr.bus,<br>
-                       pcisrc->addr.slot, pcisrc->addr.function);<br>
-        return -1;<br>
-    }<br>
-<br>
      if (!virDomainDeviceAddressIsValid(detach->info,<br>
                                         VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI)) {<br>
          virReportError(VIR_ERR_OPERATION_FAILED,<br>
@@ -3921,13 +3868,6 @@ qemuDomainDetachNetDevice(virQEMUDriverPtr driver,<br>
                              "%s", _("device cannot be detached without a PCI address"));<br>
              goto cleanup;<br>
          }<br>
-<br>
-        if (qemuIsMultiFunctionDevice(vm->def, &detach->info)) {<br>
-            virReportError(VIR_ERR_OPERATION_FAILED,<br>
-                            _("cannot hot unplug multifunction PCI device :%s"),<br>
-                            dev->data.disk->dst);<br>
-            goto cleanup;<br>
-        }<br>
      }<br>
        if (!detach->info.alias) {<br>
<br>
--<br>
libvir-list mailing list<br>
<a href="mailto:libvir-list@redhat.com" target="_blank">libvir-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/libvir-list" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/libvir-list</a><br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br></div></div>