On Thu, May 19, 2016 at 11:13 PM, Laine Stump <laine@xxxxxxxxx> wrote:
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").
Usually, though, a revert is done to remove something that shouldn't have been committed in the first place, while these bits were correct.
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.
Agree. Will change the commit message.
On 05/18/2016 05:29 PM, Shivaprasad G Bhat wrote:
This has to go. The unlugging is going to be supported.
Signed-off-by: Shivaprasad G Bhat <sbhat@xxxxxxxxxxxxxxxxxx>
---
src/qemu/qemu_hotplug.c | 60 -----------------------------------------------
1 file changed, 60 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index f40b34d..5b822f9 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -2770,35 +2770,6 @@ qemuDomainChangeGraphics(virQEMUDriverPtr driver,
return ret;
}
-
-static int qemuComparePCIDevice(virDomainDefPtr def ATTRIBUTE_UNUSED,
- virDomainDeviceDefPtr device ATTRIBUTE_UNUSED,
- virDomainDeviceInfoPtr info1,
- void *opaque)
-{
- virDomainDeviceInfoPtr info2 = opaque;
-
- if (info1->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI ||
- info2->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI)
- return 0;
-
- if (info1->addr.pci.domain == info2->addr.pci.domain &&
- info1->addr.pci.bus == info2->addr.pci.bus &&
- info1->addr.pci.slot == info2->addr.pci.slot &&
- info1->addr.pci.function != info2->addr.pci.function)
- return -1;
- return 0;
-}
-
-static bool qemuIsMultiFunctionDevice(virDomainDefPtr def,
- virDomainDeviceInfoPtr dev)
-{
- if (virDomainDeviceInfoIterate(def, qemuComparePCIDevice, dev) < 0)
- return true;
- return false;
-}
-
-
static int
qemuDomainRemoveDiskDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
@@ -3407,13 +3378,6 @@ qemuDomainDetachVirtioDiskDevice(virQEMUDriverPtr driver,
int ret = -1;
qemuDomainObjPrivatePtr priv = vm->privateData;
- if (qemuIsMultiFunctionDevice(vm->def, &detach->info)) {
- virReportError(VIR_ERR_OPERATION_FAILED,
- _("cannot hot unplug multifunction PCI device: %s"),
- detach->dst);
- goto cleanup;
- }
-
if (qemuDomainMachineIsS390CCW(vm->def) &&
virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_VIRTIO_CCW)) {
if (!virDomainDeviceAddressIsValid(&detach->info,
@@ -3636,14 +3600,6 @@ int qemuDomainDetachControllerDevice(virQEMUDriverPtr driver,
goto cleanup;
}
- if (detach->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI &&
- qemuIsMultiFunctionDevice(vm->def, &detach->info)) {
- virReportError(VIR_ERR_OPERATION_FAILED,
- _("cannot hot unplug multifunction PCI device: %s"),
- dev->data.disk->dst);
- goto cleanup;
- }
-
if (qemuDomainControllerIsBusy(vm, detach)) {
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("device cannot be detached: device is busy"));
@@ -3679,17 +3635,8 @@ qemuDomainDetachHostPCIDevice(virQEMUDriverPtr driver,
virDomainHostdevDefPtr detach)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
- virDomainHostdevSubsysPCIPtr pcisrc = &detach->source.subsys.u.pci;
int ret;
- if (qemuIsMultiFunctionDevice(vm->def, detach->info)) {
- virReportError(VIR_ERR_OPERATION_FAILED,
- _("cannot hot unplug multifunction PCI device: %.4x:%.2x:%.2x.%.1x"),
- pcisrc->addr.domain, pcisrc->addr.bus,
- pcisrc->addr.slot, pcisrc->addr.function);
- return -1;
- }
-
if (!virDomainDeviceAddressIsValid(detach->info,
VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI)) {
virReportError(VIR_ERR_OPERATION_FAILED,
@@ -3921,13 +3868,6 @@ qemuDomainDetachNetDevice(virQEMUDriverPtr driver,
"%s", _("device cannot be detached without a PCI address"));
goto cleanup;
}
-
- if (qemuIsMultiFunctionDevice(vm->def, &detach->info)) {
- virReportError(VIR_ERR_OPERATION_FAILED,
- _("cannot hot unplug multifunction PCI device :%s"),
- dev->data.disk->dst);
- goto cleanup;
- }
}
if (!detach->info.alias) {
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list