[PATCH v2 0/8] qemu: Remember memory backing paths for started domains

Every time we work with file-backed memory we construct the paths from the driver config. Not only does is that slow, it is also wrong. If the configuration changes while a domain with file-backed memory is running, once the daemon is restarted and the domain is being stopped, we construct the wrong path to clean up. And it also makes it more difficult to change that in the future, for example the patch series which led me to write this patch series: https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/I6VO... The patches are maybe split way too much, so feel free to suggest squashing some together, I'm not opposed to that. v2: - Do not introduce unused functions v1: - https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/H57G6... Martin Kletzander (8): qemu: Move domain-related functions to qemu_domain qemu: Change parameters of qemuGetMemoryBackingDomainPath() qemu: Add memoryBackingDir to qemuDomainObjPrivate qemu: Set memoryBackingDir in private data upon start qemu: Use per-domain private memoryBackingDir for new memory backends qemu: Make qemuGetMemoryBackingDomainPath static qemu: Rename memory path functions qemu: Generate domain memory backing path directly src/qemu/qemu_command.c | 5 +- src/qemu/qemu_conf.c | 58 --------------- src/qemu/qemu_conf.h | 8 -- src/qemu/qemu_domain.c | 73 ++++++++++++++++++- src/qemu/qemu_domain.h | 7 ++ src/qemu/qemu_hotplug.c | 4 +- src/qemu/qemu_process.c | 13 ++-- src/qemu/qemu_process.h | 3 +- .../qemustatusxml2xmldata/backup-pull-in.xml | 1 + .../blockjob-blockdev-in.xml | 1 + .../blockjob-mirror-in.xml | 1 + .../memory-backing-dir-in.xml | 61 ++++++++++++++++ .../memory-backing-dir-out.xml | 1 + .../migration-in-params-in.xml | 1 + .../migration-out-nbd-bitmaps-in.xml | 1 + .../migration-out-nbd-out.xml | 1 + .../migration-out-nbd-tls-out.xml | 1 + .../migration-out-params-in.xml | 1 + tests/qemustatusxml2xmldata/modern-in.xml | 1 + tests/qemustatusxml2xmldata/upgrade-out.xml | 1 + .../qemustatusxml2xmldata/vcpus-multi-in.xml | 1 + tests/qemuxmlactivetest.c | 2 + 22 files changed, 163 insertions(+), 83 deletions(-) create mode 100644 tests/qemustatusxml2xmldata/memory-backing-dir-in.xml create mode 120000 tests/qemustatusxml2xmldata/memory-backing-dir-out.xml -- 2.46.1

Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/qemu/qemu_conf.c | 58 ------------------------------------------ src/qemu/qemu_conf.h | 8 ------ src/qemu/qemu_domain.c | 58 ++++++++++++++++++++++++++++++++++++++++++ src/qemu/qemu_domain.h | 9 +++++++ 4 files changed, 67 insertions(+), 66 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index b36bede6c3c6..0d90a8739202 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1603,64 +1603,6 @@ qemuGetDomainHupageMemPath(virQEMUDriver *driver, } -int -qemuGetMemoryBackingDomainPath(virQEMUDriver *driver, - const virDomainDef *def, - char **path) -{ - g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver); - const char *root = driver->embeddedRoot; - g_autofree char *shortName = NULL; - - if (!(shortName = virDomainDefGetShortName(def))) - return -1; - - if (root && !STRPREFIX(cfg->memoryBackingDir, root)) { - g_autofree char * hash = virDomainDriverGenerateRootHash("qemu", root); - *path = g_strdup_printf("%s/%s-%s", cfg->memoryBackingDir, hash, shortName); - } else { - *path = g_strdup_printf("%s/%s", cfg->memoryBackingDir, shortName); - } - - return 0; -} - - -/** - * qemuGetMemoryBackingPath: - * @driver: the qemu driver - * @def: domain definition - * @alias: memory object alias - * @memPath: constructed path - * - * Constructs path to memory backing dir and stores it at @memPath. - * - * Returns: 0 on success, - * -1 otherwise (with error reported). - */ -int -qemuGetMemoryBackingPath(virQEMUDriver *driver, - const virDomainDef *def, - const char *alias, - char **memPath) -{ - g_autofree char *domainPath = NULL; - - if (!alias) { - /* This should never happen (TM) */ - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("memory device alias is not assigned")); - return -1; - } - - if (qemuGetMemoryBackingDomainPath(driver, def, &domainPath) < 0) - return -1; - - *memPath = g_strdup_printf("%s/%s", domainPath, alias); - return 0; -} - - int qemuHugepageMakeBasedir(virQEMUDriver *driver, virHugeTLBFS *hugepage) diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index aa1e1a626c1a..c98b6137c1fd 100644 --- a/src/qemu/qemu_conf.h +++ b/src/qemu/qemu_conf.h @@ -368,14 +368,6 @@ int qemuGetDomainHupageMemPath(virQEMUDriver *driver, unsigned long long pagesize, char **memPath); -int qemuGetMemoryBackingDomainPath(virQEMUDriver *driver, - const virDomainDef *def, - char **path); -int qemuGetMemoryBackingPath(virQEMUDriver *driver, - const virDomainDef *def, - const char *alias, - char **memPath); - int qemuHugepageMakeBasedir(virQEMUDriver *driver, virHugeTLBFS *hugepage); diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index ed305d9427f5..cd891fd58f52 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1735,6 +1735,64 @@ qemuDomainSecretPrepare(virQEMUDriver *driver, } +int +qemuGetMemoryBackingDomainPath(virQEMUDriver *driver, + const virDomainDef *def, + char **path) +{ + g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver); + const char *root = driver->embeddedRoot; + g_autofree char *shortName = NULL; + + if (!(shortName = virDomainDefGetShortName(def))) + return -1; + + if (root && !STRPREFIX(cfg->memoryBackingDir, root)) { + g_autofree char * hash = virDomainDriverGenerateRootHash("qemu", root); + *path = g_strdup_printf("%s/%s-%s", cfg->memoryBackingDir, hash, shortName); + } else { + *path = g_strdup_printf("%s/%s", cfg->memoryBackingDir, shortName); + } + + return 0; +} + + +/** + * qemuGetMemoryBackingPath: + * @driver: the qemu driver + * @def: domain definition + * @alias: memory object alias + * @memPath: constructed path + * + * Constructs path to memory backing dir and stores it at @memPath. + * + * Returns: 0 on success, + * -1 otherwise (with error reported). + */ +int +qemuGetMemoryBackingPath(virQEMUDriver *driver, + const virDomainDef *def, + const char *alias, + char **memPath) +{ + g_autofree char *domainPath = NULL; + + if (!alias) { + /* This should never happen (TM) */ + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("memory device alias is not assigned")); + return -1; + } + + if (qemuGetMemoryBackingDomainPath(driver, def, &domainPath) < 0) + return -1; + + *memPath = g_strdup_printf("%s/%s", domainPath, alias); + return 0; +} + + /* This is the old way of setting up per-domain directories */ static void qemuDomainSetPrivatePathsOld(virQEMUDriver *driver, diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index d799f6c08676..9d897b761e3a 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -936,6 +936,15 @@ void qemuDomainCleanupStorageSourceFD(virStorageSource *src); void qemuDomainStartupCleanup(virDomainObj *vm); +int qemuGetMemoryBackingDomainPath(virQEMUDriver *driver, + const virDomainDef *def, + char **path); + +int qemuGetMemoryBackingPath(virQEMUDriver *driver, + const virDomainDef *def, + const char *alias, + char **memPath); + int qemuDomainSecretPrepare(virQEMUDriver *driver, virDomainObj *vm) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -- 2.46.1

This way it does not use driver, since it will be later reworked and the following patches cleaner, hopefully. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/qemu/qemu_command.c | 4 ++-- src/qemu/qemu_domain.c | 9 +++++---- src/qemu/qemu_domain.h | 5 +++-- src/qemu/qemu_hotplug.c | 4 ++-- src/qemu/qemu_process.c | 7 +++---- src/qemu/qemu_process.h | 3 +-- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index c20d033aea5a..f36b02b76b35 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3222,7 +3222,7 @@ qemuBuildMemoryBackendProps(virJSONValue **backendProps, } else { /* We can have both pagesize and mem source. If that's the case, * prefer hugepages as those are more specific. */ - if (qemuGetMemoryBackingPath(priv->driver, def, mem->info.alias, &memPath) < 0) + if (qemuGetMemoryBackingPath(priv, def, mem->info.alias, &memPath) < 0) return -1; } @@ -7116,7 +7116,7 @@ qemuBuildMemPathStr(const virDomainDef *def, return -1; prealloc = true; } else if (def->mem.source == VIR_DOMAIN_MEMORY_SOURCE_FILE) { - if (qemuGetMemoryBackingPath(priv->driver, def, "ram", &mem_path) < 0) + if (qemuGetMemoryBackingPath(priv, def, "ram", &mem_path) < 0) return -1; } diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index cd891fd58f52..9a2ce910a5c8 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1736,10 +1736,11 @@ qemuDomainSecretPrepare(virQEMUDriver *driver, int -qemuGetMemoryBackingDomainPath(virQEMUDriver *driver, +qemuGetMemoryBackingDomainPath(qemuDomainObjPrivate *priv, const virDomainDef *def, char **path) { + virQEMUDriver *driver = priv->driver; g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver); const char *root = driver->embeddedRoot; g_autofree char *shortName = NULL; @@ -1760,7 +1761,7 @@ qemuGetMemoryBackingDomainPath(virQEMUDriver *driver, /** * qemuGetMemoryBackingPath: - * @driver: the qemu driver + * @priv: domain private data * @def: domain definition * @alias: memory object alias * @memPath: constructed path @@ -1771,7 +1772,7 @@ qemuGetMemoryBackingDomainPath(virQEMUDriver *driver, * -1 otherwise (with error reported). */ int -qemuGetMemoryBackingPath(virQEMUDriver *driver, +qemuGetMemoryBackingPath(qemuDomainObjPrivate *priv, const virDomainDef *def, const char *alias, char **memPath) @@ -1785,7 +1786,7 @@ qemuGetMemoryBackingPath(virQEMUDriver *driver, return -1; } - if (qemuGetMemoryBackingDomainPath(driver, def, &domainPath) < 0) + if (qemuGetMemoryBackingDomainPath(priv, def, &domainPath) < 0) return -1; *memPath = g_strdup_printf("%s/%s", domainPath, alias); diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 9d897b761e3a..355a9e1cb21e 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -936,11 +936,12 @@ void qemuDomainCleanupStorageSourceFD(virStorageSource *src); void qemuDomainStartupCleanup(virDomainObj *vm); -int qemuGetMemoryBackingDomainPath(virQEMUDriver *driver, + +int qemuGetMemoryBackingDomainPath(qemuDomainObjPrivate *priv, const virDomainDef *def, char **path); -int qemuGetMemoryBackingPath(virQEMUDriver *driver, +int qemuGetMemoryBackingPath(qemuDomainObjPrivate *priv, const virDomainDef *def, const char *alias, char **memPath); diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 2dcb627dbdc0..09a37caf85c3 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2404,7 +2404,7 @@ qemuDomainAttachMemory(virQEMUDriver *driver, qemuDomainObjExitMonitor(vm); if (objAdded && mem) - ignore_value(qemuProcessDestroyMemoryBackingPath(driver, vm, mem)); + ignore_value(qemuProcessDestroyMemoryBackingPath(vm, mem)); virErrorRestore(&orig_err); if (!mem) @@ -4761,7 +4761,7 @@ qemuDomainRemoveMemoryDevice(virQEMUDriver *driver, if (qemuDomainNamespaceTeardownMemory(vm, mem) < 0) VIR_WARN("Unable to remove memory device from /dev"); - if (qemuProcessDestroyMemoryBackingPath(driver, vm, mem) < 0) + if (qemuProcessDestroyMemoryBackingPath(vm, mem) < 0) VIR_WARN("Unable to destroy memory backing path"); qemuDomainReleaseMemoryDeviceSlot(vm, mem); diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 2e4ee9e30502..1d3a905dd854 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -4095,7 +4095,7 @@ qemuProcessBuildDestroyMemoryPaths(virQEMUDriver *driver, if (!build || shouldBuildMB) { g_autofree char *path = NULL; - if (qemuGetMemoryBackingDomainPath(driver, vm->def, &path) < 0) + if (qemuGetMemoryBackingDomainPath(QEMU_DOMAIN_PRIVATE(vm), vm->def, &path) < 0) return -1; if (qemuProcessBuildDestroyMemoryPathsImpl(driver, vm, @@ -4108,13 +4108,12 @@ qemuProcessBuildDestroyMemoryPaths(virQEMUDriver *driver, int -qemuProcessDestroyMemoryBackingPath(virQEMUDriver *driver, - virDomainObj *vm, +qemuProcessDestroyMemoryBackingPath(virDomainObj *vm, virDomainMemoryDef *mem) { g_autofree char *path = NULL; - if (qemuGetMemoryBackingPath(driver, vm->def, mem->info.alias, &path) < 0) + if (qemuGetMemoryBackingPath(QEMU_DOMAIN_PRIVATE(vm), vm->def, mem->info.alias, &path) < 0) return -1; if (unlink(path) < 0 && diff --git a/src/qemu/qemu_process.h b/src/qemu/qemu_process.h index 2324aeb7bdff..878c522d8255 100644 --- a/src/qemu/qemu_process.h +++ b/src/qemu/qemu_process.h @@ -43,8 +43,7 @@ int qemuProcessBuildDestroyMemoryPaths(virQEMUDriver *driver, virDomainMemoryDef *mem, bool build); -int qemuProcessDestroyMemoryBackingPath(virQEMUDriver *driver, - virDomainObj *vm, +int qemuProcessDestroyMemoryBackingPath(virDomainObj *vm, virDomainMemoryDef *mem); void qemuProcessReconnectAll(virQEMUDriver *driver); -- 2.46.1

This way we _can_ (but do not, yet) remember the memory backing path for running domains even after configuration change and daemon restart. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/qemu/qemu_domain.c | 5 ++ src/qemu/qemu_domain.h | 2 + .../memory-backing-dir-in.xml | 61 +++++++++++++++++++ .../memory-backing-dir-out.xml | 1 + tests/qemuxmlactivetest.c | 2 + 5 files changed, 71 insertions(+) create mode 100644 tests/qemustatusxml2xmldata/memory-backing-dir-in.xml create mode 120000 tests/qemustatusxml2xmldata/memory-backing-dir-out.xml diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 9a2ce910a5c8..76bcb70a5699 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1934,6 +1934,8 @@ qemuDomainObjPrivateDataClear(qemuDomainObjPrivate *priv) g_slist_free_full(g_steal_pointer(&priv->threadContextAliases), g_free); priv->migrationRecoverSetup = false; + + g_clear_pointer(&priv->memoryBackingDir, g_free); } @@ -2708,6 +2710,7 @@ qemuDomainObjPrivateXMLFormat(virBuffer *buf, virBufferEscapeString(buf, "<libDir path='%s'/>\n", priv->libDir); virBufferEscapeString(buf, "<channelTargetDir path='%s'/>\n", priv->channelTargetDir); + virBufferEscapeString(buf, "<memoryBackingDir path='%s'/>\n", priv->memoryBackingDir); virCPUDefFormatBufFull(buf, priv->origCPU, NULL); @@ -3429,6 +3432,8 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt, priv->channelTargetDir = tmp; tmp = NULL; + priv->memoryBackingDir = virXPathString("string(./memoryBackingDir/@path)", ctxt); + qemuDomainSetPrivatePathsOld(driver, vm); if (virCPUDefParseXML(ctxt, "./cpu", VIR_CPU_TYPE_GUEST, &priv->origCPU, diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 355a9e1cb21e..8f41c4af81c0 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -261,6 +261,8 @@ struct _qemuDomainObjPrivate { /* named file descriptor groups associated with the VM */ GHashTable *fds; + + char *memoryBackingDir; }; #define QEMU_DOMAIN_PRIVATE(vm) \ diff --git a/tests/qemustatusxml2xmldata/memory-backing-dir-in.xml b/tests/qemustatusxml2xmldata/memory-backing-dir-in.xml new file mode 100644 index 000000000000..eea671a41c0d --- /dev/null +++ b/tests/qemustatusxml2xmldata/memory-backing-dir-in.xml @@ -0,0 +1,61 @@ +<domstatus state='running' reason='booted' pid='3803518'> + <taint flag='high-privileges'/> + <monitor path='/var/lib/libvirt/qemu/test.monitor' type='unix'/> + <vcpus> + <vcpu id='0' pid='3803519'/> + </vcpus> + <qemuCaps> + <flag name='vnet-hdr'/> + <flag name='qxl.vgamem_mb'/> + <flag name='qxl-vga.vgamem_mb'/> + <flag name='pc-dimm'/> + </qemuCaps> + <lockstate>testtest</lockstate> + <devices> + <device alias='balloon0'/> + <device alias='video0'/> + <device alias='serial0'/> + <device alias='net0'/> + <device alias='usb'/> + </devices> + <numad nodeset='0-2' cpuset='1,3'/> + <libDir path='/tmp'/> + <channelTargetDir path='/var/lib/libvirt/qemu/channel/target'/> + <memoryBackingDir path='/some/random/path/1-QEMUGuest1'/> + <allowReboot value='yes'/> + <nodename index='0'/> + <fdset index='0'/> + <blockjobs active='no'/> + <agentTimeout>-2</agentTimeout> + <domain type='qemu' id='1'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='i686' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-i386</emulator> + <controller type='usb' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> + </controller> + <controller type='ide' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> + </controller> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <audio id='1' type='none'/> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> + </memballoon> + </devices> + </domain> +</domstatus> diff --git a/tests/qemustatusxml2xmldata/memory-backing-dir-out.xml b/tests/qemustatusxml2xmldata/memory-backing-dir-out.xml new file mode 120000 index 000000000000..fb0b1330b5b6 --- /dev/null +++ b/tests/qemustatusxml2xmldata/memory-backing-dir-out.xml @@ -0,0 +1 @@ +memory-backing-dir-in.xml \ No newline at end of file diff --git a/tests/qemuxmlactivetest.c b/tests/qemuxmlactivetest.c index 2aefc871ee2d..23ac807c76b4 100644 --- a/tests/qemuxmlactivetest.c +++ b/tests/qemuxmlactivetest.c @@ -248,6 +248,8 @@ mymain(void) DO_TEST_STATUS("backup-pull"); + DO_TEST_STATUS("memory-backing-dir"); + cleanup: qemuTestDriverFree(&driver); -- 2.46.1

This way we keep the path for each running VM. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/qemu/qemu_domain.c | 17 +++++++++++++++-- tests/qemustatusxml2xmldata/backup-pull-in.xml | 1 + .../blockjob-blockdev-in.xml | 1 + .../blockjob-mirror-in.xml | 1 + .../migration-in-params-in.xml | 1 + .../migration-out-nbd-bitmaps-in.xml | 1 + .../migration-out-nbd-out.xml | 1 + .../migration-out-nbd-tls-out.xml | 1 + .../migration-out-params-in.xml | 1 + tests/qemustatusxml2xmldata/modern-in.xml | 1 + tests/qemustatusxml2xmldata/upgrade-out.xml | 1 + tests/qemustatusxml2xmldata/vcpus-multi-in.xml | 1 + 12 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 76bcb70a5699..b05b1c9647a8 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1795,7 +1795,7 @@ qemuGetMemoryBackingPath(qemuDomainObjPrivate *priv, /* This is the old way of setting up per-domain directories */ -static void +static int qemuDomainSetPrivatePathsOld(virQEMUDriver *driver, virDomainObj *vm) { @@ -1808,6 +1808,13 @@ qemuDomainSetPrivatePathsOld(virQEMUDriver *driver, if (!priv->channelTargetDir) priv->channelTargetDir = g_strdup_printf("%s/domain-%s", cfg->channelTargetDir, vm->def->name); + + if (!priv->memoryBackingDir && + qemuGetMemoryBackingDomainPath(priv, vm->def, + &priv->memoryBackingDir) < 0) + return -1; + + return 0; } @@ -1829,6 +1836,11 @@ qemuDomainSetPrivatePaths(virQEMUDriver *driver, priv->channelTargetDir = g_strdup_printf("%s/%s", cfg->channelTargetDir, domname); + if (!priv->memoryBackingDir && + qemuGetMemoryBackingDomainPath(priv, vm->def, + &priv->memoryBackingDir) < 0) + return -1; + return 0; } @@ -3434,7 +3446,8 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt, priv->memoryBackingDir = virXPathString("string(./memoryBackingDir/@path)", ctxt); - qemuDomainSetPrivatePathsOld(driver, vm); + if (qemuDomainSetPrivatePathsOld(driver, vm) < 0) + return -1; if (virCPUDefParseXML(ctxt, "./cpu", VIR_CPU_TYPE_GUEST, &priv->origCPU, false) < 0) diff --git a/tests/qemustatusxml2xmldata/backup-pull-in.xml b/tests/qemustatusxml2xmldata/backup-pull-in.xml index e7fdc6c47832..2cedcc3cf227 100644 --- a/tests/qemustatusxml2xmldata/backup-pull-in.xml +++ b/tests/qemustatusxml2xmldata/backup-pull-in.xml @@ -231,6 +231,7 @@ </devices> <libDir path='/var/lib/libvirt/qemu/domain-4-copy'/> <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-4-copy'/> + <memoryBackingDir path='/var/lib/libvirt/qemu/ram/4-copy'/> <chardevStdioLogd/> <allowReboot value='yes'/> <nodename index='0'/> diff --git a/tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml b/tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml index 380ef053d2b8..1c45fad370c4 100644 --- a/tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml +++ b/tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml @@ -230,6 +230,7 @@ </devices> <libDir path='/var/lib/libvirt/qemu/domain-4-copy'/> <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-4-copy'/> + <memoryBackingDir path='/var/lib/libvirt/qemu/ram/4-copy'/> <chardevStdioLogd/> <allowReboot value='yes'/> <nodename index='0'/> diff --git a/tests/qemustatusxml2xmldata/blockjob-mirror-in.xml b/tests/qemustatusxml2xmldata/blockjob-mirror-in.xml index 1bcdeffcb876..df11e83cedb5 100644 --- a/tests/qemustatusxml2xmldata/blockjob-mirror-in.xml +++ b/tests/qemustatusxml2xmldata/blockjob-mirror-in.xml @@ -21,6 +21,7 @@ <numad nodeset='0-2' cpuset='1,3'/> <libDir path='/tmp'/> <channelTargetDir path='/var/lib/libvirt/qemu/channel/target'/> + <memoryBackingDir path='/var/lib/libvirt/qemu/ram/1-QEMUGuest1'/> <allowReboot value='yes'/> <nodename index='0'/> <fdset index='0'/> diff --git a/tests/qemustatusxml2xmldata/migration-in-params-in.xml b/tests/qemustatusxml2xmldata/migration-in-params-in.xml index 03773a089b3a..861d8eeadb92 100644 --- a/tests/qemustatusxml2xmldata/migration-in-params-in.xml +++ b/tests/qemustatusxml2xmldata/migration-in-params-in.xml @@ -254,6 +254,7 @@ </job> <libDir path='/var/lib/libvirt/qemu/domain-1-nest'/> <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-1-nest'/> + <memoryBackingDir path='/var/lib/libvirt/qemu/ram/1-nest'/> <chardevStdioLogd/> <allowReboot value='yes'/> <nodename index='0'/> diff --git a/tests/qemustatusxml2xmldata/migration-out-nbd-bitmaps-in.xml b/tests/qemustatusxml2xmldata/migration-out-nbd-bitmaps-in.xml index 4ee44ffbd480..5d76545513cc 100644 --- a/tests/qemustatusxml2xmldata/migration-out-nbd-bitmaps-in.xml +++ b/tests/qemustatusxml2xmldata/migration-out-nbd-bitmaps-in.xml @@ -320,6 +320,7 @@ </devices> <libDir path='/var/lib/libvirt/qemu/domain-11-migr'/> <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-11-migr'/> + <memoryBackingDir path='/var/lib/libvirt/qemu/ram/11-migr'/> <cpu mode='custom' match='exact' check='partial'> <model fallback='forbid'>EPYC-Rome</model> <vendor>AMD</vendor> diff --git a/tests/qemustatusxml2xmldata/migration-out-nbd-out.xml b/tests/qemustatusxml2xmldata/migration-out-nbd-out.xml index de92146eaacb..581cf2828605 100644 --- a/tests/qemustatusxml2xmldata/migration-out-nbd-out.xml +++ b/tests/qemustatusxml2xmldata/migration-out-nbd-out.xml @@ -257,6 +257,7 @@ <numad nodeset='0' cpuset='0-7'/> <libDir path='/var/lib/libvirt/qemu/domain-4-upstream'/> <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-4-upstream'/> + <memoryBackingDir path='/var/lib/libvirt/qemu/ram/4-upstream'/> <chardevStdioLogd/> <allowReboot value='yes'/> <nodename index='0'/> diff --git a/tests/qemustatusxml2xmldata/migration-out-nbd-tls-out.xml b/tests/qemustatusxml2xmldata/migration-out-nbd-tls-out.xml index 6bdd12825969..dacaa3e42f42 100644 --- a/tests/qemustatusxml2xmldata/migration-out-nbd-tls-out.xml +++ b/tests/qemustatusxml2xmldata/migration-out-nbd-tls-out.xml @@ -286,6 +286,7 @@ <numad nodeset='0' cpuset='0-7'/> <libDir path='/var/lib/libvirt/qemu/domain-3-upstream'/> <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-3-upstream'/> + <memoryBackingDir path='/var/lib/libvirt/qemu/ram/3-upstream'/> <chardevStdioLogd/> <allowReboot value='yes'/> <nodename index='0'/> diff --git a/tests/qemustatusxml2xmldata/migration-out-params-in.xml b/tests/qemustatusxml2xmldata/migration-out-params-in.xml index 24ee86e4c04e..b914236b62fc 100644 --- a/tests/qemustatusxml2xmldata/migration-out-params-in.xml +++ b/tests/qemustatusxml2xmldata/migration-out-params-in.xml @@ -268,6 +268,7 @@ </devices> <libDir path='/var/lib/libvirt/qemu/domain-7-nest'/> <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-7-nest'/> + <memoryBackingDir path='/var/lib/libvirt/qemu/ram/7-nest'/> <chardevStdioLogd/> <allowReboot value='yes'/> <nodename index='0'/> diff --git a/tests/qemustatusxml2xmldata/modern-in.xml b/tests/qemustatusxml2xmldata/modern-in.xml index f0f5df84ab20..3b3e83175997 100644 --- a/tests/qemustatusxml2xmldata/modern-in.xml +++ b/tests/qemustatusxml2xmldata/modern-in.xml @@ -258,6 +258,7 @@ <numad nodeset='6' cpuset='0-7'/> <libDir path='/var/lib/libvirt/qemu/domain-1-upstream'/> <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-1-upstream'/> + <memoryBackingDir path='/var/lib/libvirt/qemu/ram/1-upstream'/> <chardevStdioLogd/> <allowReboot value='yes'/> <nodename index='123'/> diff --git a/tests/qemustatusxml2xmldata/upgrade-out.xml b/tests/qemustatusxml2xmldata/upgrade-out.xml index e663b3dbb5e9..c7bc7128df60 100644 --- a/tests/qemustatusxml2xmldata/upgrade-out.xml +++ b/tests/qemustatusxml2xmldata/upgrade-out.xml @@ -256,6 +256,7 @@ <numad nodeset='6' cpuset='0-7'/> <libDir path='/var/lib/libvirt/qemu/domain-1-upstream'/> <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-1-upstream'/> + <memoryBackingDir path='/var/lib/libvirt/qemu/ram/1-upstream'/> <chardevStdioLogd/> <allowReboot value='yes'/> <nodename index='0'/> diff --git a/tests/qemustatusxml2xmldata/vcpus-multi-in.xml b/tests/qemustatusxml2xmldata/vcpus-multi-in.xml index fa6a6a99f480..6ee688ce037d 100644 --- a/tests/qemustatusxml2xmldata/vcpus-multi-in.xml +++ b/tests/qemustatusxml2xmldata/vcpus-multi-in.xml @@ -307,6 +307,7 @@ <numad nodeset='0-2' cpuset='1,3'/> <libDir path='/tmp'/> <channelTargetDir path='/var/lib/libvirt/qemu/channel/target'/> + <memoryBackingDir path='/var/lib/libvirt/qemu/ram/1729-QEMUGuest1'/> <allowReboot value='yes'/> <nodename index='0'/> <fdset index='0'/> -- 2.46.1

The function qemuGetMemoryBackingPath() does not need the @def any more and priv->memoryBackingDir can be used instead of constructing the path by calling qemuGetMemoryBackingDomainPath(). Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/qemu/qemu_command.c | 4 ++-- src/qemu/qemu_domain.c | 8 +------- src/qemu/qemu_domain.h | 1 - src/qemu/qemu_process.c | 9 +++------ 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index f36b02b76b35..167ee8240b22 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3222,7 +3222,7 @@ qemuBuildMemoryBackendProps(virJSONValue **backendProps, } else { /* We can have both pagesize and mem source. If that's the case, * prefer hugepages as those are more specific. */ - if (qemuGetMemoryBackingPath(priv, def, mem->info.alias, &memPath) < 0) + if (qemuGetMemoryBackingPath(priv, mem->info.alias, &memPath) < 0) return -1; } @@ -7116,7 +7116,7 @@ qemuBuildMemPathStr(const virDomainDef *def, return -1; prealloc = true; } else if (def->mem.source == VIR_DOMAIN_MEMORY_SOURCE_FILE) { - if (qemuGetMemoryBackingPath(priv, def, "ram", &mem_path) < 0) + if (qemuGetMemoryBackingPath(priv, "ram", &mem_path) < 0) return -1; } diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index b05b1c9647a8..3e80313ab748 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1762,7 +1762,6 @@ qemuGetMemoryBackingDomainPath(qemuDomainObjPrivate *priv, /** * qemuGetMemoryBackingPath: * @priv: domain private data - * @def: domain definition * @alias: memory object alias * @memPath: constructed path * @@ -1773,12 +1772,9 @@ qemuGetMemoryBackingDomainPath(qemuDomainObjPrivate *priv, */ int qemuGetMemoryBackingPath(qemuDomainObjPrivate *priv, - const virDomainDef *def, const char *alias, char **memPath) { - g_autofree char *domainPath = NULL; - if (!alias) { /* This should never happen (TM) */ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", @@ -1786,10 +1782,8 @@ qemuGetMemoryBackingPath(qemuDomainObjPrivate *priv, return -1; } - if (qemuGetMemoryBackingDomainPath(priv, def, &domainPath) < 0) - return -1; + *memPath = g_strdup_printf("%s/%s", priv->memoryBackingDir, alias); - *memPath = g_strdup_printf("%s/%s", domainPath, alias); return 0; } diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 8f41c4af81c0..dcff4272b869 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -944,7 +944,6 @@ int qemuGetMemoryBackingDomainPath(qemuDomainObjPrivate *priv, char **path); int qemuGetMemoryBackingPath(qemuDomainObjPrivate *priv, - const virDomainDef *def, const char *alias, char **memPath); diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 1d3a905dd854..dd3afbeb39ac 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -4094,12 +4094,9 @@ qemuProcessBuildDestroyMemoryPaths(virQEMUDriver *driver, } if (!build || shouldBuildMB) { - g_autofree char *path = NULL; - if (qemuGetMemoryBackingDomainPath(QEMU_DOMAIN_PRIVATE(vm), vm->def, &path) < 0) - return -1; - if (qemuProcessBuildDestroyMemoryPathsImpl(driver, vm, - path, build) < 0) + QEMU_DOMAIN_PRIVATE(vm)->memoryBackingDir, + build) < 0) return -1; } @@ -4113,7 +4110,7 @@ qemuProcessDestroyMemoryBackingPath(virDomainObj *vm, { g_autofree char *path = NULL; - if (qemuGetMemoryBackingPath(QEMU_DOMAIN_PRIVATE(vm), vm->def, mem->info.alias, &path) < 0) + if (qemuGetMemoryBackingPath(QEMU_DOMAIN_PRIVATE(vm), mem->info.alias, &path) < 0) return -1; if (unlink(path) < 0 && -- 2.46.1

After previous patches it is not used (and should not be used) outside of qemu_domain.c. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/qemu/qemu_domain.c | 2 +- src/qemu/qemu_domain.h | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 3e80313ab748..a92eaef80af0 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1735,7 +1735,7 @@ qemuDomainSecretPrepare(virQEMUDriver *driver, } -int +static int qemuGetMemoryBackingDomainPath(qemuDomainObjPrivate *priv, const virDomainDef *def, char **path) diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index dcff4272b869..cb42577ee51a 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -939,10 +939,6 @@ void qemuDomainCleanupStorageSourceFD(virStorageSource *src); void qemuDomainStartupCleanup(virDomainObj *vm); -int qemuGetMemoryBackingDomainPath(qemuDomainObjPrivate *priv, - const virDomainDef *def, - char **path); - int qemuGetMemoryBackingPath(qemuDomainObjPrivate *priv, const char *alias, char **memPath); -- 2.46.1

This way they make sense not only based on where they are located but the name also relates to what they are actually doing. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/qemu/qemu_command.c | 5 +++-- src/qemu/qemu_domain.c | 22 +++++++++++----------- src/qemu/qemu_domain.h | 6 +++--- src/qemu/qemu_process.c | 3 ++- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 167ee8240b22..a0c9e5f8b399 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3222,7 +3222,8 @@ qemuBuildMemoryBackendProps(virJSONValue **backendProps, } else { /* We can have both pagesize and mem source. If that's the case, * prefer hugepages as those are more specific. */ - if (qemuGetMemoryBackingPath(priv, mem->info.alias, &memPath) < 0) + if (qemuDomainGetMemoryBackingPath(priv, mem->info.alias, + &memPath) < 0) return -1; } @@ -7116,7 +7117,7 @@ qemuBuildMemPathStr(const virDomainDef *def, return -1; prealloc = true; } else if (def->mem.source == VIR_DOMAIN_MEMORY_SOURCE_FILE) { - if (qemuGetMemoryBackingPath(priv, "ram", &mem_path) < 0) + if (qemuDomainGetMemoryBackingPath(priv, "ram", &mem_path) < 0) return -1; } diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index a92eaef80af0..49318f518788 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1736,9 +1736,9 @@ qemuDomainSecretPrepare(virQEMUDriver *driver, static int -qemuGetMemoryBackingDomainPath(qemuDomainObjPrivate *priv, - const virDomainDef *def, - char **path) +qemuDomainGenerateMemoryBackingPath(qemuDomainObjPrivate *priv, + const virDomainDef *def, + char **path) { virQEMUDriver *driver = priv->driver; g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver); @@ -1760,7 +1760,7 @@ qemuGetMemoryBackingDomainPath(qemuDomainObjPrivate *priv, /** - * qemuGetMemoryBackingPath: + * qemuDomainGetMemoryBackingPath: * @priv: domain private data * @alias: memory object alias * @memPath: constructed path @@ -1771,9 +1771,9 @@ qemuGetMemoryBackingDomainPath(qemuDomainObjPrivate *priv, * -1 otherwise (with error reported). */ int -qemuGetMemoryBackingPath(qemuDomainObjPrivate *priv, - const char *alias, - char **memPath) +qemuDomainGetMemoryBackingPath(qemuDomainObjPrivate *priv, + const char *alias, + char **memPath) { if (!alias) { /* This should never happen (TM) */ @@ -1804,8 +1804,8 @@ qemuDomainSetPrivatePathsOld(virQEMUDriver *driver, cfg->channelTargetDir, vm->def->name); if (!priv->memoryBackingDir && - qemuGetMemoryBackingDomainPath(priv, vm->def, - &priv->memoryBackingDir) < 0) + qemuDomainGenerateMemoryBackingPath(priv, vm->def, + &priv->memoryBackingDir) < 0) return -1; return 0; @@ -1831,8 +1831,8 @@ qemuDomainSetPrivatePaths(virQEMUDriver *driver, cfg->channelTargetDir, domname); if (!priv->memoryBackingDir && - qemuGetMemoryBackingDomainPath(priv, vm->def, - &priv->memoryBackingDir) < 0) + qemuDomainGenerateMemoryBackingPath(priv, vm->def, + &priv->memoryBackingDir) < 0) return -1; return 0; diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index cb42577ee51a..ba357af8f4b6 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -939,9 +939,9 @@ void qemuDomainCleanupStorageSourceFD(virStorageSource *src); void qemuDomainStartupCleanup(virDomainObj *vm); -int qemuGetMemoryBackingPath(qemuDomainObjPrivate *priv, - const char *alias, - char **memPath); +int qemuDomainGetMemoryBackingPath(qemuDomainObjPrivate *priv, + const char *alias, + char **memPath); int qemuDomainSecretPrepare(virQEMUDriver *driver, virDomainObj *vm) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index dd3afbeb39ac..a00066e88ed2 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -4110,7 +4110,8 @@ qemuProcessDestroyMemoryBackingPath(virDomainObj *vm, { g_autofree char *path = NULL; - if (qemuGetMemoryBackingPath(QEMU_DOMAIN_PRIVATE(vm), mem->info.alias, &path) < 0) + if (qemuDomainGetMemoryBackingPath(QEMU_DOMAIN_PRIVATE(vm), + mem->info.alias, &path) < 0) return -1; if (unlink(path) < 0 && -- 2.46.1

This makes qemuDomainGenerateMemoryBackingPath() nicer to call. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/qemu/qemu_domain.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 49318f518788..bbdbfd4c0e6e 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1737,22 +1737,28 @@ qemuDomainSecretPrepare(virQEMUDriver *driver, static int qemuDomainGenerateMemoryBackingPath(qemuDomainObjPrivate *priv, - const virDomainDef *def, - char **path) + const virDomainDef *def) { virQEMUDriver *driver = priv->driver; g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver); const char *root = driver->embeddedRoot; g_autofree char *shortName = NULL; + if (priv->memoryBackingDir) + return 0; + if (!(shortName = virDomainDefGetShortName(def))) return -1; if (root && !STRPREFIX(cfg->memoryBackingDir, root)) { g_autofree char * hash = virDomainDriverGenerateRootHash("qemu", root); - *path = g_strdup_printf("%s/%s-%s", cfg->memoryBackingDir, hash, shortName); + priv->memoryBackingDir = g_strdup_printf("%s/%s-%s", + cfg->memoryBackingDir, + hash, shortName); } else { - *path = g_strdup_printf("%s/%s", cfg->memoryBackingDir, shortName); + priv->memoryBackingDir = g_strdup_printf("%s/%s", + cfg->memoryBackingDir, + shortName); } return 0; @@ -1803,12 +1809,7 @@ qemuDomainSetPrivatePathsOld(virQEMUDriver *driver, priv->channelTargetDir = g_strdup_printf("%s/domain-%s", cfg->channelTargetDir, vm->def->name); - if (!priv->memoryBackingDir && - qemuDomainGenerateMemoryBackingPath(priv, vm->def, - &priv->memoryBackingDir) < 0) - return -1; - - return 0; + return qemuDomainGenerateMemoryBackingPath(priv, vm->def); } @@ -1830,12 +1831,7 @@ qemuDomainSetPrivatePaths(virQEMUDriver *driver, priv->channelTargetDir = g_strdup_printf("%s/%s", cfg->channelTargetDir, domname); - if (!priv->memoryBackingDir && - qemuDomainGenerateMemoryBackingPath(priv, vm->def, - &priv->memoryBackingDir) < 0) - return -1; - - return 0; + return qemuDomainGenerateMemoryBackingPath(priv, vm->def); } -- 2.46.1

On 9/23/24 13:47, Martin Kletzander wrote:
Every time we work with file-backed memory we construct the paths from the driver config. Not only does is that slow, it is also wrong. If the configuration changes while a domain with file-backed memory is running, once the daemon is restarted and the domain is being stopped, we construct the wrong path to clean up. And it also makes it more difficult to change that in the future, for example the patch series which led me to write this patch series:
https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/I6VO...
The patches are maybe split way too much, so feel free to suggest squashing some together, I'm not opposed to that.
v2: - Do not introduce unused functions
v1: - https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/H57G6...
Martin Kletzander (8): qemu: Move domain-related functions to qemu_domain qemu: Change parameters of qemuGetMemoryBackingDomainPath() qemu: Add memoryBackingDir to qemuDomainObjPrivate qemu: Set memoryBackingDir in private data upon start qemu: Use per-domain private memoryBackingDir for new memory backends qemu: Make qemuGetMemoryBackingDomainPath static qemu: Rename memory path functions qemu: Generate domain memory backing path directly
src/qemu/qemu_command.c | 5 +- src/qemu/qemu_conf.c | 58 --------------- src/qemu/qemu_conf.h | 8 -- src/qemu/qemu_domain.c | 73 ++++++++++++++++++- src/qemu/qemu_domain.h | 7 ++ src/qemu/qemu_hotplug.c | 4 +- src/qemu/qemu_process.c | 13 ++-- src/qemu/qemu_process.h | 3 +- .../qemustatusxml2xmldata/backup-pull-in.xml | 1 + .../blockjob-blockdev-in.xml | 1 + .../blockjob-mirror-in.xml | 1 + .../memory-backing-dir-in.xml | 61 ++++++++++++++++ .../memory-backing-dir-out.xml | 1 + .../migration-in-params-in.xml | 1 + .../migration-out-nbd-bitmaps-in.xml | 1 + .../migration-out-nbd-out.xml | 1 + .../migration-out-nbd-tls-out.xml | 1 + .../migration-out-params-in.xml | 1 + tests/qemustatusxml2xmldata/modern-in.xml | 1 + tests/qemustatusxml2xmldata/upgrade-out.xml | 1 + .../qemustatusxml2xmldata/vcpus-multi-in.xml | 1 + tests/qemuxmlactivetest.c | 2 + 22 files changed, 163 insertions(+), 83 deletions(-) create mode 100644 tests/qemustatusxml2xmldata/memory-backing-dir-in.xml create mode 120000 tests/qemustatusxml2xmldata/memory-backing-dir-out.xml
Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Michal
participants (2)
-
Martin Kletzander
-
Michal Prívozník