mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-11 13:34:45 -05:00
qemu_monitor: allow cpu props to be optional
Some older s390 CPU models (e.g. z900) will not report props as a response from query-cpu-model-expansion. As such, we should make the props field optional when parsing the return data from the QMP response. Signed-off-by: Collin Walling <walling@linux.ibm.com> Message-Id: <1568924706-2311-6-git-send-email-walling@linux.ibm.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
committed by
Jiri Denemark
parent
708f48525a
commit
afd222684e
+5
-1
@@ -482,6 +482,7 @@ cpuTestMakeQEMUCaps(const struct data *data)
|
||||
qemuMonitorTestPtr testMon = NULL;
|
||||
qemuMonitorCPUModelInfoPtr model = NULL;
|
||||
virCPUDefPtr cpu = NULL;
|
||||
bool fail_no_props = true;
|
||||
char *json = NULL;
|
||||
|
||||
if (virAsprintf(&json, "%s/cputestdata/%s-cpuid-%s.json",
|
||||
@@ -494,9 +495,12 @@ cpuTestMakeQEMUCaps(const struct data *data)
|
||||
if (VIR_ALLOC(cpu) < 0 || VIR_STRDUP(cpu->model, "host") < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (ARCH_IS_S390(data->arch))
|
||||
fail_no_props = false;
|
||||
|
||||
if (qemuMonitorGetCPUModelExpansion(qemuMonitorTestGetMonitor(testMon),
|
||||
QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC,
|
||||
cpu, true, &model) < 0)
|
||||
cpu, true, fail_no_props, &model) < 0)
|
||||
goto error;
|
||||
|
||||
if (!(qemuCaps = virQEMUCapsNew()))
|
||||
|
||||
Reference in New Issue
Block a user