From: Michal Privoznik Date: Tue, 11 Oct 2022 14:48:38 +0000 (+0200) Subject: qemu: Create base hugepages path on memory hotplug X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=babcbf2d5c883c1f76d2134a4a3f4ce1958a30f5;p=libvirt.git qemu: Create base hugepages path on memory hotplug Users can play all sorts of games with mount points. For instance, they can unmount and mount back a hugetlbfs and only after that attempt to hotplug memory. This has an unfortunate consequence though. During memory hotplug, when qemuProcessBuildDestroyMemoryPaths() is called the path is created with very restrictive mode (0700) because under the hood g_mkdir_with_parents(path, 0700) is called. Therefore, create the driver generic portion of the path separately. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2134009 Signed-off-by: Michal Privoznik Reviewed-by: Erik Skultety --- diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index e6fd9395de..1a9175f40f 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -4015,6 +4015,10 @@ qemuProcessBuildDestroyMemoryPaths(virQEMUDriver *driver, if (!path) return -1; + if (build && + qemuHugepageMakeBasedir(driver, &cfg->hugetlbfs[i]) < 0) + return -1; + if (qemuProcessBuildDestroyMemoryPathsImpl(driver, vm, path, build) < 0) return -1;