qemu: Create virtio-pmem in namespace

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>
This commit is contained in:
Michal Privoznik 2020-12-10 10:18:19 +01:00
parent a536873d82
commit 5b4b8dd1e2

View 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);