}
+/* qemuMonitorGetCPUMigratable:
+ *
+ * Get the migratable property of the CPU object.
+ *
+ * Returns -1 on error,
+ * 1 when the property is not supported,
+ * 0 on success (@migratable is set accordingly).
+ */
+int
+qemuMonitorGetCPUMigratable(qemuMonitorPtr mon,
+ bool *migratable)
+{
+ QEMU_CHECK_MONITOR(mon);
+
+ return qemuMonitorJSONGetCPUMigratable(mon, migratable);
+}
+
+
int
qemuMonitorTransactionBitmapAdd(virJSONValuePtr actions,
const char *node,
qemuMonitorJobInfoPtr **jobs,
size_t *njobs);
+int
+qemuMonitorGetCPUMigratable(qemuMonitorPtr mon,
+ bool *migratable);
+
int
qemuMonitorTransactionBitmapAdd(virJSONValuePtr actions,
const char *node,
return 0;
}
+
+
+int
+qemuMonitorJSONGetCPUMigratable(qemuMonitorPtr mon,
+ bool *migratable)
+{
+ g_autoptr(virJSONValue) cmd = NULL;
+ g_autoptr(virJSONValue) reply = NULL;
+
+ if (!(cmd = qemuMonitorJSONMakeCommand("qom-get",
+ "s:path", QOM_CPU_PATH,
+ "s:property", "migratable",
+ NULL)))
+ return -1;
+
+ if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
+ return -1;
+
+ if (qemuMonitorJSONHasError(reply, "GenericError"))
+ return 1;
+
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_BOOLEAN) < 0)
+ return -1;
+
+ return virJSONValueGetBoolean(virJSONValueObjectGet(reply, "return"),
+ migratable);
+}