mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
qemu: Add check for needed paths for memory devices
When building a commandline for a DIMM memory device with non-default access mode, the qemuBuildMemoryBackendProps() will tell QEMU to allocate memory from per-domain memory backing dir. But later, when preparing the host, the qemuProcessNeedMemoryBackingPath() does not check for memory devices at all resulting in per-domain memory backing dir not being created which upsets QEMU. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1961114 Signed-off-by: Kristina Hanicova <khanicov@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
015fe0439f
commit
19967f64f4
@ -3938,6 +3938,11 @@ qemuProcessNeedMemoryBackingPath(virDomainDef *def,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < def->nmems; i++) {
|
||||||
|
if (def->mems[i]->access != VIR_DOMAIN_MEMORY_ACCESS_DEFAULT)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (mem) {
|
if (mem) {
|
||||||
switch (mem->model) {
|
switch (mem->model) {
|
||||||
case VIR_DOMAIN_MEMORY_MODEL_DIMM:
|
case VIR_DOMAIN_MEMORY_MODEL_DIMM:
|
||||||
|
Loading…
Reference in New Issue
Block a user