}
-/*
- * Returns: 0 if CPU modification was successful or -1 on failure
- */
-int
-qemuMonitorSetCPU(qemuMonitor *mon, int cpu, bool online)
-{
- VIR_DEBUG("cpu=%d online=%d", cpu, online);
-
- QEMU_CHECK_MONITOR(mon);
-
- return qemuMonitorJSONSetCPU(mon, cpu, online);
-}
-
-
int
qemuMonitorEjectMedia(qemuMonitor *mon,
const char *dev_name,
const char *expire_time);
int qemuMonitorSetBalloon(qemuMonitor *mon,
unsigned long long newmem);
-int qemuMonitorSetCPU(qemuMonitor *mon, int cpu, bool online);
-
/* XXX should we pass the virDomainDiskDef *instead
* and hide dev_name details inside monitor. Reconsider
}
-int qemuMonitorJSONSetCPU(qemuMonitor *mon,
- int cpu, bool online)
-{
- g_autoptr(virJSONValue) cmd = NULL;
- g_autoptr(virJSONValue) reply = NULL;
-
- if (online) {
- cmd = qemuMonitorJSONMakeCommand("cpu-add",
- "i:id", cpu,
- NULL);
- } else {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("vCPU unplug is not supported by this QEMU"));
- return -1;
- }
- if (!cmd)
- return -1;
-
- if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
- return -1;
-
- return qemuMonitorJSONCheckError(cmd, reply);
-}
-
-
/**
* Run QMP command to eject a media from ejectable device.
*
const char *expire_time);
int qemuMonitorJSONSetBalloon(qemuMonitor *mon,
unsigned long long newmem);
-int qemuMonitorJSONSetCPU(qemuMonitor *mon, int cpu, bool online);
int qemuMonitorJSONEjectMedia(qemuMonitor *mon,
const char *dev_name,
GEN_TEST_FUNC(qemuMonitorJSONSetPassword, "spice", "secret_password", "disconnect")
GEN_TEST_FUNC(qemuMonitorJSONExpirePassword, "spice", "123456")
GEN_TEST_FUNC(qemuMonitorJSONSetBalloon, 1024)
-GEN_TEST_FUNC(qemuMonitorJSONSetCPU, 1, true)
GEN_TEST_FUNC(qemuMonitorJSONEjectMedia, "hdc", true)
GEN_TEST_FUNC(qemuMonitorJSONChangeMedia, "hdc", "/foo/bar", "formatstr")
GEN_TEST_FUNC(qemuMonitorJSONSaveVirtualMemory, 0, 1024, "/foo/bar")
DO_TEST_GEN(qemuMonitorJSONSetPassword);
DO_TEST_GEN(qemuMonitorJSONExpirePassword);
DO_TEST_GEN(qemuMonitorJSONSetBalloon);
- DO_TEST_GEN_DEPRECATED(qemuMonitorJSONSetCPU, true);
DO_TEST_GEN(qemuMonitorJSONEjectMedia);
DO_TEST_GEN_DEPRECATED(qemuMonitorJSONChangeMedia, true);
DO_TEST_GEN(qemuMonitorJSONSaveVirtualMemory);