mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: Fallback to HMP when cpu_set QMP command is not found
This commit is contained in:
@@ -1450,7 +1450,14 @@ int qemuMonitorJSONSetCPU(qemuMonitorPtr mon,
|
|||||||
if (!cmd)
|
if (!cmd)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
ret = qemuMonitorJSONCommand(mon, cmd, &reply);
|
if ((ret = qemuMonitorJSONCommand(mon, cmd, &reply)) < 0)
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
|
if (qemuMonitorJSONHasError(reply, "CommandNotFound")) {
|
||||||
|
VIR_DEBUG0("cpu_set command not found, trying HMP");
|
||||||
|
ret = qemuMonitorTextSetCPU(mon, cpu, online);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
/* XXX See if CPU soft-failed due to lack of ACPI */
|
/* XXX See if CPU soft-failed due to lack of ACPI */
|
||||||
@@ -1468,10 +1475,7 @@ int qemuMonitorJSONSetCPU(qemuMonitorPtr mon,
|
|||||||
ret = 1;
|
ret = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
cleanup:
|
cleanup:
|
||||||
#endif
|
|
||||||
|
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user