From patchwork Thu Sep 22 14:52:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 9345535 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 9F3DE6077A for ; Thu, 22 Sep 2016 15:22:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 90A661FF27 for ; Thu, 22 Sep 2016 15:22:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 855E62ABAA; Thu, 22 Sep 2016 15:22:07 +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=BAYES_00,DKIM_SIGNED, 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 245551FF27 for ; Thu, 22 Sep 2016 15:22:02 +0000 (UTC) Received: from localhost ([::1]:50334 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn5p3-0004nm-Mh for patchwork-qemu-devel@patchwork.kernel.org; Thu, 22 Sep 2016 11:22:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn5NA-0000yI-68 for qemu-devel@nongnu.org; Thu, 22 Sep 2016 10:53:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bn5N5-0007sO-6i for qemu-devel@nongnu.org; Thu, 22 Sep 2016 10:53:12 -0400 Received: from mail-sn1nam02on0087.outbound.protection.outlook.com ([104.47.36.87]:59853 helo=NAM02-SN1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn5N4-0007s6-V8 for qemu-devel@nongnu.org; Thu, 22 Sep 2016 10:53:07 -0400 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=ZIx0X3IVOKvZMZv7dTAdoGnqGv+vipmRUhe84xz1EKI=; b=c5GwZo4gEcPW7eFkXTdCyGUDC0I/0USmJ+3tPwRIO7cdHXTh88TbW+vhloXkGoyLmH8ulqkRLNQR8HjrMWx+UusYOrZ0PLjk5/8KWkUrhFHun1K4k/fY3hb3Si6iiVKgSyp9u2SEkupLf67MJV5kl87gh0HKaR02bG+kDNO3V9w= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from [127.0.1.1] (165.204.77.1) by SN1PR12MB0671.namprd12.prod.outlook.com (10.163.208.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.629.8; Thu, 22 Sep 2016 14:53:04 +0000 From: Brijesh Singh To: , , , , , , , , Date: Thu, 22 Sep 2016 10:52:59 -0400 Message-ID: <147455597948.8519.11161523289950636174.stgit@brijesh-build-machine> In-Reply-To: <147455590865.8519.11191009507297313736.stgit@brijesh-build-machine> References: <147455590865.8519.11191009507297313736.stgit@brijesh-build-machine> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BY2PR1001CA0011.namprd10.prod.outlook.com (10.164.163.149) To SN1PR12MB0671.namprd12.prod.outlook.com (10.163.208.29) X-MS-Office365-Filtering-Correlation-Id: d0974159-7f00-4786-ff15-08d3e2f828a2 X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0671; 2:PYETq+4PLLdHp/zwCkXIXdhPmqhXA6AEyRdYqs5/Bm5FK2yPjTx1au16AnDE5ESILoND7zvTcV6/kcxb0oaRWCKlzjhxPINKY1e4lO3GMF+dyYX3fObEDkLffqHTZLUs4vKhcF7PTQIoDmI1G7KbT81Y3vZXDB+IMMYEi1BvdOfFUf05OTFtJRpnoIPVLfYL; 3:kX6aFHqbvLPJsTfZDHqgQatcNgKbkMrYd9pKMsEvOT+drPEPsF0JwVtpKJ05+a6ZGM2NnMXwJASEFihzzZPnjVAoj70bgp0hzkRXNid6khGdFHPds/ihCI4woXDlO+E5; 25:Zwp8ZsdGx032pAe7QTzrRXdcVRIIIMZKC+2KGroEgC3wQm7OowbinT77C9aRvZIGIIhMqflY04uf9yVPRxYj0meLKTa1cEDaWU2ixMklFyDOMrvFpPtZ3y2Dmqk9eSvOGoAE+SZzlkcDh+KFO1CyDPAJO6VL+YA10RV7iZgND8ScMQ4elIX0MCEVixhkg5gK+mJv5oGZR7LPxYESVEYfXMF2ttIsqClPf0LpxvdQC74XLBj3X17yATgyVmLkWbFqezxxlVjkRw9BH4RmP/TtHHoZ5p4/GvobknPKKxppenfgAQTVStmTdDvso22bvRWuc7hjW6gBabPjInux7Ra2DxwBiD5YNujQtjTcf2gm0gnuqymPSXkaLiWP9qnGhV27kACswL0mhz8MSoP24yynXPoi1zUd7KkY7heFRnNb+LY= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1PR12MB0671; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0671; 31:FQyrdgYkyip9tJlQUzeXLuPi2WSi37ul/dIPTztOzfiAIvye1wifGef5fhx2YndYFQS7ZrUpELpcs5Jv1Xu7k5epgsNd9wbryO/RCdgbZ3MwEDfM6nQCt+V4RGBnnh53bqcQSzoASJR1o2Pu6FPh1syLBPByGndEccjqclqGC46UA5MzD2ktks1jLeSVKtriYXtTMUTzpIwQawdAeCTE2h9Kg3t2gfZvvzrYyirsRKw=; 20:IjEyZ8YSrh5dy8bSQZjJrVQch0I7OOVdMfODUY0qzYBIN/J70Dg/AzyxKjN67Z/bFJeFTZ5I9P34qNi9IEsWhQAslg/klY7PXNlz2JWUMuQ18fjSJlpIFtLs10fsr9DbEJQmvG57GWs2/bbi8wlSg6cYWVVKNyw/ayLckWBeY43TshTY0/1hNKw0y6agCjHt1YgP/di1EDWWKQO57CqLmX/JvgSMfLNz8MZo3LOSIwBnfzu0cifjPftvNEjsBP7uC35WBzurGW6W8pll4MUD8SVWWLMTdqUz+zGnyF9X3KbQGK3QhpXrP89gxklh5MSFvgWV30ILu6odcKbuRtFkSIofcuXA48DWdh/b1DEfXQFKjEfH6rPBwdy11g35BOl2VhspZsJu95ns9Boz4br32Ue89AbwbDQFkHAISBl/Isihz/zyHiVOsqZQpqOGU6SpZ0iPJ6swIO2JLvCOfJ83W10ii5arOjMebOVIptUnQD1LcihovoatZRfcyl1esVUz X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:SN1PR12MB0671; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB0671; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0671; 4:KRPjDnfQYRMGLmLQ/WpACf5vsKHZgf+kuxHp4Ljg0/W9Dr9KlzdSqKwEJNpGdLZDfvtL2YLfME1Zf+EfBAp0QMP2Ar/HIonUL+iSUF1OImXAWgixQWPy75GHm+LR2LgVnZkaQ4a9JXX0V0RVTfJ/dTZK96J2vmEwRXpx08P0FTFycdvHEuU85WMBMi09bOXDW0lBI62uD8rzZBOcqn+hOiqOlPEnILlYPAszfV7AFc9QoNZLPxdLR6SnPLGj2OEdFCdnJiJNMGx0Ow9w70jZYMv/vaT7aJmtNYbwfiaQLUHJqiGLgSazM1nReSDdHLGBq+prxqaiSN6m4tKzFWaTzrCSlR3LI1t4XCHYPNXpR60JwXFVpdOg+8MA4UUQ8WfndbpKW4ruhYcKrqSUWRzE1CuWihRyzEukvUFwcAl5sEz3qhgvzTEFCCgjzT/tO5f8 X-Forefront-PRVS: 0073BFEF03 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6049001)(7916002)(199003)(189002)(19580395003)(33646002)(2950100001)(586003)(2906002)(92566002)(86362001)(107886002)(83506001)(23676002)(19580405001)(2201001)(6116002)(9686002)(3846002)(103116003)(66066001)(42186005)(33716001)(47776003)(8676002)(97736004)(7846002)(81166006)(81156014)(5001770100001)(68736007)(230700001)(105586002)(7736002)(106356001)(54356999)(76176999)(50986999)(50466002)(101416001)(4001350100001)(189998001)(229853001)(5660300001)(305945005)(77096005)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0671; H:[127.0.1.1]; 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: =?utf-8?B?MTtTTjFQUjEyTUIwNjcxOzIzOnZSMCtPRnExalo1WkhGUWFvWk14UVQ0Zk9Y?= =?utf-8?B?a3ltUWpoUldFQzVYcGRFTzcrTDJhUTVRVFhqOTNyY0FSam5FTnpTNTA1eFRP?= =?utf-8?B?UUFuN3RNQUpKSnQxL0V3Smo0UkRsSUhBZXFLa0RIdndCcGVkYjl5N0M0dktT?= =?utf-8?B?Q0owRGRRS05zTlZVZ3VUNjZMeHRRRVg4YkJHdTlwenJUSm1ld2hzZllzZStp?= =?utf-8?B?SDVDcitqMEZ1bGFJN0pYVEJRb2l6YWh1c2N2emx6Tk9kVXcxL0dNbldjVmI2?= =?utf-8?B?aFFCUDBxbXVoeHJzdmFvcEdWSkpBRmMxZkUwLzh2ZFBlSExQaFBjQVl1c2Fk?= =?utf-8?B?U0hUSThvNUR5R2pPTUN3QXRQcm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IhAqe31udxJGujMXgGMEMi8aCmo42ofpXgA5xSZAEditDd67eFe8Hl4joKuG8=; 7:W57vsB8KnY+nbUGu8akuPVOQhcTdXPUsGQ8FEZygS/x7dbzD8Rq1hYcxQHQiOTO615d81bQq+vwd2yAAuAR8KRSy+kL8ppCFvCxpjOKwyY1mC6f6PSncP/8xyeN2Vtb2Xa1kCQJp0GfFRucteTbGbo5DnOibu9GuApq9YdS1cM51ZNrV4NPtRpRbw0nZGqIMsNIUaCk0bvsHgL5xGXwbMKwHPqPoTylzNIvCI9rz3UeAqM9kMNK3JiOR1zU4mGhyaIGZZ2wmTZoUmMT7iLV8FtusCfiyQzS6jA/IrdWfBRbnetMZXNGtZNMp/wk6UIR6 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0671; 20:CS7WcrCtiO7GE7SlNli89qbTJq2jJIrg/PcRQyHMt4/OhBbRtsMGYn3bjKhsZS/NeZ3Pz45xoOUu57G962+K3ov+J/LSLEbL3KP/6WqS9GCyHopNfgeNKx2oanGQ6Jdx0TXhO70DrdJOSffZ4v/cv/8xwv+cx6v6K6b7i0jxHSIMTwRKchyiwGegFkBuUgxYWJR5TeImbzgfA88A+1NsRPdezkCR5qcoEBqQeA+F+vDSOAprdqK3Lblh3Gmf0FON X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2016 14:53:04.1801 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0671 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.36.87 Subject: [Qemu-devel] [RFC PATCH v2 07/16] 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: , 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 Signed-off-by: Brijesh Singh --- hmp.c | 2 ++ qapi-schema.json | 7 +++++-- qmp.c | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hmp.c b/hmp.c index cc2056e..11e4005 100644 --- a/hmp.c +++ b/hmp.c @@ -81,6 +81,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 5658723..ce7b7e9 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -99,9 +99,12 @@ # # @present: true if KVM acceleration is built into this executable # -# Since: 0.14.0 +# @mem_encryption: true if Memory Encryption is active +# +# Since: 2.8.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 b6d531e..62f3e60 100644 --- a/qmp.c +++ b/qmp.c @@ -77,6 +77,7 @@ KvmInfo *qmp_query_kvm(Error **errp) info->enabled = kvm_enabled(); info->present = kvm_available(); + info->mem_encryption = kvm_memory_encryption_enabled(); return info; }