[PATCH 5/6] qemu: Create virtio-pmem in namespace

Michal Privoznik mprivozn at redhat.com
Fri Jan 15 14:12:19 UTC 2021


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 at redhat.com>
---
 src/qemu/qemu_namespace.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_namespace.c b/src/qemu/qemu_namespace.c
index 1002455ddf..35fe177bef 100644
--- a/src/qemu/qemu_namespace.c
+++ b/src/qemu/qemu_namespace.c
@@ -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);
-- 
2.26.2




More information about the libvir-list mailing list