-
- Downloads
virDomainMemoryDefValidate: Check for overlapping memory devices
As of v9.4.0-rc2~5 it is possible to specify guest address where a virtio-mem/virtio-pmem memory device is mapped to. What that commit forgot to introduce was a check for overlaps. And yes, this is technically an O(n^2) algorithm, as virDomainMemoryDefValidate() is called over each memory device and after this, virDomainMemoryDefValidate() also iterates over each memory device. But given there's usually only a handful of such devices, and this runs only when parsing domain XML I guess code readability wins over some less obvious solution. Resolves: https://issues.redhat.com/browse/RHEL-4452 Signed-off-by:Michal Privoznik <mprivozn@redhat.com> Reviewed-by:
Ján Tomko <jtomko@redhat.com>
Showing
- src/conf/domain_validate.c 47 additions, 0 deletionssrc/conf/domain_validate.c
- tests/qemuxml2argvdata/memory-hotplug-virtio-mem-overlap-address.x86_64-latest.err 1 addition, 0 deletions...mory-hotplug-virtio-mem-overlap-address.x86_64-latest.err
- tests/qemuxml2argvdata/memory-hotplug-virtio-mem-overlap-address.xml 50 additions, 0 deletions...ml2argvdata/memory-hotplug-virtio-mem-overlap-address.xml
- tests/qemuxml2argvtest.c 1 addition, 0 deletionstests/qemuxml2argvtest.c
Loading