render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
Blob Blame History Raw
From 0ca4828af101259cf2cbe30004c68f2081394f91 Mon Sep 17 00:00:00 2001
Message-Id: <0ca4828af101259cf2cbe30004c68f2081394f91@dist-git>
From: Laine Stump <laine@laine.org>
Date: Mon, 8 Apr 2019 10:57:32 +0200
Subject: [PATCH] qemu_hotplug: remove another erroneous
 qemuDomainDetachExtensionDevice() call
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

qemuDomainRemoveRNGDevice() calls qemuDomainDetachExtensionDevice().
According to commit 1d1e264f1 that added this code, it should not be
necessary to explicitly remove the zPCI extension device for a PCI
device during unplug, because "QEMU implements an unplug callback
which will unplug both PCI and zPCI device in a cascaded way". In
fact, no other devices call qemuDomainDetachExtensionDevice() during
their qemuDomainRemove*Device() function, so it should be removed from
qemuDomainRemoveRNGDevice as well.

Signed-off-by: Laine Stump <laine@laine.org>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>

(cherry picked from commit e18e9b72a99f93cd4b14f39c60baa7c5ea35e5db)

https://bugzilla.redhat.com/show_bug.cgi?id=1508149

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Message-Id: <20190408085732.28684-16-abologna@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
---
 src/qemu/qemu_hotplug.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index f16213c6e0..410cdca3c5 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -4422,9 +4422,6 @@ qemuDomainRemoveRNGDevice(virQEMUDriverPtr driver,
 
     qemuDomainObjEnterMonitor(driver, vm);
 
-    if (qemuDomainDetachExtensionDevice(priv->mon, &rng->info) < 0)
-        rc = -1;
-
     if (rc == 0 &&
         qemuMonitorDelObject(priv->mon, objAlias) < 0)
         rc = -1;
-- 
2.22.0