[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH for-2.9 01/17] qmp: Report QOM type name on query-cp
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PATCH for-2.9 01/17] qmp: Report QOM type name on query-cpu-definitions |
Date: |
Fri, 2 Dec 2016 19:18:00 -0200 |
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 <address@hidden>
---
Patch originally submitted as:
From: Eduardo Habkost <address@hidden>
Date: Wed, 16 Nov 2016 16:21:39 -0200
Message-Id: <address@hidden>
Subject: [PATCH for-2.9] qmp: Report QOM type name on query-cpu-definitions
---
qapi-schema.json | 5 ++++-
target-arm/helper.c | 1 +
target-i386/cpu.c | 1 +
target-ppc/translate_init.c | 1 +
target-s390x/cpu_models.c | 1 +
5 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/qapi-schema.json b/qapi-schema.json
index f3e9bfc..8d113f8 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -3218,6 +3218,9 @@
# @unavailable-features: #optional List of properties that prevent
# the CPU model from running in the current
# host. (since 2.8)
+# @typename: Type name that can be used as argument to @device-list-properties,
+# to introspect properties configurable using -cpu or -global.
+# (since 2.9)
#
# @unavailable-features is a list of QOM property names that
# represent CPU model attributes that prevent the CPU from running.
@@ -3239,7 +3242,7 @@
##
{ 'struct': 'CpuDefinitionInfo',
'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
- '*unavailable-features': [ 'str' ] } }
+ '*unavailable-features': [ 'str' ], 'typename': 'str' } }
##
# @query-cpu-definitions:
diff --git a/target-arm/helper.c b/target-arm/helper.c
index b5b65ca..3fc01b5 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -5207,6 +5207,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 de1f30e..93ead1a 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -2234,6 +2234,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 626e031..19ef250 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 c1e729d..5b66d33 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));
--
2.7.4
- [Qemu-devel] [PATCH for-2.9 00/17] target-i386: Implement query-cpu-model-expansion, Eduardo Habkost, 2016/12/02
- [Qemu-devel] [PATCH for-2.9 01/17] qmp: Report QOM type name on query-cpu-definitions,
Eduardo Habkost <=
- [Qemu-devel] [PATCH for-2.9 02/17] qemu.py: Make logging optional, Eduardo Habkost, 2016/12/02
- [Qemu-devel] [PATCH for-2.9 03/17] qtest.py: Support QTEST_LOG environment variable, Eduardo Habkost, 2016/12/02
- [Qemu-devel] [PATCH for-2.9 04/17] qtest.py: make logging optional, Eduardo Habkost, 2016/12/02
- [Qemu-devel] [PATCH for-2.9 05/17] qtest.py: Make 'binary' parameter optional, Eduardo Habkost, 2016/12/02
- [Qemu-devel] [PATCH for-2.9 06/17] tests: Add rules to non-gtester qtest test cases, Eduardo Habkost, 2016/12/02
- [Qemu-devel] [PATCH for-2.9 07/17] target-i386: Reorganize and document CPUID initialization steps, Eduardo Habkost, 2016/12/02
- [Qemu-devel] [PATCH for-2.9 08/17] target-i386: Support "-cpu host" on TCG too, Eduardo Habkost, 2016/12/02
- [Qemu-devel] [PATCH for-2.9 09/17] target-i386: Move "host" properties to base class, Eduardo Habkost, 2016/12/02
- [Qemu-devel] [PATCH for-2.9 10/17] target-i386: Allow short strings to be used as vendor ID, Eduardo Habkost, 2016/12/02
- [Qemu-devel] [PATCH for-2.9 12/17] target-i386: Return migration-safe field on query-cpu-definitions, Eduardo Habkost, 2016/12/02