mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
s390x: use generic cpu_model parsing
Define default CPU type in generic way in machine class_init and let common machine code handle cpu_model parsing. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <1505998749-269631-1-git-send-email-imammedo@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
This commit is contained in:
parent
7705c75048
commit
b6805e127c
4 changed files with 10 additions and 38 deletions
|
@ -1211,9 +1211,6 @@ static void s390_qemu_cpu_model_class_init(ObjectClass *oc, void *data)
|
|||
qemu_hw_version());
|
||||
}
|
||||
|
||||
#define S390_CPU_TYPE_SUFFIX "-" TYPE_S390_CPU
|
||||
#define S390_CPU_TYPE_NAME(name) (name S390_CPU_TYPE_SUFFIX)
|
||||
|
||||
/* Generate type name for a cpu model. Caller has to free the string. */
|
||||
static char *s390_cpu_type_name(const char *model_name)
|
||||
{
|
||||
|
@ -1236,14 +1233,6 @@ ObjectClass *s390_cpu_class_by_name(const char *name)
|
|||
return oc;
|
||||
}
|
||||
|
||||
const char *s390_default_cpu_model_name(void)
|
||||
{
|
||||
if (kvm_enabled()) {
|
||||
return "host";
|
||||
}
|
||||
return "qemu";
|
||||
}
|
||||
|
||||
static const TypeInfo qemu_s390_cpu_type_info = {
|
||||
.name = S390_CPU_TYPE_NAME("qemu"),
|
||||
.parent = TYPE_S390_CPU,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue