From patchwork Mon Nov 16 13:10:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Bolshakov X-Patchwork-Id: 11908445 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 67B2F14C0 for ; Mon, 16 Nov 2020 13:11:34 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E1D5D2067C for ; Mon, 16 Nov 2020 13:11:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=yadro.com header.i=@yadro.com header.b="OOOFX+dW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E1D5D2067C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=yadro.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:52468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1keeI8-0005MN-Ta for patchwork-qemu-devel@patchwork.kernel.org; Mon, 16 Nov 2020 08:11:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keeH4-00040m-Ft for qemu-devel@nongnu.org; Mon, 16 Nov 2020 08:10:26 -0500 Received: from mta-02.yadro.com ([89.207.88.252]:35650 helo=mta-01.yadro.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keeH2-0002qg-Na for qemu-devel@nongnu.org; Mon, 16 Nov 2020 08:10:26 -0500 Received: from localhost (unknown [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id 5F6C141396; Mon, 16 Nov 2020 13:10:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yadro.com; h= content-type:content-type:content-transfer-encoding:mime-version :references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received:received; s=mta-01; t= 1605532222; x=1607346623; bh=NkZL88GV2C/4arjpUh/JrUJtze4bu+ghmiN O15N3+Vo=; b=OOOFX+dWXniSWqJRZJFpU6D4//nHdq4Cz3eTsm7pXVLCU/daNP7 6XAxp3y9oNm20pCRB2C1Zrtw4cFRnIXk1EGl9BaLtvntZmRFjoGsxA4A7InK+D/Q WMKBQ53VgpDqt2FC3lz6pD2/hInEg6ycPy5ONnkue/mOiU5dDTQpJ2y4= X-Virus-Scanned: amavisd-new at yadro.com Received: from mta-01.yadro.com ([127.0.0.1]) by localhost (mta-01.yadro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id p7_aHXS5jNGk; Mon, 16 Nov 2020 16:10:22 +0300 (MSK) Received: from T-EXCH-04.corp.yadro.com (t-exch-04.corp.yadro.com [172.17.100.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mta-01.yadro.com (Postfix) with ESMTPS id 6B82941392; Mon, 16 Nov 2020 16:10:22 +0300 (MSK) Received: from localhost (172.17.204.212) by T-EXCH-04.corp.yadro.com (172.17.100.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Mon, 16 Nov 2020 16:10:21 +0300 From: Roman Bolshakov To: Subject: [PATCH for-6.0 1/6] qapi: Add query-accel command Date: Mon, 16 Nov 2020 16:10:06 +0300 Message-ID: <20201116131011.26607-2-r.bolshakov@yadro.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201116131011.26607-1-r.bolshakov@yadro.com> References: <20201116131011.26607-1-r.bolshakov@yadro.com> MIME-Version: 1.0 X-Originating-IP: [172.17.204.212] X-ClientProxiedBy: T-EXCH-01.corp.yadro.com (172.17.10.101) To T-EXCH-04.corp.yadro.com (172.17.100.104) Received-SPF: pass client-ip=89.207.88.252; envelope-from=r.bolshakov@yadro.com; helo=mta-01.yadro.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/16 08:10:19 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Roman Bolshakov , Markus Armbruster , Eduardo Habkost Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" There's a problem for management applications to determine if certain accelerators available. Generic QMP command should help with that. Signed-off-by: Roman Bolshakov --- monitor/qmp-cmds.c | 15 +++++++++++++++ qapi/machine.json | 19 +++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c index a08143b323..0454394e76 100644 --- a/monitor/qmp-cmds.c +++ b/monitor/qmp-cmds.c @@ -62,6 +62,21 @@ KvmInfo *qmp_query_kvm(Error **errp) return info; } +KvmInfo *qmp_query_accel(const char *name, Error **errp) +{ + KvmInfo *info = g_malloc0(sizeof(*info)); + + AccelClass *ac = accel_find(name); + + if (ac) { + info->enabled = *ac->allowed; + info->present = true; + } + + return info; +} + + UuidInfo *qmp_query_uuid(Error **errp) { UuidInfo *info = g_malloc0(sizeof(*info)); diff --git a/qapi/machine.json b/qapi/machine.json index 7c9a263778..11f364fab4 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -591,6 +591,25 @@ ## { 'command': 'query-kvm', 'returns': 'KvmInfo' } +## +# @query-accel: +# +# Returns information about an accelerator +# +# Returns: @KvmInfo +# +# Since: 6.0.0 +# +# Example: +# +# -> { "execute": "query-accel", "arguments": { "name": "kvm" } } +# <- { "return": { "enabled": true, "present": true } } +# +## +{ 'command': 'query-accel', + 'data': { 'name': 'str' }, + 'returns': 'KvmInfo' } + ## # @NumaOptionsType: # From patchwork Mon Nov 16 13:10:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Bolshakov X-Patchwork-Id: 11908447 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6AC8D14B3 for ; Mon, 16 Nov 2020 13:11:36 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EF0C52067C for ; Mon, 16 Nov 2020 13:11:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=yadro.com header.i=@yadro.com header.b="A8vSOKag" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF0C52067C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=yadro.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:52680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1keeIA-0005Rk-V5 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 16 Nov 2020 08:11:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keeH6-000439-0n for qemu-devel@nongnu.org; Mon, 16 Nov 2020 08:10:28 -0500 Received: from mta-02.yadro.com ([89.207.88.252]:35664 helo=mta-01.yadro.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keeH3-0002tJ-GS for qemu-devel@nongnu.org; Mon, 16 Nov 2020 08:10:27 -0500 Received: from localhost (unknown [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id 21DFA41393; Mon, 16 Nov 2020 13:10:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yadro.com; h= content-type:content-type:content-transfer-encoding:mime-version :references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received:received; s=mta-01; t= 1605532223; x=1607346624; bh=HXOEmmXiFCxEfEYJZKJlfEYZ/aJK4b/3Mir yw9JRH/k=; b=A8vSOKagjZY5Mauu2tft3V5By4/P56PQxMkgO2hIiP7THIuNQY+ n3EXyTKYLsrljjh9vTTWA6UDJjE6Go+ZJlCpI1i+0/CDZvuRq0gCuhz0+/TJZtHc xl4T1ZMq3h/CbDDzmdOIF1ivDOmiDKFx3Zbv74sZGBEVHn0iBECrGMmk= X-Virus-Scanned: amavisd-new at yadro.com Received: from mta-01.yadro.com ([127.0.0.1]) by localhost (mta-01.yadro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7U67BNag695k; Mon, 16 Nov 2020 16:10:23 +0300 (MSK) Received: from T-EXCH-04.corp.yadro.com (t-exch-04.corp.yadro.com [172.17.100.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mta-01.yadro.com (Postfix) with ESMTPS id 020A141373; Mon, 16 Nov 2020 16:10:23 +0300 (MSK) Received: from localhost (172.17.204.212) by T-EXCH-04.corp.yadro.com (172.17.100.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Mon, 16 Nov 2020 16:10:22 +0300 From: Roman Bolshakov To: Subject: [PATCH for-6.0 2/6] qapi: Rename KvmInfo to AccelInfo Date: Mon, 16 Nov 2020 16:10:07 +0300 Message-ID: <20201116131011.26607-3-r.bolshakov@yadro.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201116131011.26607-1-r.bolshakov@yadro.com> References: <20201116131011.26607-1-r.bolshakov@yadro.com> MIME-Version: 1.0 X-Originating-IP: [172.17.204.212] X-ClientProxiedBy: T-EXCH-01.corp.yadro.com (172.17.10.101) To T-EXCH-04.corp.yadro.com (172.17.100.104) Received-SPF: pass client-ip=89.207.88.252; envelope-from=r.bolshakov@yadro.com; helo=mta-01.yadro.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/16 08:10:19 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Dr. David Alan Gilbert" , Markus Armbruster , Roman Bolshakov Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" There's nothing specific to KVM in the structure. A more generic name would be more appropriate. Signed-off-by: Roman Bolshakov Acked-by: Dr. David Alan Gilbert Acked-by: Markus Armbruster --- monitor/hmp-cmds.c | 4 ++-- monitor/qmp-cmds.c | 8 ++++---- qapi/machine.json | 18 +++++++++--------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index a6a6684df1..ea86289fe8 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -120,7 +120,7 @@ void hmp_info_version(Monitor *mon, const QDict *qdict) void hmp_info_kvm(Monitor *mon, const QDict *qdict) { - KvmInfo *info; + AccelInfo *info; info = qmp_query_kvm(NULL); monitor_printf(mon, "kvm support: "); @@ -130,7 +130,7 @@ void hmp_info_kvm(Monitor *mon, const QDict *qdict) monitor_printf(mon, "not compiled\n"); } - qapi_free_KvmInfo(info); + qapi_free_AccelInfo(info); } void hmp_info_status(Monitor *mon, const QDict *qdict) diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c index 0454394e76..f5d50afa9c 100644 --- a/monitor/qmp-cmds.c +++ b/monitor/qmp-cmds.c @@ -52,9 +52,9 @@ NameInfo *qmp_query_name(Error **errp) return info; } -KvmInfo *qmp_query_kvm(Error **errp) +AccelInfo *qmp_query_kvm(Error **errp) { - KvmInfo *info = g_malloc0(sizeof(*info)); + AccelInfo *info = g_malloc0(sizeof(*info)); info->enabled = kvm_enabled(); info->present = kvm_available(); @@ -62,9 +62,9 @@ KvmInfo *qmp_query_kvm(Error **errp) return info; } -KvmInfo *qmp_query_accel(const char *name, Error **errp) +AccelInfo *qmp_query_accel(const char *name, Error **errp) { - KvmInfo *info = g_malloc0(sizeof(*info)); + AccelInfo *info = g_malloc0(sizeof(*info)); AccelClass *ac = accel_find(name); diff --git a/qapi/machine.json b/qapi/machine.json index 11f364fab4..5648d8d24d 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -562,24 +562,24 @@ { 'command': 'inject-nmi' } ## -# @KvmInfo: +# @AccelInfo: # -# Information about support for KVM acceleration +# Information about support for an acceleration # -# @enabled: true if KVM acceleration is active +# @enabled: true if an acceleration is active # -# @present: true if KVM acceleration is built into this executable +# @present: true if an acceleration is built into this executable # # Since: 0.14.0 ## -{ 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} } +{ 'struct': 'AccelInfo', 'data': {'enabled': 'bool', 'present': 'bool'} } ## # @query-kvm: # # Returns information about KVM acceleration # -# Returns: @KvmInfo +# Returns: @AccelInfo # # Since: 0.14.0 # @@ -589,14 +589,14 @@ # <- { "return": { "enabled": true, "present": true } } # ## -{ 'command': 'query-kvm', 'returns': 'KvmInfo' } +{ 'command': 'query-kvm', 'returns': 'AccelInfo' } ## # @query-accel: # # Returns information about an accelerator # -# Returns: @KvmInfo +# Returns: @AccelInfo # # Since: 6.0.0 # @@ -608,7 +608,7 @@ ## { 'command': 'query-accel', 'data': { 'name': 'str' }, - 'returns': 'KvmInfo' } + 'returns': 'AccelInfo' } ## # @NumaOptionsType: From patchwork Mon Nov 16 13:10:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Bolshakov X-Patchwork-Id: 11908455 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D4BC914B3 for ; Mon, 16 Nov 2020 13:13:52 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 95D1E2223D for ; Mon, 16 Nov 2020 13:13:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=yadro.com header.i=@yadro.com header.b="pxFWVS65" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 95D1E2223D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=yadro.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:60446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1keeKN-0000IV-HM for patchwork-qemu-devel@patchwork.kernel.org; Mon, 16 Nov 2020 08:13:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keeH7-00045g-Ba for qemu-devel@nongnu.org; Mon, 16 Nov 2020 08:10:29 -0500 Received: from mta-02.yadro.com ([89.207.88.252]:35674 helo=mta-01.yadro.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keeH4-0002tS-Ny for qemu-devel@nongnu.org; Mon, 16 Nov 2020 08:10:29 -0500 Received: from localhost (unknown [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id 5C32F41395; Mon, 16 Nov 2020 13:10:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yadro.com; h= content-type:content-type:content-transfer-encoding:mime-version :references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received:received; s=mta-01; t= 1605532223; x=1607346624; bh=gEjzVs91m7k7GYUamaOi1vnjEWh/ZoeeGc0 2mT3QAFU=; b=pxFWVS658toRyLfe0xWS1HrfwANHNGr1r+bYHCLwU9dj20fBbtx iPAAINkDoSH2TpKHlCsXp/fW1arS45c/SJGXBDyj+4sEzv711x3g/ScGFaw6F2iV QecYOxA4eLmOC/9YLKv0Mt/A9E7rCjrWRnPCtE2uUA6IRPB1zlQvME1w= X-Virus-Scanned: amavisd-new at yadro.com Received: from mta-01.yadro.com ([127.0.0.1]) by localhost (mta-01.yadro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id thfOSXLs_Abo; Mon, 16 Nov 2020 16:10:23 +0300 (MSK) Received: from T-EXCH-04.corp.yadro.com (t-exch-04.corp.yadro.com [172.17.100.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mta-01.yadro.com (Postfix) with ESMTPS id 75B2541394; Mon, 16 Nov 2020 16:10:23 +0300 (MSK) Received: from localhost (172.17.204.212) by T-EXCH-04.corp.yadro.com (172.17.100.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Mon, 16 Nov 2020 16:10:22 +0300 From: Roman Bolshakov To: Subject: [PATCH for-6.0 3/6] qapi: Use qmp_query_accel() in qmp_query_kvm() Date: Mon, 16 Nov 2020 16:10:08 +0300 Message-ID: <20201116131011.26607-4-r.bolshakov@yadro.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201116131011.26607-1-r.bolshakov@yadro.com> References: <20201116131011.26607-1-r.bolshakov@yadro.com> MIME-Version: 1.0 X-Originating-IP: [172.17.204.212] X-ClientProxiedBy: T-EXCH-01.corp.yadro.com (172.17.10.101) To T-EXCH-04.corp.yadro.com (172.17.100.104) Received-SPF: pass client-ip=89.207.88.252; envelope-from=r.bolshakov@yadro.com; helo=mta-01.yadro.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/16 08:10:19 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Roman Bolshakov , Markus Armbruster Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" qmp_query_accel() is generic and can be used instead of open-coding qmp_query_kvm(). Signed-off-by: Roman Bolshakov --- monitor/qmp-cmds.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c index f5d50afa9c..5a5f3a65f4 100644 --- a/monitor/qmp-cmds.c +++ b/monitor/qmp-cmds.c @@ -54,12 +54,7 @@ NameInfo *qmp_query_name(Error **errp) AccelInfo *qmp_query_kvm(Error **errp) { - AccelInfo *info = g_malloc0(sizeof(*info)); - - info->enabled = kvm_enabled(); - info->present = kvm_available(); - - return info; + return qmp_query_accel("kvm", errp); } AccelInfo *qmp_query_accel(const char *name, Error **errp) From patchwork Mon Nov 16 13:10:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Bolshakov X-Patchwork-Id: 11908459 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C7C5514C0 for ; Mon, 16 Nov 2020 13:14:00 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 48EC32223D for ; Mon, 16 Nov 2020 13:14:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=yadro.com header.i=@yadro.com header.b="Jx3TBXcY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 48EC32223D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=yadro.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:33042 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1keeKV-0000dj-78 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 16 Nov 2020 08:13:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keeH6-00043h-C5 for qemu-devel@nongnu.org; Mon, 16 Nov 2020 08:10:28 -0500 Received: from mta-02.yadro.com ([89.207.88.252]:35680 helo=mta-01.yadro.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keeH4-0002ts-Cm for qemu-devel@nongnu.org; Mon, 16 Nov 2020 08:10:28 -0500 Received: from localhost (unknown [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id 09F8E413A0 for ; Mon, 16 Nov 2020 13:10:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yadro.com; h= content-type:content-type:content-transfer-encoding:mime-version :references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received:received; s=mta-01; t= 1605532224; x=1607346625; bh=oP/m/Dl+RxCXtaNM69GqKm/WJORrOxAPORj Rm/PNOR8=; b=Jx3TBXcYuOoywIXqmgUfMtphmhiI9z4jlgrhH52ipyWB+RtC74m 5dwfVmJVUWiMjWjlgNyZazBcGsctPr6YxPyvWFBu0uERFDeVJu0JxTC1r3/FVjRT wOWaHYeRNyh2jT0OQGdT8zAXP9/8UXEhD5Td/hhIWbUA8r1GTrgIaLII= X-Virus-Scanned: amavisd-new at yadro.com Received: from mta-01.yadro.com ([127.0.0.1]) by localhost (mta-01.yadro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HCz0vxz8lMvy for ; Mon, 16 Nov 2020 16:10:24 +0300 (MSK) Received: from T-EXCH-04.corp.yadro.com (t-exch-04.corp.yadro.com [172.17.100.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mta-01.yadro.com (Postfix) with ESMTPS id 1ED8B41392 for ; Mon, 16 Nov 2020 16:10:24 +0300 (MSK) Received: from localhost (172.17.204.212) by T-EXCH-04.corp.yadro.com (172.17.100.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Mon, 16 Nov 2020 16:10:23 +0300 From: Roman Bolshakov To: Subject: [PATCH for-6.0 4/6] softmmu: Remove kvm_available() Date: Mon, 16 Nov 2020 16:10:09 +0300 Message-ID: <20201116131011.26607-5-r.bolshakov@yadro.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201116131011.26607-1-r.bolshakov@yadro.com> References: <20201116131011.26607-1-r.bolshakov@yadro.com> MIME-Version: 1.0 X-Originating-IP: [172.17.204.212] X-ClientProxiedBy: T-EXCH-01.corp.yadro.com (172.17.10.101) To T-EXCH-04.corp.yadro.com (172.17.100.104) Received-SPF: pass client-ip=89.207.88.252; envelope-from=r.bolshakov@yadro.com; helo=mta-01.yadro.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/16 08:10:19 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Roman Bolshakov Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The function isn't used anywhere after qmp_query_kvm() has been switched to invoke qmp_query_accel(). Signed-off-by: Roman Bolshakov --- include/sysemu/arch_init.h | 1 - softmmu/arch_init.c | 9 --------- 2 files changed, 10 deletions(-) diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h index 54f069d491..b32ce1afa9 100644 --- a/include/sysemu/arch_init.h +++ b/include/sysemu/arch_init.h @@ -32,7 +32,6 @@ enum { extern const uint32_t arch_type; -int kvm_available(void); int xen_available(void); #endif diff --git a/softmmu/arch_init.c b/softmmu/arch_init.c index 7fd5c09b2b..56cbe0d3b5 100644 --- a/softmmu/arch_init.c +++ b/softmmu/arch_init.c @@ -96,15 +96,6 @@ int graphic_depth = 32; const uint32_t arch_type = QEMU_ARCH; -int kvm_available(void) -{ -#ifdef CONFIG_KVM - return 1; -#else - return 0; -#endif -} - int xen_available(void) { #ifdef CONFIG_XEN From patchwork Mon Nov 16 13:10:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Bolshakov X-Patchwork-Id: 11908457 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BF8A114B3 for ; Mon, 16 Nov 2020 13:13:56 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7ABBB2223D for ; Mon, 16 Nov 2020 13:13:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=yadro.com header.i=@yadro.com header.b="QC+vIKr9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7ABBB2223D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=yadro.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:60882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1keeKR-0000Ts-EQ for patchwork-qemu-devel@patchwork.kernel.org; Mon, 16 Nov 2020 08:13:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keeH9-0004CS-Cj for qemu-devel@nongnu.org; Mon, 16 Nov 2020 08:10:31 -0500 Received: from mta-02.yadro.com ([89.207.88.252]:35686 helo=mta-01.yadro.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keeH5-0002uh-8B for qemu-devel@nongnu.org; Mon, 16 Nov 2020 08:10:31 -0500 Received: from localhost (unknown [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id D186A41373; Mon, 16 Nov 2020 13:10:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yadro.com; h= content-type:content-type:content-transfer-encoding:mime-version :references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received:received; s=mta-01; t= 1605532224; x=1607346625; bh=6qksPsC8TxVM6cbrYY40O/GefzqGChR5LH9 2hSj6dks=; b=QC+vIKr9sPm48D3c3RGvhQrmYsjaBifsZXu5R7x0l/oXf5XYAqw Ce34xsCiw93eCTI7fvwfKb/qKBxL3A4pDYKUFA27TfIIjNhDhgpK7PSY8T0ZEhPP xCaKDZZj7THmzq0TuDFh8ZKcwNHVEE6HozTTPTVA3r1tkKtDrq/kvHzg= X-Virus-Scanned: amavisd-new at yadro.com Received: from mta-01.yadro.com ([127.0.0.1]) by localhost (mta-01.yadro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lEpfjD9dG7uv; Mon, 16 Nov 2020 16:10:24 +0300 (MSK) Received: from T-EXCH-04.corp.yadro.com (t-exch-04.corp.yadro.com [172.17.100.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mta-01.yadro.com (Postfix) with ESMTPS id C0ACF41394; Mon, 16 Nov 2020 16:10:24 +0300 (MSK) Received: from localhost (172.17.204.212) by T-EXCH-04.corp.yadro.com (172.17.100.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Mon, 16 Nov 2020 16:10:24 +0300 From: Roman Bolshakov To: Subject: [PATCH for-6.0 5/6] hmp: Add 'info accel' command Date: Mon, 16 Nov 2020 16:10:10 +0300 Message-ID: <20201116131011.26607-6-r.bolshakov@yadro.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201116131011.26607-1-r.bolshakov@yadro.com> References: <20201116131011.26607-1-r.bolshakov@yadro.com> MIME-Version: 1.0 X-Originating-IP: [172.17.204.212] X-ClientProxiedBy: T-EXCH-01.corp.yadro.com (172.17.10.101) To T-EXCH-04.corp.yadro.com (172.17.100.104) Received-SPF: pass client-ip=89.207.88.252; envelope-from=r.bolshakov@yadro.com; helo=mta-01.yadro.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/16 08:10:19 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Roman Bolshakov , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The command is made after 'info kvm' and aims to replace it as more generic one. If used without parameters, the command can used to get current accelerator. Otherwise, it may be used to determine if an accelerator is available. Here's an example if a VM with hvf accel is started: (qemu) info accel hvf support: enabled (qemu) info accel kvm kvm support: not compiled (qemu) info accel tcg tcg support: disabled Signed-off-by: Roman Bolshakov Reviewed-by: Dr. David Alan Gilbert --- hmp-commands-info.hx | 13 +++++++++++++ include/monitor/hmp.h | 1 + monitor/hmp-cmds.c | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index 117ba25f91..e9da6b52e4 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -337,6 +337,19 @@ SRST Show KVM information. ERST + { + .name = "accel", + .args_type = "name:s?", + .params = "[name]", + .help = "show accelerator information", + .cmd = hmp_info_accel, + }, + +SRST + ``info accel``` [*name*] + Show accelerator information. +ERST + { .name = "numa", .args_type = "", diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h index ed2913fd18..03f22957d9 100644 --- a/include/monitor/hmp.h +++ b/include/monitor/hmp.h @@ -21,6 +21,7 @@ void hmp_handle_error(Monitor *mon, Error *err); void hmp_info_name(Monitor *mon, const QDict *qdict); void hmp_info_version(Monitor *mon, const QDict *qdict); void hmp_info_kvm(Monitor *mon, const QDict *qdict); +void hmp_info_accel(Monitor *mon, const QDict *qdict); void hmp_info_status(Monitor *mon, const QDict *qdict); void hmp_info_uuid(Monitor *mon, const QDict *qdict); void hmp_info_chardev(Monitor *mon, const QDict *qdict); diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index ea86289fe8..00db791aa3 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -20,6 +20,7 @@ #include "chardev/char.h" #include "sysemu/block-backend.h" #include "sysemu/runstate.h" +#include "sysemu/accel.h" #include "qemu/config-file.h" #include "qemu/option.h" #include "qemu/timer.h" @@ -133,6 +134,37 @@ void hmp_info_kvm(Monitor *mon, const QDict *qdict) qapi_free_AccelInfo(info); } +void hmp_info_accel(Monitor *mon, const QDict *qdict) +{ + AccelInfo *info; + AccelClass *acc; + const char *name, *typename; + char *current_name; + int len; + + /* Figure out current accelerator */ + acc = ACCEL_GET_CLASS(current_accel()); + typename = object_class_get_name(OBJECT_CLASS(acc)); + len = strlen(typename) - strlen(ACCEL_CLASS_SUFFIX); + current_name = g_strndup(typename, len); + + name = qdict_get_try_str(qdict, "name"); + if (!name) { + name = current_name; + } + + info = qmp_query_accel(name, NULL); + monitor_printf(mon, "%s support: ", name); + if (info->present) { + monitor_printf(mon, "%s\n", info->enabled ? "enabled" : "disabled"); + } else { + monitor_printf(mon, "not compiled\n"); + } + + qapi_free_AccelInfo(info); + g_free(current_name); +} + void hmp_info_status(Monitor *mon, const QDict *qdict) { StatusInfo *info; From patchwork Mon Nov 16 13:10:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Bolshakov X-Patchwork-Id: 11908461 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 52AAD1398 for ; Mon, 16 Nov 2020 13:15:56 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E24B22223D for ; Mon, 16 Nov 2020 13:15:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=yadro.com header.i=@yadro.com header.b="WVC5zzu9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E24B22223D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=yadro.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:38546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1keeMM-0002zB-SB for patchwork-qemu-devel@patchwork.kernel.org; Mon, 16 Nov 2020 08:15:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keeH7-000473-Lb for qemu-devel@nongnu.org; Mon, 16 Nov 2020 08:10:29 -0500 Received: from mta-02.yadro.com ([89.207.88.252]:35694 helo=mta-01.yadro.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keeH5-0002uy-M1 for qemu-devel@nongnu.org; Mon, 16 Nov 2020 08:10:29 -0500 Received: from localhost (unknown [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id 36CD541394; Mon, 16 Nov 2020 13:10:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yadro.com; h= content-type:content-type:content-transfer-encoding:mime-version :references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received:received; s=mta-01; t= 1605532225; x=1607346626; bh=51dhNsumTuqceMjo1bPaFyS4fMWSvIjVY9d eYkR5PaE=; b=WVC5zzu9sEydVBuBHAHkN/LJ9pRi92hqEua4Ks1bCPEHFgwXYPD MbX/SkqQJ2ZjqRVe8MItR17BcszkpH5nkfmnMYp8ELhm7/f2GuA7FWVomHRas0+S FMkjWA8LvmefRnOyQmcxRKjaQsBWpLzWr+cYRbrdk15YqKzuyI6DHqQw= X-Virus-Scanned: amavisd-new at yadro.com Received: from mta-01.yadro.com ([127.0.0.1]) by localhost (mta-01.yadro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qynjk9wcMXa2; Mon, 16 Nov 2020 16:10:25 +0300 (MSK) Received: from T-EXCH-04.corp.yadro.com (t-exch-04.corp.yadro.com [172.17.100.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mta-01.yadro.com (Postfix) with ESMTPS id 4E2E741392; Mon, 16 Nov 2020 16:10:25 +0300 (MSK) Received: from localhost (172.17.204.212) by T-EXCH-04.corp.yadro.com (172.17.100.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Mon, 16 Nov 2020 16:10:24 +0300 From: Roman Bolshakov To: Subject: [PATCH for-6.0 6/6] qapi: Deprecate 'query-kvm' Date: Mon, 16 Nov 2020 16:10:11 +0300 Message-ID: <20201116131011.26607-7-r.bolshakov@yadro.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201116131011.26607-1-r.bolshakov@yadro.com> References: <20201116131011.26607-1-r.bolshakov@yadro.com> MIME-Version: 1.0 X-Originating-IP: [172.17.204.212] X-ClientProxiedBy: T-EXCH-01.corp.yadro.com (172.17.10.101) To T-EXCH-04.corp.yadro.com (172.17.100.104) Received-SPF: pass client-ip=89.207.88.252; envelope-from=r.bolshakov@yadro.com; helo=mta-01.yadro.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/16 08:10:19 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Roman Bolshakov , Eduardo Habkost , Markus Armbruster Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 'query-accel' QMP command should be used instead. Signed-off-by: Roman Bolshakov --- qapi/machine.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qapi/machine.json b/qapi/machine.json index 5648d8d24d..130b0dbebc 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -579,6 +579,9 @@ # # Returns information about KVM acceleration # +# Features: +# @deprecated: This command is deprecated, use 'query-accel' instead. +# # Returns: @AccelInfo # # Since: 0.14.0 @@ -589,7 +592,8 @@ # <- { "return": { "enabled": true, "present": true } } # ## -{ 'command': 'query-kvm', 'returns': 'AccelInfo' } +{ 'command': 'query-kvm', 'returns': 'AccelInfo', + 'features': [ 'deprecated' ] } ## # @query-accel: