提交 ce81bc5c 编写于 作者: W Wen Congyang 提交者: Eric Blake

qemu: Fallback to HMP when cpu_set QMP command is not found

上级 a9c32b5d
......@@ -1450,7 +1450,14 @@ int qemuMonitorJSONSetCPU(qemuMonitorPtr mon,
if (!cmd)
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) {
/* XXX See if CPU soft-failed due to lack of ACPI */
......@@ -1468,10 +1475,7 @@ int qemuMonitorJSONSetCPU(qemuMonitorPtr mon,
ret = 1;
}
#if 0
cleanup:
#endif
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册