On Wed, Nov 25, 2026 at 13:08:32 +0100, Michal Privoznik via Devel wrote:
From: Michal Privoznik <mprivozn@redhat.com>
There are some limitations, when it comes to configuring guest NUMA nodes:
1) only continuous node IDs are allowed, and 2) no duplicate entries are allowed.
Both of these constraints are checked for while parsing the XML, in virDomainNumaDefParseXML(). But it is done so in a bit clumsy way. Because constraint 2) is checked for by comparing previously parsed memory size with zero. But if the input XML contains a cell with no memory this check fails. Specifically, if 'memory' is zero then def->mem_nodes[cur_cell].mem check returns false, even though the node was seen earlier.
Switch to a bitmap which keeps track of nodes already seen.
Resolves: https://gitlab.com/libvirt/libvirt/-/work_items/957 Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/conf/numa_conf.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
Reviewed-by: Peter Krempa <pipo@pipo.sk>