render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
c480ed
From 0ca4828af101259cf2cbe30004c68f2081394f91 Mon Sep 17 00:00:00 2001
c480ed
Message-Id: <0ca4828af101259cf2cbe30004c68f2081394f91@dist-git>
c480ed
From: Laine Stump <laine@laine.org>
c480ed
Date: Mon, 8 Apr 2019 10:57:32 +0200
c480ed
Subject: [PATCH] qemu_hotplug: remove another erroneous
c480ed
 qemuDomainDetachExtensionDevice() call
c480ed
MIME-Version: 1.0
c480ed
Content-Type: text/plain; charset=UTF-8
c480ed
Content-Transfer-Encoding: 8bit
c480ed
c480ed
qemuDomainRemoveRNGDevice() calls qemuDomainDetachExtensionDevice().
c480ed
According to commit 1d1e264f1 that added this code, it should not be
c480ed
necessary to explicitly remove the zPCI extension device for a PCI
c480ed
device during unplug, because "QEMU implements an unplug callback
c480ed
which will unplug both PCI and zPCI device in a cascaded way". In
c480ed
fact, no other devices call qemuDomainDetachExtensionDevice() during
c480ed
their qemuDomainRemove*Device() function, so it should be removed from
c480ed
qemuDomainRemoveRNGDevice as well.
c480ed
c480ed
Signed-off-by: Laine Stump <laine@laine.org>
c480ed
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c480ed
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
c480ed
c480ed
(cherry picked from commit e18e9b72a99f93cd4b14f39c60baa7c5ea35e5db)
c480ed
c480ed
https://bugzilla.redhat.com/show_bug.cgi?id=1508149
c480ed
c480ed
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
c480ed
Message-Id: <20190408085732.28684-16-abologna@redhat.com>
c480ed
Reviewed-by: Laine Stump <laine@redhat.com>
c480ed
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c480ed
---
c480ed
 src/qemu/qemu_hotplug.c | 3 ---
c480ed
 1 file changed, 3 deletions(-)
c480ed
c480ed
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
c480ed
index f16213c6e0..410cdca3c5 100644
c480ed
--- a/src/qemu/qemu_hotplug.c
c480ed
+++ b/src/qemu/qemu_hotplug.c
c480ed
@@ -4422,9 +4422,6 @@ qemuDomainRemoveRNGDevice(virQEMUDriverPtr driver,
c480ed
 
c480ed
     qemuDomainObjEnterMonitor(driver, vm);
c480ed
 
c480ed
-    if (qemuDomainDetachExtensionDevice(priv->mon, &rng->info) < 0)
c480ed
-        rc = -1;
c480ed
-
c480ed
     if (rc == 0 &&
c480ed
         qemuMonitorDelObject(priv->mon, objAlias) < 0)
c480ed
         rc = -1;
c480ed
-- 
c480ed
2.22.0
c480ed