From patchwork Mon Jan 29 17:41:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 10190347 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 EC1F960375 for ; Mon, 29 Jan 2018 18:06:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D86C122701 for ; Mon, 29 Jan 2018 18:06:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCC9B25D99; Mon, 29 Jan 2018 18:06:25 +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=-6.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable 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 EF46A22701 for ; Mon, 29 Jan 2018 18:06:24 +0000 (UTC) Received: from localhost ([::1]:54601 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egDp1-0000eD-Je for patchwork-qemu-devel@patchwork.kernel.org; Mon, 29 Jan 2018 13:06:23 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egDRd-0005h7-LH for qemu-devel@nongnu.org; Mon, 29 Jan 2018 12:42:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1egDRZ-0003YM-HY for qemu-devel@nongnu.org; Mon, 29 Jan 2018 12:42:13 -0500 Received: from mail-dm3nam03on0086.outbound.protection.outlook.com ([104.47.41.86]:44376 helo=NAM03-DM3-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 1egDRZ-0003Xh-AP for qemu-devel@nongnu.org; Mon, 29 Jan 2018 12:42:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=5K+KzSnXb+KaLLdAZRk3tq7k9N7AmaRhFyMpV0HhTMU=; b=jOmCApdPDNHsV7SkLr/D069P0EbhZ2s2TsRY6xwS9sW/9mPYzkb/x1HOeJqQ/6NiH6Z/7RT/MCYXnPE5bh/cC0D/4g6W4uCC8G5KKjAyyLcr/d069XK2/IGExVa4Sf6BmazNK5NahdHNFcybT5CrS9ol0swGmwszkq57fntFaDg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from wsp141597wss.amd.com (165.204.78.1) by DM2PR12MB0154.namprd12.prod.outlook.com (2a01:111:e400:50ce::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 17:42:06 +0000 From: Brijesh Singh To: qemu-devel@nongnu.org Date: Mon, 29 Jan 2018 11:41:22 -0600 Message-Id: <20180129174132.108925-14-brijesh.singh@amd.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180129174132.108925-1-brijesh.singh@amd.com> References: <20180129174132.108925-1-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: BN6PR17CA0018.namprd17.prod.outlook.com (2603:10b6:404:65::28) To DM2PR12MB0154.namprd12.prod.outlook.com (2a01:111:e400:50ce::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c99f1696-2c8e-422e-03dd-08d5673f9e34 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:DM2PR12MB0154; X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0154; 3:TD1MwAArCHCmwkgOHHVHdRudRo6Yq9JgxEYUGdcApGd1L2B2lNuAr7wp2aYmk2Cci5TNEgECE6hG20gDT82HC4VOIUG/rw+5OJMkfmJU/dYouzNimH/SgGY6i8RM8sPtN+e2W7Fa82F9opjVlMYjHNAAE5E5WJqseaSMf97mpyG6wIDfAlVP8qyN98QMhulzCLTP213kTwuZIdbFPwpcKkGEl5urRWHhsyNEREwGLWWzcfljSUsS1e1ogbRPyZJ5; 25:PRA+yzC1MhhuPo6PaZxpf3rVUSsFnnVzaitShezBphXjgjaxXdb8AUap/W9GV7Kqjeik2YifVlFskDEjmqleXEM2De/DZsJ2XwI+2zDCWN9yNvHB61jDRuKODogUDOvSgvmcPCI70buScDLqLEd5zmFnaydX9iQxBlg0GqHRFMvA90ZvF3TgGh+zn6TIInw4macOdO4hebTVahGOLh8EX2vHSm8JAOkK9+T78g618CPsfYA7jyVcl7MIFIoZqYaXkIiDQbCWc9i7M476vs4HAjbGvg8BAMrpq+iGjaGBGsYQXYqEbrJdjM43c+9BuLSo1SBsDb42v/SSn0vGknurWQ==; 31:TN68XzNt48S2ycVBf/c3lWkGG6f3/nKwJBditWc6UtP67g4XASG4lOa6OBX43nmK99gNxQGOphQjmUPhoHJ1wVUJu6ymBwSzicjcSKbz2t0y0vgGVcfu/9I3GJDfb+Xos3SN2CmkbA6lXvhgY5fsKKZtuU4LxB1irEUDDZPtJfj0tzZP0371B/hX8nq99ehtaG4zjp8XbgfCMLij9z8tgIV57qn/t00dE5hWQ/G+ySs= X-MS-TrafficTypeDiagnostic: DM2PR12MB0154: X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0154; 20:cxyyCEGmsmMUg8JoxqzdSLMU2r3/P1rk/jUNk5tv9R6FrquYqRoeLaxeSeUb5aXDp6UZDn4CgA4RM+PyJxO4y/wjAzETcooe0ND3cqNKM3s6E77fi7YL0JHLG/RT/fdkTScQKr7tM7oxK4VyBO5MjYJR2uqaFG9SAEoBmj+C3Lx5F7ZrMvPU3Cmt3e8q3IjRvLZ0OePqbsn+2QoL5PJ2DFVJKC2Xhrxv/NA6g94Cw1NgQOhucUwk0zlze67owi+Woy+rbqbisgXmp7gdFKbit93ySfoXDQpmqY2JhBOFmdKioVXhDm21eBYGabdUTye6uvgnCscU8x9tPLPGskq36qE5ZEea5fg4HpnnpRy0hGWg7YOk7pe7/NbEp4diW0yPTPIjwOyqlfVTcqI0O4ORkJPDTaaWYZKokHkRsuHD8GO89fSMpUIlYS9aWWR7/uSeRnoywM11svERgoeolsLJUMJ5IjpPX52Ob8ihIYhrtI50Mr76Tfo9cLq7e3Eni6cZ; 4:f5MMmQp92ajnrLFerboBKA8+A6hjHgsq58yGPwr7kMlLeq0RBzRWU9E2EEFFvTnxmPDo1cECjJ8NeugRQPhf/TXxnzapn18y9xfOpWxOvdFVDlUuspdYI48aEM8SZfCqrr0LeXaA159gTNAfHjCYoQbt6TbO7+eBKvjyQRcEvgnO7ki/KWg2d3vZKYjUo1hybVcshf0UYkbVdw+sqnd6C3+PHpXVZVCXsOsHEPFKEmYAl9kD4EFKqA98UbomtIuwZiR54L1Bdf8XrMPlZ4RRjJxhrqq7ih8ciz3WGOhySRaR9g9SGOi0l+hdUUkvslnI X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(10201501046)(3231101)(944501161)(93006095)(93001095)(3002001)(6055026)(6041288)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(6072148)(201708071742011); SRVR:DM2PR12MB0154; BCL:0; PCL:0; RULEID:; SRVR:DM2PR12MB0154; X-Forefront-PRVS: 0567A15835 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(39380400002)(396003)(366004)(346002)(199004)(189003)(48376002)(8656006)(39060400002)(4326008)(6486002)(68736007)(36756003)(478600001)(26005)(97736004)(16526019)(53936002)(386003)(50466002)(86362001)(575784001)(25786009)(8666007)(16586007)(54906003)(186003)(47776003)(59450400001)(316002)(7416002)(305945005)(7696005)(105586002)(106356001)(76176011)(51416003)(2906002)(81156014)(66066001)(81166006)(8676002)(2361001)(53416004)(3846002)(50226002)(52116002)(6116002)(2351001)(1076002)(8936002)(7736002)(6666003)(6916009)(5660300001)(2950100002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR12MB0154; H:wsp141597wss.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR12MB0154; 23:PbRwNqHdmJNg/Cet3IIMSxtqQkQvFkq0HvVkMubti?= =?us-ascii?Q?GzgJH3Y64qsCRYyNm2Fsz0YcClm7dYq8AW5KMDtsQM9B3M/itGzlorf2B04T?= =?us-ascii?Q?xBA2pInXFalemS//ce6g/3wTLC9N6EOH/+wgVt1T3y7ZTVhm4TXlxwpYDlms?= =?us-ascii?Q?5TfLTmkWH3fAZTHRqIC3IgD0q639PavE+i1wp/sY7uawgDlxTRb02xRMfokZ?= =?us-ascii?Q?ToaPLBHsALt4G8eKsxyoFwciDrrQnRddZjsB36pJZf6SKPf+h5eBIIF+GS6q?= =?us-ascii?Q?LfI8J0X4+as5NyZz41mrjvHStciPgtd2NvF3zbTgteua+GEA0Q1x50Cgglf1?= =?us-ascii?Q?mU2NzYPHs7knvXDJxEw/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agnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0154; 20:rjVndGfwIK0AhyaXZMkofYRGGdAeiw/73NohvZCN/AR7StealfIxkRoWKFm5I6aZIJid4ZsvbakD2wmtBTJ/etQzS5yXdG2CEtqzVlh5FyjmJyTMT4hhcHX7IP2SyRkcLZhv3sYC0v9SueVYM4mm9EOr1FMQMVPqtl8u4VhFNBYi/KDSCmocTIXjYCgSvYA6QUOnIg7A/dfJTReTLgwcx3zGP3vHx0iwVWkwfFOt8yKYUxp6bEgdfzpKoTPCiRT+ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 17:42:06.4165 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c99f1696-2c8e-422e-03dd-08d5673f9e34 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0154 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.41.86 Subject: [Qemu-devel] [PATCH v6 13/23] hmp: display memory encryption support in 'info kvm' 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: "Edgar E. Iglesias" , Peter Maydell , Eduardo Habkost , kvm@vger.kernel.org, Tom Lendacky , Stefan Hajnoczi , "Michael S. Tsirkin" , Richard Henderson , "Dr. David Alan Gilbert" , Markus Armbruster , Brijesh Singh , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP update 'info kvm' to display the memory encryption support. (qemu) info kvm kvm support: enabled memory encryption: disabled Cc: "Dr. David Alan Gilbert" Cc: Eric Blake Cc: Markus Armbruster Cc: Paolo Bonzini Signed-off-by: Brijesh Singh --- hmp.c | 2 ++ qapi-schema.json | 5 ++++- qmp.c | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hmp.c b/hmp.c index 056bf70cf1e2..6ceb6b30af75 100644 --- a/hmp.c +++ b/hmp.c @@ -88,6 +88,8 @@ void hmp_info_kvm(Monitor *mon, const QDict *qdict) monitor_printf(mon, "kvm support: "); if (info->present) { monitor_printf(mon, "%s\n", info->enabled ? "enabled" : "disabled"); + monitor_printf(mon, "memory encryption: %s\n", + info->mem_encryption ? "enabled" : "disabled"); } else { monitor_printf(mon, "not compiled\n"); } diff --git a/qapi-schema.json b/qapi-schema.json index 5c06745c7927..2046c96669bf 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -314,9 +314,12 @@ # # @present: true if KVM acceleration is built into this executable # +# @mem-encryption: true if Memory Encryption is active (since 2.12) +# # Since: 0.14.0 ## -{ 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} } +{ 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool', + 'mem-encryption' : 'bool'} } ## # @query-kvm: diff --git a/qmp.c b/qmp.c index 52cfd2d81c0f..3a527bc8c39c 100644 --- a/qmp.c +++ b/qmp.c @@ -69,6 +69,7 @@ KvmInfo *qmp_query_kvm(Error **errp) info->enabled = kvm_enabled(); info->present = kvm_available(); + info->mem_encryption = kvm_memcrypt_enabled(); return info; }