From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBqS5-0008Cf-HB for qemu-devel@nongnu.org; Wed, 23 Dec 2015 15:56:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aBqS3-00013s-Sf for qemu-devel@nongnu.org; Wed, 23 Dec 2015 15:56:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBqS3-00013f-OX for qemu-devel@nongnu.org; Wed, 23 Dec 2015 15:56:03 -0500 From: Eric Blake Date: Wed, 23 Dec 2015 13:55:44 -0700 Message-Id: <1450904145-17721-16-git-send-email-eblake@redhat.com> In-Reply-To: <1450904145-17721-1-git-send-email-eblake@redhat.com> References: <1450904145-17721-1-git-send-email-eblake@redhat.com> Subject: [Qemu-devel] [PATCH v6 15/16] qapi: Use anonymous base in CpuInfo List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: armbru@redhat.com, Michael Roth 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 --- 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