From patchwork Tue Nov 1 15:53:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 9407567 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 0E7F160585 for ; Tue, 1 Nov 2016 16:01:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 000BE29A4B for ; Tue, 1 Nov 2016 16:01:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E8E1929A53; Tue, 1 Nov 2016 16:01:29 +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 640D529A4B for ; Tue, 1 Nov 2016 16:01:29 +0000 (UTC) Received: from localhost ([::1]:48884 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1bVA-0003HM-5D for patchwork-qemu-devel@patchwork.kernel.org; Tue, 01 Nov 2016 12:01:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1bNJ-0005IF-PJ for qemu-devel@nongnu.org; Tue, 01 Nov 2016 11:53:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1bNF-0003kM-LC for qemu-devel@nongnu.org; Tue, 01 Nov 2016 11:53:21 -0400 Received: from mail-by2nam03on0077.outbound.protection.outlook.com ([104.47.42.77]:48908 helo=NAM03-BY2-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 1c1bNF-0003jt-DA for qemu-devel@nongnu.org; Tue, 01 Nov 2016 11:53:17 -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=YAX6vR72BptmWe4ZZ47cYhmroB5K2/fF+nqab87aHk8=; b=NMUjFgqtQbOeajmhewD9Sni1V+rXwG17fFlzG0ETaz9fR9udM6hOSN2oP3n9A/RxFxF6mxkwj2AfkRGlqEpKy5CNARO/CudtFBuZLg2wMyah6xB6LP8iMsDGuP/NqPyE72hYrd24eFcLomHfwvYZ+uTUqDbt5wm+2jMbp1D/Weo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from [127.0.1.1] (165.204.77.1) by BY2PR12MB0664.namprd12.prod.outlook.com (10.163.113.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.693.12; Tue, 1 Nov 2016 15:53:14 +0000 From: Brijesh Singh To: , , , , , , , , , Date: Tue, 1 Nov 2016 11:53:12 -0400 Message-ID: <147801559257.18237.17088133910758148050.stgit@brijesh-build-machine> In-Reply-To: <147801550845.18237.12915616525154608660.stgit@brijesh-build-machine> References: <147801550845.18237.12915616525154608660.stgit@brijesh-build-machine> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: CY4PR13CA0016.namprd13.prod.outlook.com (10.168.161.154) To BY2PR12MB0664.namprd12.prod.outlook.com (10.163.113.153) X-MS-Office365-Filtering-Correlation-Id: 9d3e46f6-b924-4fa5-317a-08d4026f3108 X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0664; 2:JwSIhOz8qPQIbvxc/i72h0HIY04AIYn0+msmPiIqOb++n+8m+dXtbbC27unAk8ePSFLvGLjc/6B/5PAZDgOk3YcpBdZSXd7401DVZPC/ikdJyOrgLgzX46y5K4yzZViLns86GX9B8rajVVlbAQ7rlrU5CY2ysw7LhCTND1AsG4Xix1Qn/gjtiyi953LMY3no+9oGFTsgdUi4mWJL4aN8Pg==; 3:7dY0YQ8Jfg/ti8mbcCM2H60IwfXGalIp82Zt58orNSfWfw9yAxqlchXBagee7RblN9TTFxhIJ0/M+oBjZfMTTdl+MiIuuKO+A/J7iScFY/o5Vl8wRRRD3AQIkSXuY7zt3XVGCWI0LfkZvUUx1u0ILw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR12MB0664; X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0664; 25:Co5X7sLNiNfi6vVtkwjTbuQQIzqDpwI8oo1iNTZt7Z3vcVacx4lCgdnuutn2KXG2YTFVNNdJf19MhcwgMfPp6G+qS96GbhkOcvRxM3wUbKNns4mutQ9ddNaCTlNkb/LuMjBnnHjfJPfu4Qc7NjpAW4+M+emaftrZx2BOYO8GJykDlhR7IxfjBV6SQqbxCxexCsCF9w1veLieVz2BF9ki6GQPB1VVvwKZsTt/tVd1gjp5PuuSKm1SEmX7IeyAino19c6+Ig1uAVb+FRxcxqtRs7W37ZaW2IJNv35iCrMaxfzKoN69D2CMIgtzYzYKNhCur+P0uePQhF5GcgX1OIvo0YHqMcwdSslErOrvug/QXX7WCK5RGoi84UiyoRWFNfVTA0BeCt18gzXn3btkkaPFzT8MaxZZuWXa9HHX02qBNRyB+CCM/20JqFk94RXEtDEsKaOo9Tnf5sHiXdEnkbVl0XRzfsIZOLuWdDK/pJsTZdstsqL/02tE4sV4tWryqMhS8dVaQG//JOPiIza4LJ8IFH85nrDcODk+GEFA3MONTXJsSRE1mQ3EEgu/fFRba7MvHto6ioD0UbQpYFuyOhgs1dcZEI5EGhPtU1bFFYjOOGLwy1ihLi8fEt6tkjcGNCe3tMXPC5t0ANkBBPMnQnqANVClPqEV5/mXW+cgg63VNoHeju4uA8w5tLzpiKXQaVkotr96SXrgjp4Yzb0htbavUQ== X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0664; 31:KR2f0KPOqzZe1DYlqdFW29kIYzIpLjV5/W6Y2yadXOt7wwhZQ3/8P58qixqjR8r7wl3f5Y/j1omtf3pzsroGrYjHCzGeGuf8V3HP1Ip35TQNV8WVP6vCQ3rMF3h3BeWpajsalt+D2LLsisEpkfhwBgwIYpLQwoa/DROirUsTB8x2prZn2nov1Q79c37p1ZPulJefDl/ho0c5sV47S3SsV0TPV0fYqa8CjXMmnHouwd4mgmBXxMn2htTuMeaYZ/c5bxXqxxj7hNxsBuVX4G2tIg==; 20:cIv55AdXOu/06V1Ab/6FnNeG8F/LvVVPrOPK3v+rx3pYLiYzoULO9Y8b4zBpGsl+H83e3o9twRF/Z1nYBj1eaLcvtc1t/3y9z4cvdQOJKoqS5lyrFrzmCSJmR6/EfKDO8Uv3gfNLIVz4i1q6LdSEzDcdRdcNe3Ayptk80Xiko0R+G9MlGkOn7FkaCOq0RNaMy/tAPnvLSFEZxqGTBhAzV2mYGX51RRftOlaeEn7M8G4jN9bWNxvvnKlRqSjGmETwKd2JjBSAlfRcr0MDdtYhIKSiWqmPYgOUWv2DpHjKsJ4P816nonE8OpR94jd4uEDxhR0AQYxq2EQIbRQj/lTdfa5y6u1qhiB6QI1GdI5YRyT9i81Zv4FZrEKHOopLgjZqByL0jTEkhzvrJZn8reiHZ1BzYlVJDhPh7BVmh5rge/x3D6O9D0kEFmmF5n19n4wfFz4LjerDaH7QO/t6mNrgk2Up6gNzzAv17f6Jhl32qsWSD3D4DSaew3IHxN+D2gVg 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)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:BY2PR12MB0664; BCL:0; PCL:0; RULEID:; SRVR:BY2PR12MB0664; X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0664; 4:pLvOPPTBWKdSwQW9Yvpg00F7UxC6PWYzxf08i+xKQ+bs1fHFQFP2hZat2zB8sUxq57FlDPz6KyONT8Y08OhdrkS0+k0t2u5mbn6NLfuab4jhw8S0cj0YA3mWBySZ2Q3PvZph+RYs0W3zb1s2/oEkZW40qCScJWY4gI2gF5IcQYBuNsXErOUrDwqas3/MIjujRQA8rKRHNoW04NexAyYnx+oZw3NHiA2FDmoN9p97xPeLMXPC8PZBE5/ML4/6hnwrX72EtheWb5MpzTZxYMKbAzYpwzxoTGJ6RLarNpYXfPW9weKJn/S7FeHr5tIGNxWZC3959n6gQIqqYaK4a8hU4jA5eZLjMIsR3Og5vX6I3O5wTbhxuU0EhH+rAT7b1kx356qiZ8V0OC6Byy+FQsxjFTYp+b7FwRCtRN/t5/K796Kwh+xXB3gIYbElsMjTtPby6JxRI9MRh2YBD8UwTzqLrA== X-Forefront-PRVS: 01136D2D90 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6049001)(7916002)(189002)(199003)(81156014)(305945005)(81166006)(7416002)(6116002)(3846002)(101416001)(47776003)(2950100002)(33716001)(50986999)(76176999)(54356999)(8676002)(230700001)(106356001)(105586002)(42186005)(86362001)(97736004)(575784001)(5001770100001)(586003)(77096005)(2201001)(19580405001)(19580395003)(229853001)(4326007)(189998001)(66066001)(7846002)(50466002)(4001350100001)(33646002)(103116003)(83506001)(2906002)(5660300001)(92566002)(23676002)(9686002)(68736007)(7736002)(921003)(217873001)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR12MB0664; H:[127.0.1.1]; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com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L1xRztea45IOQIVGq8XD9RE6+SDH5Ci/jysmAjo3PxzIYk5wCL271tiqv1firYupQ5mvPpMmx79f8sSwUs3oDAb6z5EQFfBesFddvAVJ2Y8F0mXkxbU=; 20:m27hCK07YvraBPAmjJPKxqRRwfd82yM5cS5MhknOnysxRoxXklvd/KDwloqh6BqHad7M7aDP4e5td0chflVPlMXfj9V58KUwN1Z2Y9avmfaOt+KHnq0AnO23STOTMvb4+VAeax+OJN+HfHU3OPONddrjKegIFgac0L9OdzcJfCYFRDqCxMlqF6pe6vsrWkc1zeC9mioH1ij28i0fegnXozcR0wHLeRceWBLQ35rnWpIW5WcdVq499UFzFz5FXOXD X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2016 15:53:14.5662 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0664 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.42.77 Subject: [Qemu-devel] [RFC PATCH v3 08/18] 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: brijesh.ksingh@gmail.com 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 | 5 ++++- qmp.c | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hmp.c b/hmp.c index b5e3f54..b9abb60 100644 --- a/hmp.c +++ b/hmp.c @@ -82,6 +82,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 8a7b527..2091193 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -120,9 +120,12 @@ # # @present: true if KVM acceleration is built into this executable # +# @mem-encryption: true if Memory Encryption is active (since 2.8) +# # 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 0028f0b..b7b2e7a 100644 --- a/qmp.c +++ b/qmp.c @@ -68,6 +68,7 @@ KvmInfo *qmp_query_kvm(Error **errp) info->enabled = kvm_enabled(); info->present = kvm_available(); + info->mem_encryption = kvm_memory_encryption_enabled(); return info; }