From patchwork Fri May 11 09:05:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 10393699 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EC5EE60236 for ; Fri, 11 May 2018 09:07:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 163D128488 for ; Fri, 11 May 2018 09:07:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0A43028E24; Fri, 11 May 2018 09:07:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BDDFD28488 for ; Fri, 11 May 2018 09:07:18 +0000 (UTC) Received: from localhost ([::1]:37790 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fH41F-0001QJ-By for patchwork-qemu-devel@patchwork.kernel.org; Fri, 11 May 2018 05:07:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fH3zz-0000aQ-DY for qemu-devel@nongnu.org; Fri, 11 May 2018 05:06:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fH3zv-0000fa-FR for qemu-devel@nongnu.org; Fri, 11 May 2018 05:05:59 -0400 Received: from mail-he1eur01on0724.outbound.protection.outlook.com ([2a01:111:f400:fe1e::724]:32813 helo=EUR01-HE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fH3zv-0000WI-4j for qemu-devel@nongnu.org; Fri, 11 May 2018 05:05:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=8PBnmx4qEv7qWo8NbFtDsd9mCSoDnWkhh+P/Au0/bus=; b=NMfvz3RbIWSHCikjoLW02kcfKmMemOvdz/WtZs50V/Yz0t0F3eXe/ibz69+WahXEb3U1sZ/LCfojfkLs74m8y4Z/IxOFN4/zOtGBII18/uDmmMRzH+Q9I97V/Ddn6U8ltxqP/8Iuca2EJqUkN0QgNSGactfyTEgS1GbraEtxG00= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=anton.nefedov@virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by AM6PR08MB3352.eurprd08.prod.outlook.com (2603:10a6:209:48::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Fri, 11 May 2018 09:05:52 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Fri, 11 May 2018 12:05:34 +0300 Message-Id: <1526029534-35771-3-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1526029534-35771-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1526029534-35771-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR05CA0150.eurprd05.prod.outlook.com (2603:10a6:7:28::37) To AM6PR08MB3352.eurprd08.prod.outlook.com (2603:10a6:209:48::21) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(2017052603328)(7153060)(7193020); SRVR:AM6PR08MB3352; X-Microsoft-Exchange-Diagnostics: 1; AM6PR08MB3352; 3:Eoeumxpz3JR+VJXJlkwJkVL1aECQOpqtOjZiGZV5IdJMVKGvy8ihY49E3qtu/dmELymB6z5KhrC/5GM4Qm4p8xxxsCOEhwq6SLd0CbIg79kh1BhY3vvtwQhyHXVJbDhaceZQDF7a5jUKmNK0RkGbxmDWlyJySgmjNDsSnMDCpSpteiM8a7IJZ9OwFFgqpt2VCXbqOb7cEEDUov9lhAU1x+7pDCKmRzpilVpvnm/V3z+EMBiOjXrHnvByfOag3mGV; 25:zFxnNjkxdV7TeXt67odJ+1df2nhwq1EFKIEh7e0iQDrv7+s9synvAbgtGyP4WliQ8M1YOnk1Y+hWCOHKsoCVLpHOSQeeeaIZl3kFin1CQ9MzXvVjEh4g7k5NHkPBUHE+kzmzSPhNgytpq7KyrE/xBpRLduVzk3D1DhTGREjdeNCeuC7DTAfyuJHiRBE+fFZzAAmE68ksXyc+8tRikrjCC9DERfvShYBt3DRg9feH3cdEfGlT/kNbimNZK1ksohODwLFZayZIzwLleAB+asVKsJV+ThDzUTog3COczFf+q51cG806tyo3WCDEclAz4/WEviJaGzAv7901vwhDyJqjFg==; 31:NQq8hmoC/baPZi2dy1oKUqaRdhST7ul1cilB4EqMR5UeCdAixVV2Bm2xtHOTxPtKh/CEwmY3j9mA4rVkqqfG1TFRkQl1uwInO29AJXft05GaCnABkXQcKvo7OfC0YpfYXpROKptUysCY4Sp4Dhdk/ctQcLdHmwMdZVbQl6uwqHX30Luz1Ia0qJ2UskmNwWqKHay1lNeaRlgEtBkEc17dDZZWuX+9KGHC0YZad2iUjOs= X-MS-TrafficTypeDiagnostic: AM6PR08MB3352: X-Microsoft-Exchange-Diagnostics: 1; AM6PR08MB3352; 20:JLGZ+HqDZtn5uEzlQj7wS/u8GBBcC4vRaLeent+PhUNYCqI+q4jxjkLFv3CFYHfl8w8ar/gUCGIUYy8vHd5H7FOBJkWPOk57+h9F4d5KdlfmVL+tLtiLSzGL8hBFuPKlFteNXUhUgqO1mXKCWB7NLmneCpyWEpx0rJFeqvOAq6n3ITZaVPKlNKqXfGdgmlehUbGVsY8YThTpKXrzByklBF27lHDzkYmbMC9N6/XmtFDDHTS4YUcwy6Lh/J0WynSorETCCHi4qHjMf/USuyyFrc53d/59vrtbZGJtgheIUXnlaDspnvbv4lWe7ARPToalLfOBtejZ90lh96bdfjRSOwzrhe9d/pCL2gJvMg4IUtALpXXWPnUdG+Fe5CThODyFwrzGIK82SLD2LQyZJfqPzM4PejLgOIqIbIxiGDYZLC0xwhGNv3uBS6YJMY+HZjPzpJYmT6pJHT9XFOUBjEnVe6eWYWuHRKV9oKaAGp21L4qRdAXl/gEkOKxlUEb7aQTc; 4:vtQo46bcLvlHpGITKen06IQc+ftOQQCOOk843jykuJdE2tnZt5r+3dUcsY1q0IEOzwA+03UdVp18SXlMYTjr36FDh7w1eBnC0FIwe/FZ8IVTrkgcBHgxLTwygX6IHT3bweiIzvB/5esGT+17B4GMk+t+KKM06Q0dSd2e5fEsf+3jrir5wuh8hB/7q3tolbvdzrcuMGvkfa+bQDAUiMllFiFcN9oR8v06PbTGsNAW8G9W051S6b37Sl9ZidLgqbKxlmTZDaE3/ojtvbQnwVGB6g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:AM6PR08MB3352; BCL:0; PCL:0; RULEID:; SRVR:AM6PR08MB3352; X-Forefront-PRVS: 06691A4183 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(366004)(39850400004)(396003)(376002)(346002)(39380400002)(189003)(199004)(11346002)(446003)(486006)(2616005)(4326008)(476003)(575784001)(6512007)(44832011)(53936002)(2351001)(2361001)(66066001)(86362001)(305945005)(51416003)(107886003)(47776003)(97736004)(956004)(386003)(26005)(6506007)(55236004)(52116002)(76176011)(16526019)(7736002)(50226002)(36756003)(2906002)(3846002)(50466002)(6116002)(6486002)(316002)(8936002)(6916009)(186003)(8676002)(81156014)(106356001)(81166006)(53416004)(16586007)(69596002)(6666003)(48376002)(25786009)(105586002)(478600001)(68736007)(5660300001)(357404004); DIR:OUT; SFP:1102; SCL:1; SRVR:AM6PR08MB3352; H:xantnef-ws.sw.ru; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM6PR08MB3352; 23:1eOeNou+EKbgd1EvwayJ21XYo93ttbJpsxtiMqEk2?= =?us-ascii?Q?f1dkk72raKOnKGcGczduYI3TrVGc3xrnsx58hWVMrEfK+EchdepNTOQApN95?= =?us-ascii?Q?XEMT1OzdCU11lOjceTWwmITNzjsuKS6kvROadk1DCNzZWoXqmaOsCDuAJcxU?= =?us-ascii?Q?n+B0aBfd8fryL7t08TzfbcZkgsFyLWpEDPNkpZmcHu7oyfdTyyL7dGDA91ER?= =?us-ascii?Q?M0ZuLlqBibopL0Kwh+bhcD6TjWUcckBId5fCTs4qMXXDUMJ/GclcLwfXugdc?= =?us-ascii?Q?CPYLyFJ1Wu6fr6sDOU4wGHdgfa3WtJnH5LbQaJyaP1WHW1Ev/vvUuRUNjqmy?= =?us-ascii?Q?e9n7+2EzbiT0wDuHFgtLlUwyaZNdAtvxEoeqOyfxnw4i38AB0VCHj3799vJB?= =?us-ascii?Q?/9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D6G5tQ8YTX/53kbODSh+T+d5PHzdx/0PUurUt2eWQC/6BmEBlOTNKo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM6PR08MB3352; 7:WrbhcdjUgCIqpWoAnWRZwTRksMeVqvG2u/XuBFuc5z0x6OnQyBwVj6kRgcfDUb8/XcWLS1kvXzRiglaUyEfTTWiz9/vpLZB5rGEKNkwNBUOkIgDLvKgpPNinUAe2rmbWG0HMICod/G+7rkJxmQV2DeD3r8Oy8cXRRwnmcgp2q4MWYe3m0O67WaiuxZ3wcVcXfWHXEeWZgjnL0PMVSjE8MMgZEB2sHjsIF8VkeQPFuwWB7ZkLZjgCMhhdURB7Up2c; 20:OkEATvVuzatRCKhEAZ1zYuk3OhWuxaBvtA+3ZrPJ6MLF0nYVVwCRBA0TvMoF01kb7fN/DQzbzJ3nld0cFUJ/YYts8qyQkMU3INPBuqaMaU/ntdD9j1lWBQZyrRpBBIvQGvZ71y1z9YawjHqNprzcSiIyRi8EERgUa58vTtWHzGg= X-MS-Office365-Filtering-Correlation-Id: 49a80e48-eb41-4cf1-daff-08d5b71e6623 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2018 09:05:52.9102 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 49a80e48-eb41-4cf1-daff-08d5b71e6623 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3352 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 2a01:111:f400:fe1e::724 Subject: [Qemu-devel] [PATCH 2/2] qapi: avoid empty CpuInfoOther type X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anton Nefedov , armbru@redhat.com, mdroth@linux.vnet.ibm.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP the patch provides an example of a previously introduced data-partial qapi union tag Signed-off-by: Anton Nefedov --- qapi/misc.json | 48 ++++-------------------------------------------- cpus.c | 2 -- 2 files changed, 4 insertions(+), 46 deletions(-) diff --git a/qapi/misc.json b/qapi/misc.json index f5988cc..2059852 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -387,14 +387,14 @@ 'qom_path': 'str', 'thread_id': 'int', '*props': 'CpuInstanceProperties', 'arch': 'CpuInfoArch' }, 'discriminator': 'arch', + 'data-partial': true, 'data': { 'x86': 'CpuInfoX86', 'sparc': 'CpuInfoSPARC', 'ppc': 'CpuInfoPPC', 'mips': 'CpuInfoMIPS', 'tricore': 'CpuInfoTricore', 's390': 'CpuInfoS390', - 'riscv': 'CpuInfoRISCV', - 'other': 'CpuInfoOther' } } + 'riscv': 'CpuInfoRISCV' } } ## # @CpuInfoX86: @@ -465,16 +465,6 @@ { 'struct': 'CpuInfoRISCV', 'data': { 'pc': 'int' } } ## -# @CpuInfoOther: -# -# No additional information is available about the virtual CPU -# -# Since: 2.6 -# -## -{ 'struct': 'CpuInfoOther', 'data': { } } - -## # @CpuS390State: # # An enumeration of cpu states that can be assumed by a virtual @@ -575,38 +565,8 @@ 'arch' : 'CpuInfoArch', 'target' : 'SysEmuTarget' }, 'discriminator' : 'target', - 'data' : { 'aarch64' : 'CpuInfoOther', - 'alpha' : 'CpuInfoOther', - 'arm' : 'CpuInfoOther', - 'cris' : 'CpuInfoOther', - 'hppa' : 'CpuInfoOther', - 'i386' : 'CpuInfoOther', - 'lm32' : 'CpuInfoOther', - 'm68k' : 'CpuInfoOther', - 'microblaze' : 'CpuInfoOther', - 'microblazeel' : 'CpuInfoOther', - 'mips' : 'CpuInfoOther', - 'mips64' : 'CpuInfoOther', - 'mips64el' : 'CpuInfoOther', - 'mipsel' : 'CpuInfoOther', - 'moxie' : 'CpuInfoOther', - 'nios2' : 'CpuInfoOther', - 'or1k' : 'CpuInfoOther', - 'ppc' : 'CpuInfoOther', - 'ppc64' : 'CpuInfoOther', - 'ppcemb' : 'CpuInfoOther', - 'riscv32' : 'CpuInfoOther', - 'riscv64' : 'CpuInfoOther', - 's390x' : 'CpuInfoS390', - 'sh4' : 'CpuInfoOther', - 'sh4eb' : 'CpuInfoOther', - 'sparc' : 'CpuInfoOther', - 'sparc64' : 'CpuInfoOther', - 'tricore' : 'CpuInfoOther', - 'unicore32' : 'CpuInfoOther', - 'x86_64' : 'CpuInfoOther', - 'xtensa' : 'CpuInfoOther', - 'xtensaeb' : 'CpuInfoOther' } } + 'data-partial' : true, + 'data' : { 's390x' : 'CpuInfoS390' } } ## # @query-cpus-fast: diff --git a/cpus.c b/cpus.c index 5bcd3ec..bd0de44 100644 --- a/cpus.c +++ b/cpus.c @@ -2273,8 +2273,6 @@ CpuInfoFastList *qmp_query_cpus_fast(Error **errp) info->value->target = target; if (target == SYS_EMU_TARGET_S390X) { cpustate_to_cpuinfo_s390(&info->value->u.s390x, cpu); - } else { - /* do nothing for @CpuInfoOther */ } if (!cur_item) {