]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Create virtio-pmem in namespace
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 10 Dec 2020 09:18:19 +0000 (10:18 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 18 Jan 2021 10:53:48 +0000 (11:53 +0100)
Some users might want to have virtio-pmem backed by a block device
in which case we have to create the device in the domain private
namespace.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
src/qemu/qemu_namespace.c

index 1002455ddf56444df9f5eff2dfa5f17fb45ef554..35fe177befab8739fb50c06d2ad0419ccf71a76d 100644 (file)
@@ -351,7 +351,8 @@ static int
 qemuDomainSetupMemory(virDomainMemoryDefPtr mem,
                       char ***paths)
 {
-    if (mem->model != VIR_DOMAIN_MEMORY_MODEL_NVDIMM)
+    if (mem->model != VIR_DOMAIN_MEMORY_MODEL_NVDIMM &&
+        mem->model != VIR_DOMAIN_MEMORY_MODEL_VIRTIO_PMEM)
         return 0;
 
     return virStringListAdd(paths, mem->nvdimmPath);