From patchwork Wed Mar 8 20:52:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 9611987 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 756A26016C for ; Wed, 8 Mar 2017 21:30:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F6542863F for ; Wed, 8 Mar 2017 21:30:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 53FA428642; Wed, 8 Mar 2017 21:30:12 +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 B3BD22863F for ; Wed, 8 Mar 2017 21:30:10 +0000 (UTC) Received: from localhost ([::1]:58532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clj9t-0000lV-Gh for patchwork-qemu-devel@patchwork.kernel.org; Wed, 08 Mar 2017 16:30:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clj6R-0006Nx-Fu for qemu-devel@nongnu.org; Wed, 08 Mar 2017 16:26:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1clj6O-0005dd-7Q for qemu-devel@nongnu.org; Wed, 08 Mar 2017 16:26:35 -0500 Received: from mail-sn1nam01on0070.outbound.protection.outlook.com ([104.47.32.70]:22852 helo=NAM01-SN1-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 1clj6N-0005dH-V2 for qemu-devel@nongnu.org; Wed, 08 Mar 2017 16:26:32 -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=wGJGGFV6lgLrLg/xR8XwL6oKTzYhIKGuetT0Qn2ArNg=; b=0PKZll58M7/T43ke228+lpqQ5BbtVbaRDLSvgSYebJIw+++oCaJdI9iIMOOjesqEaZQgwkTDj5YgXrGqG0X7iX7n++LXHvv5vg6L7xcUwXMVhSQdO7F/0ivOPK9nf+kuRuQpFgoioeF+US60m02e2xzduZ8cFdw60M6xxqgFBRo= Authentication-Results: amd.com; dkim=none (message not signed) header.d=none;amd.com; dmarc=none action=none header.from=amd.com; Received: from [127.0.1.1] (165.204.77.1) by MWHPR12MB1616.namprd12.prod.outlook.com (10.172.56.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12; Wed, 8 Mar 2017 20:52:49 +0000 From: Brijesh Singh To: , , , , , , , , Date: Wed, 8 Mar 2017 15:52:46 -0500 Message-ID: <148900636610.27090.7472863810631270644.stgit@brijesh-build-machine> In-Reply-To: <148900626714.27090.1616990932333159904.stgit@brijesh-build-machine> References: <148900626714.27090.1616990932333159904.stgit@brijesh-build-machine> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: MWHPR21CA0004.namprd21.prod.outlook.com (10.173.47.14) To MWHPR12MB1616.namprd12.prod.outlook.com (10.172.56.17) X-MS-Office365-Filtering-Correlation-Id: c25837ab-f9b1-45cf-0d96-08d466651543 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:MWHPR12MB1616; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1616; 3:7eE/gicLLAqfjjqhvIgHPn97b1dj/Ehh2745ebxhKaX3XPke4bOxpfog6GeVgfZo1uAwIntNPs53xjU3LVP6Hz6WE3+ge2w+R/oBR21BrrB582sN8XYyUygeWwrMkizGkl/Pf5KhVSHBjQJkOCPkfS4bMdyXOvfhbhp77kRRa6yCPlRbW23GvawBs3UKPHRDCPKr8d1BNnwNuUUeWX3XKOdG5I+0jAYNnClr0xkzySAFmv+PpUAkdtsZxQ9lEd93dzaqKNP4I1cZBrqHhRiMPH1W3PJkDrlfppm3/ljuOfg=; 25:B7a+ZaHWRO1VodlM4Di0UFcX/fpkR54P+MxotvNq4IcmLH19izfeD8VlNlLp/OKxDndUeoWllJEkUELUkW31umJiTONO+snLAbquu2DmGjmWZPUSHw2R2AgrF6/sRsaMud2SP56Z7JNgszILKJjbTC04g7fCk7mIrOIV5zVWUcvQ/JpeF5aVJQeiBCvlPmqJR5O3wvYYERhy56HjQCLiq4JglSqQUY3fzWk3ncbeSkRBLnkACj6S9I1ggjnXo/Fe/rJ9CSkEEDibvAnjGVJxGx5ToZePcd8sPESobBkTsuZ8SKSaJcxBB3S5aHZUxbsEnMfedm9Vcv2EB91J5ZxTSoQoDafhNh0SjqRCdVuyMSoO/HKEzQ31hAD/JaMUTbPJSsrDbmIj976fjKQpHYXdq6/fqCKgbvKXUYI7Rym2tG29/WdIQFeGGLwYDpaQ7VO2 X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1616; 31:ZQbMUhB6Ust1YMncmmQFCyNrPtkABzCYIkmF94GFs0DxdfWGEaywZwIjT5dD1YEY5oQhxLNHSVcpJgyhPpWT+kzmNS11g08fYFezCGTSmOdpcsg0BGM5g8+zrF/N8r9Npipj5deUFvgEd68fu87xIVDa8Pq2lVL/93SsX6O6Zb46sEKMQsLB1Pu4I4GvdAX0RrEtaGMMq1R12Sn30Mw+7ry6TxhDxQkxu6q0+82N270UOFIkaisBe52YzJL4vq4t; 20:r/3zU0rBy3wvMMoo3FIv5NnpVRjmoVc3y/GvOzYE9RblXrl+W1hw3kl78vkAf+6xphspzvKAfxKdMXTnEl86t7MRsiLDXp2L1K1Txf21bkqryCl8MaXiDZAQs/dHPN626G0CX3pgxIrBTv/M1vWIYLTfYXKYLDkZNBJ7vQ6BGzaYV5tYQmXUMC8wardd5CAyvcmJgiJYDBzayYA95p9pwjCjnfe3Q2iWaxpyey3/X2+6tJ0NQAEYidns81FVygpAuxINvoB9o8a2us26w+7meGNrMqRtsm1MMOrkNOQ4jK36sKSFyKrWcNACqc2QT3Ia1g1iBmkAXhFnCKPKGnwGmzQJlJBqctAmIhV9GQ8frqB4oPhrbv/J2XlU9wUfFUVr2E1hDRl77DoaZ3g+Y/9wx1poAVT0OZykZXJ/cRUahhw3GwiDVI3c+eyV9eicz7IB1qXYTfPvWz/WxoxWHavr+O1rlqE4vSSNLJHLLj+coFOnLaGgUirs+qhAdFpI14py X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123558025)(20161123555025)(20161123560025)(20161123562025)(20161123564025)(6042181)(6072148); SRVR:MWHPR12MB1616; BCL:0; PCL:0; RULEID:; SRVR:MWHPR12MB1616; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1616; 4:cIw9f/T1c3PfF9oax7l0CoRSVpYXid73KR5lyb2yvtrC/aADVLjPIpV0O1mJfr+b4jEBoFTT+uLZKuEehR1Q7du1Orkgsc5b985o9LpdHb9/2CGnhIAvPm6lQ0cEfcIMbeXJDV16zFcpIvPhH4JuPKk5WQa0yR/jMOfjI4Plze5kf4kvryKpnv3GwlqvV80WIaywfrnb5wXSS803cTgBhZ7LDS4jYCoguliyP5CBTqhfG6u+DsRINVNol0csCGpKa2jpkSpEAR63+E3aLFsJeouOLowTzHo/iXzRzgaShObBHXXwIuidHLp2Tj5P99coRqjO34Nhi+xP6dYeeaSAbZKUfrstuMlJCKpxn2mAmf8RJq/9ZWU5dIB6lofiGIve4cEFstg9yF5zGJkq/KUGDyJ8yPvicDhgSRt84Awnf9DGahS1e2KxilYYaWh9WVaZrS7iK5XCEE9L/vGyu6wRT26zwon4ZlL2pOYnB/pIZP0UgsirVJPgXMeWjAUO+58WNbWm8pT2xbKh2AVrSg+C2hEkF8oKaOjEbYWvWq4m1Jv8jxWDSj7L2MjgZV5gCCE9WhyElOd0YI3Z2IlWcK3v0uB0g58eKuCGygEbxpfwS6cKPpX3CEMsD+J8mg0MdY+LZARPlQRgEwvofbrhzDwM5nkShPk663Jn/lBHKUUyUchCYzbRAnj+EqnarF19a0eQ X-Forefront-PRVS: 02408926C4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6049001)(6009001)(86362001)(5660300001)(2201001)(33716001)(3846002)(54906002)(103116003)(4326008)(305945005)(189998001)(53936002)(9686003)(38730400002)(7736002)(6486002)(77096006)(90366009)(6116002)(230700001)(25786008)(50466002)(33646002)(81166006)(76176999)(42186005)(66066001)(8676002)(6666003)(23676002)(83506001)(47776003)(54356999)(2906002)(2950100002)(50986999)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1616; H:[127.0.1.1]; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjEyTUIxNjE2OzIzOmJHeVJyQWRjbXdyOE1RQWZaa1QvUjZzUGJN?= =?utf-8?B?SVB2T3VKa2h5Y3BNM0VYS1RJazZsZkg1RlpmSkU3ZVpkdVJIV3hMdERXRzZJ?= =?utf-8?B?QVpwbU9FdEhMNWF0MDF2TnZWRWFNMFZFV1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in9h8ETBXWwhQTL6iCXnH/9lSQm498oOTa9egybu0WNoBcljesHOObQGV08= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1616; 7:zxrkaF89vpDU+vKqf8CaicW0KdHOBeciRD97xhbZTOOnQEw5mV4vpSyyenPKCwlslkeMVd7AdibsDMpt17AwnaqTEe/SIrGuOfSmGr3yKY9vkyfQ9TlAXysrCfpeKjFYwOXtkYdvMVzo8LA9V4WfXCeG+6Mbij+vFX0eRmC7Qwqh4GlcCQ3+EWsp37Sj7qcqQ6Wr7TAdWvFlautGy4+cBhMekS8g4k3jvx9AzMoRauLc8hFYmiIiNDQlxxuLrag0+Vxvl1unudgbp93D+cp1f7TWyAum9rF71e+ptFSduTiAklCmvs70+/mnvPiXg/tks9aJGN1jMlR3LHd6CqLF4Q==; 20:nzzOeMv2tB6YLXlzTGa41C8sJms2o0RuJf3QGGWQTgqjNdzuNNdS3G+wPayPveDEUzU581iXnPNacbQ79CHSZ5fAG3dULAP9xKn0m58o89etwvxsXO4vpTLxFAbefxFpfEMOBbOxN6AwGS4EtyY5bO9If6vWCRVc8u0qcU0bjD574tR9z5+JAQe39ZXTgV0lMtzLBFg+6x7ZE2nEViH5XxESgUoy0OrTXX2m8kUUQH/3W5iFc8ShtyLKS1L3b6vO X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2017 20:52:49.3512 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1616 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.32.70 Subject: [Qemu-devel] [RFC PATCH v4 09/20] 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: Thomas.Lendacky@amd.com, brijesh.singh@amd.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 261843f..0b8b315 100644 --- a/hmp.c +++ b/hmp.c @@ -83,6 +83,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 6febfa7..e1dc847 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -185,9 +185,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 fa82b59..7b61c43 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; }