Some users might want to have virtio-pmem backed by a block device in which case we have to allow the device in CGroups. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/qemu/qemu_cgroup.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index f7146a71c9..cb8112ea90 100644 --- a/src/qemu/qemu_cgroup.c +++ b/src/qemu/qemu_cgroup.c @@ -502,7 +502,8 @@ qemuSetupMemoryDevicesCgroup(virDomainObjPtr vm, qemuDomainObjPrivatePtr priv = vm->privateData; int rv; - 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; if (!virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_DEVICES)) @@ -525,7 +526,8 @@ qemuTeardownMemoryDevicesCgroup(virDomainObjPtr vm, qemuDomainObjPrivatePtr priv = vm->privateData; int rv; - 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; if (!virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_DEVICES)) -- 2.26.2