mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-30 13:37:17 +00:00
qemuBuildNumaCommandLine: Fix @masterInitiator check
A few commits ago, in aeecbc87b7
, I've implemented command line
generation for ACPI HMAT. For this, we need to know if at least
one guest NUMA node has vCPUs. This is tracked in
@masterInitiator variable, which is initialized to -1, then we
iterate through guest NUMA nodes and break the loop if we find a
node with a vCPU. After the loop, if masterInitiator is still
negative then no NUMA node has a vCPU and we error out. But this
exact check was missing comparison for negativeness.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
70bb493efc
commit
ccf627c110
@ -7312,7 +7312,7 @@ qemuBuildNumaCommandLine(virQEMUDriverConfigPtr cfg,
|
||||
}
|
||||
}
|
||||
|
||||
if (masterInitiator) {
|
||||
if (masterInitiator < 0) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("At least one NUMA node has to have CPUs"));
|
||||
goto cleanup;
|
||||
|
Loading…
Reference in New Issue
Block a user