The code parsing thue query-cpu-definitions response will short-circuit
the for loop in the case where usable=yes, resulting in us failing to
parse the CPU deprecation flag.
IOW, we only reported deprecations in domain capabilities for CPU models
which were not runnable on the host.
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
if (g_strv_length(cpu->blockers) == 0) {
cpu->usable = VIR_DOMCAPS_CPU_USABLE_YES;
g_clear_pointer(&cpu->blockers, g_strfreev);
- continue;
+ } else {
+ cpu->usable = VIR_DOMCAPS_CPU_USABLE_NO;
}
-
- cpu->usable = VIR_DOMCAPS_CPU_USABLE_NO;
}
if (virJSONValueObjectHasKey(child, "deprecated") &&