]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu_domain: Deduplicate targetNode check in qemuDomainDefValidateMemoryHotplugDevice()
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 13 Jul 2023 08:29:11 +0000 (10:29 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 13 Jul 2023 14:34:15 +0000 (16:34 +0200)
commit851c5f075b6c68ff5acd06694784b496171f2796
treedf2f549a53f046a0c24d5e8b7821c881818516da
parentb9eeeebddb236dc8c778fd059073ca1db0ed364b
qemu_domain: Deduplicate targetNode check in qemuDomainDefValidateMemoryHotplugDevice()

If a domain has NUMA configured, then all <memory/> devices
(except for 'virtio-pmem') need to have targetNode set. There are
two checks inside of qemuDomainDefValidateMemoryHotplugDevice()
for this: one inside of big switch() statement, which only checks
'dimm' and 'nvdimm' cases, and the other at the end of the
function that checks all models (except for 'virtio-pmem'). Let's
keep the latter and remove the former as the latter covers the
former too.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
src/qemu/qemu_domain.c