[PATCH v1 08/10] qemu_hotplug.c: avoid aligning the mem obj in qemuDomainAttachMemory()

Daniel Henrique Barboza danielhb413 at gmail.com
Wed Nov 11 22:07:23 UTC 2020


Similar to the previous patch, the alignment of the mem object in
qemuDomainAttachMemory() is obsolete after recent changes.

qemuDomainAttachMemory() is used by qemuDomainAttachDeviceLive(),
which is called by qemuDomainAttachDeviceLiveAndConfig() after
a call to virDomainDeviceDefParse(), where the PostParse callback
will align the mem object.

This means that we can live without a qemuDomainMemoryDeviceAlignSize()
call at the start of qemuDomainAttachMemory().

Signed-off-by: Daniel Henrique Barboza <danielhb413 at gmail.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 e0495ef59e..15cbb4d550 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -2395,9 +2395,6 @@ qemuDomainAttachMemory(virQEMUDriverPtr driver,
     int id;
     int ret = -1;
 
-    if (qemuDomainMemoryDeviceAlignSize(vm->def, mem) < 0)
-        goto cleanup;
-
     if (qemuDomainDefValidateMemoryHotplug(vm->def, priv->qemuCaps, mem) < 0)
         goto cleanup;
 
-- 
2.26.2




More information about the libvir-list mailing list