[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 15/16] qapi: Use anonymous base in CpuInfo
From: |
Eric Blake |
Subject: |
[Qemu-devel] [PATCH v6 15/16] qapi: Use anonymous base in CpuInfo |
Date: |
Wed, 23 Dec 2015 13:55:44 -0700 |
Now that the generator supports it, we might as well use an
anonymous base rather than breaking out a single-use CpuInfoBase
structure.
Signed-off-by: Eric Blake <address@hidden>
---
v6: new patch
---
qapi-schema.json | 20 ++++++--------------
scripts/qapi.py | 2 +-
2 files changed, 7 insertions(+), 15 deletions(-)
diff --git a/qapi-schema.json b/qapi-schema.json
index ad3030f..4daf54a 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -753,9 +753,9 @@
'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
##
-# @CpuInfoBase:
+# @CpuInfo:
#
-# Common information about a virtual CPU
+# Information about a virtual CPU
#
# @CPU: the index of the virtual CPU
#
@@ -776,18 +776,10 @@
# Notes: @halted is a transient state that changes frequently. By the time the
# data is sent to the client, the guest may no longer be halted.
##
-{ 'struct': 'CpuInfoBase',
- 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
- 'qom_path': 'str', 'thread_id': 'int', 'arch': 'CpuInfoArch' } }
-
-##
-# @CpuInfo:
-#
-# Information about a virtual CPU
-#
-# Since: 0.14.0
-##
-{ 'union': 'CpuInfo', 'base': 'CpuInfoBase', 'discriminator': 'arch',
+{ 'union': 'CpuInfo',
+ 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
+ 'qom_path': 'str', 'thread_id': 'int', 'arch': 'CpuInfoArch' },
+ 'discriminator': 'arch',
'data': { 'x86': 'CpuInfoX86',
'sparc': 'CpuInfoSPARC',
'ppc': 'CpuInfoPPC',
diff --git a/scripts/qapi.py b/scripts/qapi.py
index 11d9e56..d534d41 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -62,8 +62,8 @@ returns_whitelist = [
# Whitelist of entities allowed to violate case conventions
case_whitelist = [
# From QMP:
+ ':obj-CpuInfo-base', # CPU, visible through query-cpu
'ACPISlotType', # DIMM, visible through query-acpi-ospm-status
- 'CpuInfoBase', # CPU, visible through query-cpu
'CpuInfoMIPS', # PC, visible through query-cpu
'CpuInfoTricore', # PC, visible through query-cpu
'InputAxis', # TODO: drop when x-input-send-event is fixed
--
2.4.3
- [Qemu-devel] [PATCH v6 04/16] qapi: Drop useless 'data' member of unions, (continued)
- [Qemu-devel] [PATCH v6 04/16] qapi: Drop useless 'data' member of unions, Eric Blake, 2015/12/23
- [Qemu-devel] [PATCH v6 01/16] net: use Netdev instead of NetClientOptions in client init, Eric Blake, 2015/12/23
- [Qemu-devel] [PATCH v6 08/16] qapi: support implicit structs in OptsVisitor, Eric Blake, 2015/12/23
- [Qemu-devel] [PATCH v6 07/16] qapi: Implement boxed types for commands/events, Eric Blake, 2015/12/23
- [Qemu-devel] [PATCH v6 05/16] qapi: Hide tag_name data member of variants, Eric Blake, 2015/12/23
- [Qemu-devel] [PATCH v6 02/16] qapi: Avoid use of 'data' member of qapi unions, Eric Blake, 2015/12/23
- [Qemu-devel] [PATCH v6 06/16] qapi: Plumb in 'box' to qapi generator lower levels, Eric Blake, 2015/12/23
- [Qemu-devel] [PATCH v6 11/16] net: Complete qapi-fication of netdev_add, Eric Blake, 2015/12/23
- [Qemu-devel] [PATCH v6 14/16] qapi: Use anonymous base in Netdev, Eric Blake, 2015/12/23
- [Qemu-devel] [PATCH v6 13/16] qapi: Use anonymous base in SchemaInfo, Eric Blake, 2015/12/23
- [Qemu-devel] [PATCH v6 15/16] qapi: Use anonymous base in CpuInfo,
Eric Blake <=
- [Qemu-devel] [PATCH v6 10/16] net: Use correct type for bool flag, Eric Blake, 2015/12/23
- [Qemu-devel] [PATCH v6 16/16] qapi: Populate info['name'] for each entity, Eric Blake, 2015/12/23
- [Qemu-devel] [PATCH v6 12/16] qapi: Allow anonymous base for flat union, Eric Blake, 2015/12/23
- [Qemu-devel] [PATCH v6 09/16] qapi: Change Netdev into a flat union, Eric Blake, 2015/12/23
- Re: [Qemu-devel] [PATCH v6 00/16] qapi netdev_add introspection (post-introspection cleanups subset F), Eric Blake, 2015/12/23