I agree.
Reviewed-by: Boris Fiuczynski <fiuczy(a)linux.ibm.com>
On 3/21/19 11:28 PM, Laine Stump wrote:
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(a)laine.org>
---
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 18075dc48e..65ec5187e6 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -4884,9 +4884,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;
--
Mit freundlichen Grüßen/Kind regards
Boris Fiuczynski
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Matthias Hartmann
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294