Skip to contentSkip to conversation

Export machine type deprecation info through QMP

PATCH In review Eduardo Habkost 4 participants 6 messages Jun 8, 2019 – Jun 25, 2019

lore
Share & tools
lore
#0 lore raw

v2 cover Export machine type deprecation info through QMP

Changes v1 -> v2:
* I've decided to get rid of the status-message and suggested-alternative fields, to avoid more bikeshedding.

This series adds machine type deprecation information to the output of the query-machines QMP command. With this, libvirt and management software will be able to show this information to users and/or suggest changes to VM configuration to avoid deprecated machine types.

Eduardo Habkost (1):
qmp: Add deprecation information to query-machines

 qapi/misc.json | 7 ++++++-
 vl.c           | 1 +
 2 files changed, 7 insertions(+), 1 deletion(-)
Signature · 1 line
2.18.0.rc1.1.g3f1ff2140
#1 lore raw

PATCH v2 1/1 qmp: Add deprecation information to query-machines

Export machine type deprecation status through the query-machines QMP command. With this, libvirt and management software will be able to show this information to users and/or suggest changes to VM configuration to avoid deprecated machines.

---
Changes v1 -> v2:
* Take a much simpler approach: add a simple deprecated bool field, instead of including a human-readable message and suggested alternatives

---
 qapi/misc.json | 7 ++++++-
 vl.c           | 1 +
 2 files changed, 7 insertions(+), 1 deletion(-)
qapi/misc.json +6 -1
index 8b3ca4fdd3..fca793d39c 100644
@@ -2018,12 +2018,17 @@
 #
 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
 #
+# @deprecated: if true, the machine type is deprecated and may be removed
+#              in future versions of QEMU according to the QEMU deprecation
+#              policy (since 4.1.0)
+#
 # Since: 1.2.0
 ##
 { 'struct': 'MachineInfo',
   'data': { 'name': 'str', '*alias': 'str',
             '*is-default': 'bool', 'cpu-max': 'int',
-            'hotpluggable-cpus': 'bool'} }
+            'hotpluggable-cpus': 'bool',
+            'deprecated': 'bool' } }
 
 ##
 # @query-machines:
vl.c +1 -0
index cd1fbc4cdc..f825d2159c 100644
@@ -1428,6 +1428,7 @@ MachineInfoList *qmp_query_machines(Error **errp)
         info->name = g_strdup(mc->name);
         info->cpu_max = !mc->max_cpus ? 1 : mc->max_cpus;
         info->hotpluggable_cpus = mc->has_hotpluggable_cpus;
+        info->deprecated = !!mc->deprecation_reason;
 
         entry = g_malloc0(sizeof(*entry));
         entry->value = info;
Signature · 1 line
2.18.0.rc1.1.g3f1ff2140
Reviewed-by on v2 1/1
#2 lore raw

Re: [Qemu-devel] [PATCH v2 1/1] qmp: Add deprecation information to query-machines

Quoted 44 lines · Eduardo Habkost

Export machine type deprecation status through the query-machines QMP command. With this, libvirt and management software will be able to show this information to users and/or suggest changes to VM configuration to avoid deprecated machines.

---
Changes v1 -> v2:
* Take a much simpler approach: add a simple deprecated bool field, instead of including a human-readable message and suggested alternatives

---
  qapi/misc.json | 7 ++++++-
  vl.c           | 1 +
  2 files changed, 7 insertions(+), 1 deletion(-)
qapi/misc.json +6 -1
index 8b3ca4fdd3..fca793d39c 100644
@@ -2018,12 +2018,17 @@
  #
  # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
  #
+# @deprecated: if true, the machine type is deprecated and may be removed
+#              in future versions of QEMU according to the QEMU deprecation
+#              policy (since 4.1.0)
+#
  # Since: 1.2.0
  ##
  { 'struct': 'MachineInfo',
    'data': { 'name': 'str', '*alias': 'str',
              '*is-default': 'bool', 'cpu-max': 'int',
-            'hotpluggable-cpus': 'bool'} }
+            'hotpluggable-cpus': 'bool',
+            'deprecated': 'bool' } }
 
  ##
  # @query-machines:
vl.c +0 -0
index cd1fbc4cdc..f825d2159c 100644

vl.c MachineInfoList *qmp_query_machines(Error **errp) · line 1434

Quoted 7 lines
vl.c +1 -0
@@ -1428,6 +1428,7 @@ MachineInfoList *qmp_query_machines(Error **errp)
          info->name = g_strdup(mc->name);
          info->cpu_max = !mc->max_cpus ? 1 : mc->max_cpus;
          info->hotpluggable_cpus = mc->has_hotpluggable_cpus;
+        info->deprecated = !!mc->deprecation_reason;
 
          entry = g_malloc0(sizeof(*entry));
          entry->value = info;

Thanks,
Marcel

#3 lore raw
In reply to Eduardo Habkost

Any objections to this? I'm planning to merge it this week.

Quoted 20 lines · Eduardo Habkost

Changes v1 -> v2:
* I've decided to get rid of the status-message and suggested-alternative fields, to avoid more bikeshedding.

This series adds machine type deprecation information to the output of the query-machines QMP command. With this, libvirt and management software will be able to show this information to users and/or suggest changes to VM configuration to avoid deprecated machine types.

Eduardo Habkost (1):
qmp: Add deprecation information to query-machines

 qapi/misc.json | 7 ++++++-
 vl.c           | 1 +
 2 files changed, 7 insertions(+), 1 deletion(-)
Signature · 1 line
2.18.0.rc1.1.g3f1ff2140
Signature · 1 line
Eduardo
#4 lore raw
Quoted 1 line · Eduardo Habkost

Any objections to this? I'm planning to merge it this week.

IMHO, 1+. So I don't have objections.

- Wainer

Quoted 22 lines · Eduardo Habkost
Quoted 20 lines

Changes v1 -> v2:
* I've decided to get rid of the status-message and suggested-alternative fields, to avoid more bikeshedding.

This series adds machine type deprecation information to the output of the query-machines QMP command. With this, libvirt and management software will be able to show this information to users and/or suggest changes to VM configuration to avoid deprecated machine types.

Eduardo Habkost (1):
qmp: Add deprecation information to query-machines

  qapi/misc.json | 7 ++++++-
  vl.c           | 1 +
  2 files changed, 7 insertions(+), 1 deletion(-)
Signature · 1 line
2.18.0.rc1.1.g3f1ff2140