mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
qemu_validate: Check capability for virtio-mem dynamicMemslots
The QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI_DYNAMIC_MEMSLOTS reflects whether QEMU is capable of .dynamic-memslots for virtio-mem. Use it when validating domain configuration. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
497cab753b
commit
6be07af817
@ -5066,6 +5066,13 @@ qemuValidateDomainDeviceDefMemory(virDomainMemoryDef *mem,
|
||||
_("virtio-mem isn't supported by this QEMU binary"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (mem->target.virtio_mem.dynamicMemslots == VIR_TRISTATE_BOOL_YES &&
|
||||
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI_DYNAMIC_MEMSLOTS)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("virtio-mem does not support dynamicMemslots"));
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_MEMORY_MODEL_SGX_EPC:
|
||||
|
Loading…
Reference in New Issue
Block a user