mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
qemu: Fallback to HMP when cpu_set QMP command is not found
This commit is contained in:
parent
a9c32b5d62
commit
ce81bc5ce8
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user