diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2016-11-16 16:21:39 -0200 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2017-01-12 15:51:36 -0200 |
commit | 8ed877b78498c89aa7ce5c76aa20841ff5072796 (patch) | |
tree | 65c5e5e44464ec1e9767a347a8677acdf371acb5 /target | |
parent | cdda2018e3b9ce0c18938767dfdb1e05a05b67ca (diff) |
qmp: Report QOM type name on query-cpu-definitions
The new typename attribute on query-cpu-definitions will be used
to help management software use device-list-properties to check
which properties can be set using -cpu or -global for the CPU
model.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <1479320499-29818-1-git-send-email-ehabkost@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target')
-rw-r--r-- | target/arm/helper.c | 1 | ||||
-rw-r--r-- | target/i386/cpu.c | 1 | ||||
-rw-r--r-- | target/ppc/translate_init.c | 1 | ||||
-rw-r--r-- | target/s390x/cpu_models.c | 1 |
4 files changed, 4 insertions, 0 deletions
diff --git a/target/arm/helper.c b/target/arm/helper.c index 8dcabbf576..9f1a335e3f 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -5214,6 +5214,7 @@ static void arm_cpu_add_definition(gpointer data, gpointer user_data) info = g_malloc0(sizeof(*info)); info->name = g_strndup(typename, strlen(typename) - strlen("-" TYPE_ARM_CPU)); + info->q_typename = g_strdup(typename); entry = g_malloc0(sizeof(*entry)); entry->value = info; diff --git a/target/i386/cpu.c b/target/i386/cpu.c index b0640f1e38..a149c8dc42 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -2235,6 +2235,7 @@ static void x86_cpu_definition_entry(gpointer data, gpointer user_data) info->name = x86_cpu_class_get_model_name(cc); x86_cpu_class_check_missing_features(cc, &info->unavailable_features); info->has_unavailable_features = true; + info->q_typename = g_strdup(object_class_get_name(oc)); entry = g_malloc0(sizeof(*entry)); entry->value = info; diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c index 626e03186c..19ef2505e4 100644 --- a/target/ppc/translate_init.c +++ b/target/ppc/translate_init.c @@ -10305,6 +10305,7 @@ CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp) info = g_malloc0(sizeof(*info)); info->name = g_strdup(alias->alias); + info->q_typename = g_strdup(object_class_get_name(oc)); entry = g_malloc0(sizeof(*entry)); entry->value = info; diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index c1e729df5e..5b66d3325d 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -290,6 +290,7 @@ static void create_cpu_model_list(ObjectClass *klass, void *opaque) info->has_migration_safe = true; info->migration_safe = scc->is_migration_safe; info->q_static = scc->is_static; + info->q_typename = g_strdup(object_class_get_name(klass)); entry = g_malloc0(sizeof(*entry)); |