Message ID | 20180212153715.87555-27-brijesh.singh@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> 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 90B0860236 for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 12 Feb 2018 16:00:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 803D828988 for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 12 Feb 2018 16:00:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73B9328991; Mon, 12 Feb 2018 16:00:00 +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=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 ACBD62897F for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 12 Feb 2018 15:59:59 +0000 (UTC) Received: from localhost ([::1]:45828 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1elGWM-0004zH-Qj for patchwork-qemu-devel@patchwork.kernel.org; Mon, 12 Feb 2018 10:59:58 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <brijesh.singh@amd.com>) id 1elGBx-0003rC-9P for qemu-devel@nongnu.org; Mon, 12 Feb 2018 10:38:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <brijesh.singh@amd.com>) id 1elGBt-0004k2-QO for qemu-devel@nongnu.org; Mon, 12 Feb 2018 10:38:53 -0500 Received: from mail-by2nam01on0076.outbound.protection.outlook.com ([104.47.34.76]:58163 helo=NAM01-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 <brijesh.singh@amd.com>) id 1elGBt-0004h6-G7 for qemu-devel@nongnu.org; Mon, 12 Feb 2018 10:38:49 -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=ICcd5Y5DOSqpCvSw37bw+U5g9haF46lNv5lRUen/nNQ=; b=XOq3olOvRfu3LxAtz0/mzpHuw0GGOFZqAGpPLnP65F/f3uQvPy1fE6WSjKYZ9vWiDn6pF87OJ9c0pyCuEV8m6DQSlCvXX6bJeayFny2kqwi4s9vpOP7C0QU/jJTUHbZ3RAR8/f+MUbxm/qD6AgNG6UOQxyWUPdYBxkocAOVMk9k= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from wsp141597wss.amd.com (165.204.78.1) by BY2PR12MB0146.namprd12.prod.outlook.com (10.162.82.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.485.10; Mon, 12 Feb 2018 15:38:45 +0000 From: Brijesh Singh <brijesh.singh@amd.com> To: qemu-devel@nongnu.org Date: Mon, 12 Feb 2018 09:37:13 -0600 Message-ID: <20180212153715.87555-27-brijesh.singh@amd.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180212153715.87555-1-brijesh.singh@amd.com> References: <20180212153715.87555-1-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: SN4PR0801CA0004.namprd08.prod.outlook.com (10.161.215.142) To BY2PR12MB0146.namprd12.prod.outlook.com (10.162.82.19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 21b3d464-4ef5-433f-c4dd-08d5722eb4ff X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:BY2PR12MB0146; X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0146; 3:2V3sBa+8BpyeAlUsMyNG5YUuBdyiIARN3mHfTLySR6tpgu6E6pN1Hm35ua6snRha45BpKmukUw8dtNL5WqOIX1XCACTkq5A9DKYLuPRKGmvSgdJ2xG9O2XNFAhhNaORcGkXHMDYfx1AMCfAbPX2+BsB5C7bYZm9dcnx02m3f9/8VZOKajDwu5nVdEA3acdB81Z8FkzQbfwPZt6+QXcKVvfT6HLyjVBaGS/tStBQcQPutiMVcPt3V5X15BzlIy+xD; 25:y2kcStHh17QJJ/yOpALhcYvj8ttNJTvUob/jF4Zdxp84FTbrXtdljAM2EMglips5vO5t/p5pgQ509KSsyegslN9kzL3uhxlPiGVBCwTSGbI2Pg1vjUC5pLLkjoYDD+JCL5cdrdSlY5w2fpxn2WTuA09Mcb2ZLZ8c42QPCucdc4bvCBBnnlx2tEFwuNwNH2tOgxsxNuMivhq5hMnbcjKQPV8sbSGsd0Kj65+CmhqzwxdouNr1kkAabMRDSRBPLqyumoR7Gt2tx6AaiKkVl8W6r8j/vg8VnzLUgsUNdlDfgwJLoCed7xcAEFFKqPg4z4u3+cNvomO25SomcXkbUf4v3w==; 31:GoB7ayA11PuMxkZl260exGpnxXm3/ZgeN0li5Ehvlaubri/aR+T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RKuBF7 X-Microsoft-Antispam-PRVS: <BY2PR12MB0146C751FB3C189139C29251E5F70@BY2PR12MB0146.namprd12.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231101)(2400082)(944501161)(6055026)(6041288)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011); SRVR:BY2PR12MB0146; BCL:0; PCL:0; RULEID:; SRVR:BY2PR12MB0146; X-Forefront-PRVS: 0581B5AB35 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(39380400002)(39860400002)(346002)(396003)(366004)(376002)(199004)(189003)(25786009)(53416004)(66066001)(8676002)(7416002)(105586002)(59450400001)(81156014)(76176011)(81166006)(5660300001)(97736004)(186003)(16526019)(8936002)(106356001)(50226002)(2361001)(6116002)(3846002)(47776003)(305945005)(1076002)(86362001)(26005)(2351001)(7736002)(478600001)(36756003)(4326008)(2906002)(53936002)(6666003)(2950100002)(8656006)(52116002)(6486002)(39060400002)(68736007)(54906003)(7696005)(23676004)(386003)(316002)(6916009)(50466002)(8666007)(2870700001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR12MB0146; 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; BY2PR12MB0146; 23:P1gyKRMaBQTmjSIHIhF/q8RQb3Qc26OHswujp6lUx?= =?us-ascii?Q?jRmnQQbV/zevZ3dPFa/ziiWg3pCVyeyb7R7B5ArEFm+U4POxAlNkzpkNicxH?= =?us-ascii?Q?0umknpPIjb3JXPDXf36EHUQXuO3t6G8TxR/vUPntYB/okTFbTPVULObXzzm8?=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jDe4R2hJer6n2OExNpc9uvbuaiQfATwEnwDF3idjx1oKqEzCRPCgzOwhTZFTFgf98g+jkWG2zYhu40aFSioBQatCoZO+TsDmqZTBTxZ69G/Bu5j8NqmomuajVkCkpxUEXU9EIo7u0e9VrzSjNy3sv3M4dnuwmrArUqjfxAbpcfos+dqPMomnbwg40p1KOCzMG7e0Ab/87J5PUTZ6bTI2tS SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0146; 20:4D+7zeDwE4yx5fN8b3aclndmND7IgLkhIifRBf+5k6oqa2ZEVIN/4ArG4Qje0sc1lxIC5j+xQIMQy+2fJtkoghtG38qPmAmmQm81Qhq9McNYlZN2n/bQ9yIcII7AzFBBoOSGZ/tWWqbNt7MmAeIscLPfybkmYVI6ztnnMDXis2na1H6/fo++oSfO7172YK6ACYnWqSvX3v1JFzzO84Z+htvfP15YO4esmJmi5KPp6PW2PuICO/Xr82ChuIr2C7Gs X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2018 15:38:45.9924 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 21b3d464-4ef5-433f-c4dd-08d5722eb4ff X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0146 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.34.76 Subject: [Qemu-devel] [PATCH v8 26/28] qmp: add query-sev-launch-measure command X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Peter Maydell <peter.maydell@linaro.org>, Brijesh Singh <brijesh.singh@amd.com>, kvm@vger.kernel.org, "Michael S. Tsirkin" <mst@redhat.com>, Stefan Hajnoczi <stefanha@gmail.com>, Alexander Graf <agraf@suse.de>, "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>, Markus Armbruster <armbru@redhat.com>, Bruce Rogers <brogers@suse.com>, Christian Borntraeger <borntraeger@de.ibm.com>, Marcel Apfelbaum <marcel@redhat.com>, Borislav Petkov <bp@suse.de>, Thomas Lendacky <Thomas.Lendacky@amd.com>, Eduardo Habkost <ehabkost@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Alistair Francis <alistair.francis@xilinx.com>, Cornelia Huck <cornelia.huck@de.ibm.com>, Peter Crosthwaite <crosthwaite.peter@gmail.com>, Paolo Bonzini <pbonzini@redhat.com> Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/qapi-schema.json b/qapi-schema.json index 9203e28b8aee..5e4836ef9c8b 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3236,3 +3236,32 @@ # ## { 'command': 'query-sev', 'returns': 'SevInfo' } + +## +# @SevLaunchMeasureInfo: +# +# SEV Guest Launch measurement information +# +# @data: the measurement value encoded in base64 +# +# Since: 2.12 +# +## +{ 'struct': 'SevLaunchMeasureInfo', 'data': {'data': 'str'} } + +## +# @query-sev-launch-measure: +# +# Query the SEV guest launch information. +# +# Returns: The @SevLaunchMeasureInfo for the guest +# +# Since: 2.12 +# +# Example: +# +# -> { "execute": "query-sev-launch-measure" } +# <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } } +# +## +{ 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo' } diff --git a/qmp.c b/qmp.c index 7907e539c8f2..0b994f1d9cd7 100644 --- a/qmp.c +++ b/qmp.c @@ -735,3 +735,20 @@ SevInfo *qmp_query_sev(Error **errp) return info; } + +SevLaunchMeasureInfo *qmp_query_sev_launch_measure(Error **errp) +{ + char *data; + SevLaunchMeasureInfo *info; + + data = sev_get_launch_measurement(); + if (!data) { + error_setg(errp, "Measurement is not available"); + return NULL; + } + + info = g_malloc0(sizeof(*info)); + info->data = data; + + return info; +}
The command can be used by libvirt to retrieve the measurement of SEV guest. This measurement is a signature of the memory contents that was encrypted through the LAUNCH_UPDATE_DATA. Cc: "Daniel P. Berrangé" <berrange@redhat.com> Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com> --- qapi-schema.json | 29 +++++++++++++++++++++++++++++ qmp.c | 17 +++++++++++++++++ 2 files changed, 46 insertions(+)