Skip to contentSkip to conversation

target/s390x: change CPU type name to "s390x-cpu"

PATCH Applied David Hildenbrand 5 participants 7 messages Oct 20, 2017 – Oct 25, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/s390x: change CPU type name to "s390x-cpu"

For now, e.g. host-s390-cpu wasn't exposed to the user. cpu-add, -cpu and the CPU model qmp interfaces didn't care about the actual type, as that information was hidden.

This changed with CPU hotplug via device_add. Now the type is visible to the user. Before we get that supported in a stable version, this is our last chance to change it.

So change it form "s390-cpu" to "s390x-cpu", to match the architecture name. Example names are then e.g. z14-s390x-cpu or qemu-s390x-cpu.

---
 qapi-schema.json          | 4 ++--
 target/s390x/cpu-qom.h    | 2 +-
 target/s390x/cpu_models.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
qapi-schema.json +2 -2
index a9dd043f65..18457954a8 100644
@@ -3159,12 +3159,12 @@
 # -> { "execute": "query-hotpluggable-cpus" }
 # <- {"return": [
 #      {
-#         "type": "qemu-s390-cpu", "vcpus-count": 1,
+#         "type": "qemu-s390x-cpu", "vcpus-count": 1,
 #         "props": { "core-id": 1 }
 #      },
 #      {
 #         "qom-path": "/machine/unattached/device[0]",
-#         "type": "qemu-s390-cpu", "vcpus-count": 1,
+#         "type": "qemu-s390x-cpu", "vcpus-count": 1,
 #         "props": { "core-id": 0 }
 #      }
 #    ]}
target/s390x/cpu-qom.h +1 -1
index 0510c49e07..b46217dc31 100644
@@ -22,7 +22,7 @@
 
 #include "qom/cpu.h"
 
-#define TYPE_S390_CPU "s390-cpu"
+#define TYPE_S390_CPU "s390x-cpu"
 
 #define S390_CPU_CLASS(klass) \
     OBJECT_CLASS_CHECK(S390CPUClass, (klass), TYPE_S390_CPU)
target/s390x/cpu_models.c +2 -2
index 9554f19eb4..c4c37b3b15 100644
@@ -286,7 +286,7 @@ static void s390_print_cpu_model_list_entry(gpointer data, gpointer user_data)
         details = "(migration-safe)";
     }
 
-    /* strip off the -s390-cpu */
+    /* strip off the -s390x-cpu */
     g_strrstr(name, "-" TYPE_S390_CPU)[0] = 0;
     (*s->cpu_fprintf)(s->file, "s390 %-15s %-35s %s\n", name, scc->desc,
                       details);
@@ -390,7 +390,7 @@ static void create_cpu_model_list(ObjectClass *klass, void *opaque)
     char *name = g_strdup(object_class_get_name(klass));
     S390CPUClass *scc = S390_CPU_CLASS(klass);
 
-    /* strip off the -s390-cpu */
+    /* strip off the -s390x-cpu */
     g_strrstr(name, "-" TYPE_S390_CPU)[0] = 0;
     info = g_new0(CpuDefinitionInfo, 1);
     info->name = name;
Signature · 1 line
2.13.6
#1 lore raw
Quoted 10 lines · David Hildenbrand

For now, e.g. host-s390-cpu wasn't exposed to the user. cpu-add, -cpu and the CPU model qmp interfaces didn't care about the actual type, as that information was hidden.

This changed with CPU hotplug via device_add. Now the type is visible to the user. Before we get that supported in a stable version, this is our last chance to change it.

So change it form "s390-cpu" to "s390x-cpu", to match the architecture name. Example names are then e.g. z14-s390x-cpu or qemu-s390x-cpu.

Basically fine for me ... but just to be sure: Did you test whether migration still works fine from older versions to a version that contains this patch?

Thomas

#2 lore raw
Quoted 9 lines · Thomas Huth
Quoted 8 lines · David Hildenbrand

For now, e.g. host-s390-cpu wasn't exposed to the user. cpu-add, -cpu and the CPU model qmp interfaces didn't care about the actual type, as that information was hidden.

This changed with CPU hotplug via device_add. Now the type is visible to the user. Before we get that supported in a stable version, this is our last chance to change it.

Quoted 9 lines
Quoted 2 lines

So change it form "s390-cpu" to "s390x-cpu", to match the architecture name. Example names are then e.g. z14-s390x-cpu or qemu-s390x-cpu.

Basically fine for me ... but just to be sure: Did you test whether migration still works fine from older versions to a version that contains this patch?

Thomas

Very basic migration testing (initrd guest with 4 cpus). That name should not pup up in the migration stream.

Signature · 3 lines
Thanks,

David
#3 lore raw
In reply to David Hildenbrand
Quoted 9 lines · David Hildenbrand

For now, e.g. host-s390-cpu wasn't exposed to the user. cpu-add, -cpu and the CPU model qmp interfaces didn't care about the actual type, as that information was hidden.

This changed with CPU hotplug via device_add. Now the type is visible to the user. Before we get that supported in a stable version, this is our last chance to change it.

So change it form "s390-cpu" to "s390x-cpu", to match the architecture

s/form/from/

Quoted 4 lines

name. Example names are then e.g. z14-s390x-cpu or qemu-s390x-cpu.

---

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
#4 lore raw
Quoted 5 lines · Eric Blake
Quoted 4 lines · David Hildenbrand

For now, e.g. host-s390-cpu wasn't exposed to the user. cpu-add, -cpu and the CPU model qmp interfaces didn't care about the actual type, as that information was hidden.

Quoted 14 lines
Quoted 5 lines

This changed with CPU hotplug via device_add. Now the type is visible to the user. Before we get that supported in a stable version, this is our last chance to change it.

So change it form "s390-cpu" to "s390x-cpu", to match the architecture

s/form/from/

Quoted 4 lines

name. Example names are then e.g. z14-s390x-cpu or qemu-s390x-cpu.

---

If there are no objections, Christian can you pick this up (fixing the typo) so we get this into 2.11?

Signature · 3 lines
Thanks,

David
Acked-by on v1 1/1
#5 lore raw
In reply to David Hildenbrand
Quoted 11 lines · On Fri, 20 Oct 2017 13:58:03 +0200 David Hildenbrand <[email protected]> wrote:

For now, e.g. host-s390-cpu wasn't exposed to the user. cpu-add, -cpu and the CPU model qmp interfaces didn't care about the actual type, as that information was hidden.

This changed with CPU hotplug via device_add. Now the type is visible to the user. Before we get that supported in a stable version, this is our last chance to change it.

So change it form "s390-cpu" to "s390x-cpu", to match the architecture name. Example names are then e.g. z14-s390x-cpu or qemu-s390x-cpu.

Quoted 6 lines
---
 qapi-schema.json          | 4 ++--
 target/s390x/cpu-qom.h    | 2 +-
 target/s390x/cpu_models.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
#6 lore raw
In reply to David Hildenbrand
Quoted 4 lines · David Hildenbrand

For now, e.g. host-s390-cpu wasn't exposed to the user. cpu-add, -cpu and the CPU model qmp interfaces didn't care about the actual type, as that information was hidden.

Quoted 8 lines

This changed with CPU hotplug via device_add. Now the type is visible to the user. Before we get that supported in a stable version, this is our last chance to change it.

So change it form "s390-cpu" to "s390x-cpu", to match the architecture name. Example names are then e.g. z14-s390x-cpu or qemu-s390x-cpu.

Thanks applied (with the typo fixed)