4567474e95
Notable changes: * bdrv_co_p{discard,readv,writev,write_zeroes} function signatures changed, to using int64_t for offsets/bytes and some still had int rather than BrdvRequestFlags for the flags. * job_cancel_sync now has a force parameter. Commit messages in 73895f3838cd7fdaf185cf1dbc47be58844a966f 4cfb3f05627ad82af473e7f7ae113c3884cd04e3 sound like using force=true makes more sense. * Added 3 patches coming in via qemu-stable tag, most important one is to work around a librbd issue. * Added another 3 patches from qemu-devel to fix issue leading to crash when live migrating with iothread. * cluster_size calculation helper changed (see patch pve/0026). * QAPI's if conditionals now use 'CONFIG_FOO' rather than 'defined(CONFIG_FOO)' Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
54 lines
2.0 KiB
Diff
54 lines
2.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Dietmar Maurer <dietmar@proxmox.com>
|
|
Date: Mon, 6 Apr 2020 12:16:44 +0200
|
|
Subject: [PATCH] PVE: qapi: modify query machines
|
|
|
|
provide '*is-current' in MachineInfo struct
|
|
|
|
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
|
|
---
|
|
hw/core/machine-qmp-cmds.c | 6 ++++++
|
|
qapi/machine.json | 4 +++-
|
|
2 files changed, 9 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
|
|
index 4f4ab30f8c..76fff60a6b 100644
|
|
--- a/hw/core/machine-qmp-cmds.c
|
|
+++ b/hw/core/machine-qmp-cmds.c
|
|
@@ -99,6 +99,12 @@ MachineInfoList *qmp_query_machines(Error **errp)
|
|
info->hotpluggable_cpus = mc->has_hotpluggable_cpus;
|
|
info->numa_mem_supported = mc->numa_mem_supported;
|
|
info->deprecated = !!mc->deprecation_reason;
|
|
+
|
|
+ if (strcmp(mc->name, MACHINE_GET_CLASS(current_machine)->name) == 0) {
|
|
+ info->has_is_current = true;
|
|
+ info->is_current = true;
|
|
+ }
|
|
+
|
|
if (mc->default_cpu_type) {
|
|
info->default_cpu_type = g_strdup(mc->default_cpu_type);
|
|
info->has_default_cpu_type = true;
|
|
diff --git a/qapi/machine.json b/qapi/machine.json
|
|
index 91f3be6f44..0905618e25 100644
|
|
--- a/qapi/machine.json
|
|
+++ b/qapi/machine.json
|
|
@@ -141,6 +141,8 @@
|
|
#
|
|
# @is-default: whether the machine is default
|
|
#
|
|
+# @is-current: whether this machine is currently used
|
|
+#
|
|
# @cpu-max: maximum number of CPUs supported by the machine type
|
|
# (since 1.5)
|
|
#
|
|
@@ -162,7 +164,7 @@
|
|
##
|
|
{ 'struct': 'MachineInfo',
|
|
'data': { 'name': 'str', '*alias': 'str',
|
|
- '*is-default': 'bool', 'cpu-max': 'int',
|
|
+ '*is-default': 'bool', '*is-current': 'bool', 'cpu-max': 'int',
|
|
'hotpluggable-cpus': 'bool', 'numa-mem-supported': 'bool',
|
|
'deprecated': 'bool', '*default-cpu-type': 'str',
|
|
'*default-ram-id': 'str' } }
|