Skip to content

Commit

Permalink
target/s390x: change CPU type name to "s390x-cpu"
Browse files Browse the repository at this point in the history
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 from "s390-cpu" to "s390x-cpu", to match the architecture
name. Example names are then e.g. z14-s390x-cpu or qemu-s390x-cpu.

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20171020115803.14093-1-david@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
  • Loading branch information
davidhildenbrand authored and borntraeger committed Oct 30, 2017
1 parent a93ece4 commit e555cbe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions qapi-schema.json
Expand Up @@ -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 }
# }
# ]}
Expand Down
2 changes: 1 addition & 1 deletion target/s390x/cpu-qom.h
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions target/s390x/cpu_models.c
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e555cbe

Please sign in to comment.