Message ID | 147801563839.18237.14009371805896523682.stgit@brijesh-build-machine (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 70A8D60585 for <patchwork-qemu-devel@patchwork.kernel.org>; Tue, 1 Nov 2016 16:02:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 63AEC29A5C for <patchwork-qemu-devel@patchwork.kernel.org>; Tue, 1 Nov 2016 16:02:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 57E1429A61; Tue, 1 Nov 2016 16:02:33 +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 A221F29A5C for <patchwork-qemu-devel@patchwork.kernel.org>; Tue, 1 Nov 2016 16:02:32 +0000 (UTC) Received: from localhost ([::1]:48889 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 1c1bWB-0003yS-R6 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 01 Nov 2016 12:02:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57501) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <brijesh.singh@amd.com>) id 1c1bO3-0005yy-Ry for qemu-devel@nongnu.org; Tue, 01 Nov 2016 11:54:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <brijesh.singh@amd.com>) id 1c1bNz-0003x1-Pd for qemu-devel@nongnu.org; Tue, 01 Nov 2016 11:54:07 -0400 Received: from mail-sn1nam02on0047.outbound.protection.outlook.com ([104.47.36.47]:9225 helo=NAM02-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 <brijesh.singh@amd.com>) id 1c1bNz-0003wt-I6 for qemu-devel@nongnu.org; Tue, 01 Nov 2016 11:54:03 -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=iH/3phJtC3eLv9Qqb7FzfkPHt71rBy1RaRiRaIo/Upw=; b=xulQqEsgmmce7gZfRXfMueSL10Zy9Hoc1VL9BLTQFErxLCkWds9/7ecNvOS8gi1uTVC8G7oeiqp8+BjStG5NH67/0VFhHvhJWJh+ag7Gh0NKIWtCIsCTAwyqbBVebvuNeMuV1fNyPzFXBEBRLF33QREa2M0DbycW5auFXZQoQ0A= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from [127.0.1.1] (165.204.77.1) by CY1PR12MB0665.namprd12.prod.outlook.com (10.163.238.150) 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:54:00 +0000 From: Brijesh Singh <brijesh.singh@amd.com> To: <Thomas.Lendacky@amd.com>, <ehabkost@redhat.com>, <crosthwaite.peter@gmail.com>, <armbru@redhat.com>, <mst@redhat.com>, <p.fedin@samsung.com>, <qemu-devel@nongnu.org>, <lcapitulino@redhat.com>, <pbonzini@redhat.com>, <rth@twiddle.net> Date: Tue, 1 Nov 2016 11:53:58 -0400 Message-ID: <147801563839.18237.14009371805896523682.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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: SN1PR0501CA0007.namprd05.prod.outlook.com (10.163.126.145) To CY1PR12MB0665.namprd12.prod.outlook.com (10.163.238.150) X-MS-Office365-Filtering-Correlation-Id: 32667a8d-1131-48fa-3211-08d4026f4c53 X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0665; 2:8wtRZUpV4FYZZVpblel/hNOx/dubr3K96Yog89QIo+bB7Tn5sgFA9MlRj7cJxLX0jKP6GNylbOSlZITlyKy4BdxUA6gQGKKbTZvlZugDSQeGL2+6YhyXt/3bFQ+Or828hBPLi+kNfzEpUc90b/5vb19Nlb/7lrtmsEKaeP17W4/6eSD/XlIi1iFDW+rbg+aq0XwEtUDP34y9GE9LzBASRA==; 3:QU172tPOd2gstwmPvWr5iwT+DiFE6HtgdesGtR6/pY80DWsSoiNallXs9UADiMJvCvsnqz9mtjLdg0OsEGWp3l4nfhZcn7HuEGIq0ZszJRzV7hFz7LJzZLKsp2fQr0Fpf9H+KQrLXPOrQSDRIrm25g== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR12MB0665; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0665; 25:0YRVWvS4QN8PGAsCYPmxLCu01zviq6VdlNd3TH1F8tcGNMTo0dXn8wbuC9C2Rbtkt0EcvFWibv52EmJtFsw0RVaGTHRxxQpIlyF/cOaUs84OtVILYVBQ00ouzSxZRGtLecKRUfWa77EM11iiteXbsf8Y+zo27RgLPdE5O04Ds/QkofjSmQp4GJxHvBJHqOyW95xHORaM4YhreXufZkCB9rP2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UTpkxlo/gNNg+248fV3ekT1qHhU5xxNvjZuk09tA1zMV+JYmUesvCxlT3JqjASFBMDuyqpOI4Ooh8PJyOSDqjjmEFzVUPNOu9Zl51l+RhJWb/zpr9TpMpatlj/FsMhOIfgV+2010406nPdV3/+h5kvU07Xa9dJz8j6hjV9fzbRX35Dz5QTTINIhZejXSZhYQ6AEOTLRKIcu9EHmesZ6MiPdhsEDqXG15xLyNTlqz4tnE5RkUTKpKU9bDzC0cVx X-Microsoft-Antispam-PRVS: <CY1PR12MB06654AC6393D03CF418EFC8CE5A10@CY1PR12MB0665.namprd12.prod.outlook.com> 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:CY1PR12MB0665; BCL:0; PCL:0; RULEID:; SRVR:CY1PR12MB0665; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0665; 4:HOlBOnus8ThtQV0/I5Sh0vcq9OMAqX4nN+C60Yck/2B3QdWsiETf296tBjKbAp8QPPyZaIEFIo0SBkAM5BkbkBd7NaptBAfmh/tY7z3+tBrXS0b431AcxbiHjO5SZVDBOAwOCvV7J3ePbtuQ5RyRfYGoxkYUacJg+zncykslR9X0dCoCji6v02LmVvzw1j14kWv3a3Om1/F4t9AxvTnGYJ08kOblmPyRFpm+zQn8AmrCGy+Crj2D5E29tekVbfeL5nFrZgavlJmNXxsZxu80E0PkGA51XDRS2F6B8DFvzOwTXJf2P8wvy0s+f2B11DpQvpHiViOCCnPojsjialGi2bA3Eqd9R7l1Tysdi1BDBNuW8oWlW2zNZ7n4YpDXa+fLitOcmtB3PUlJ9Moq3SWKZNjg6d091DFzld5clySa4rKBnlOIi5loTesazVIF13sdtTBZcbxmk16Z1xkdhYS3aQ== X-Forefront-PRVS: 01136D2D90 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6049001)(7916002)(189002)(199003)(103116003)(81156014)(33646002)(50986999)(47776003)(76176999)(106356001)(6116002)(42186005)(189998001)(230700001)(81166006)(4326007)(3846002)(586003)(23676002)(9686002)(105586002)(54356999)(229853001)(66066001)(68736007)(101416001)(33716001)(305945005)(19580405001)(7736002)(77096005)(83506001)(2950100002)(50466002)(7846002)(5660300001)(7416002)(97736004)(92566002)(2906002)(86362001)(19580395003)(8676002)(5001770100001)(4001350100001)(2201001)(921003)(217873001)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0665; H:[127.0.1.1]; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTFQUjEyTUIwNjY1OzIzOndiall5S1ZjNVQ1UUZsMGJsQmRjbW9ELzUw?= =?utf-8?B?M01WalYxQTdtMnB2dTZjS1Z3SGdDWWtPa2JySGxZd1dkWENHZTNOZDJiVGFk?= =?utf-8?B?Q2tyM3hDRjJ3djUyRm9HMnhpcFhpa3JGTjZsV1lWNlY1QUltWE8wUW5qWjZt?= =?utf-8?B?VHRmOUZNTVE5aEJBM3FrRzdLWXRCOXMreGZLQ09kR2hLYnFRNHViRHFZRnRi?= =?utf-8?B?RWtkRUJqdm1TOXhmS2ZoU0NRejJqaFBGNDJuTjErL3N4bFpWbkNOZEsvcVJ0?= =?utf-8?B?Wk5TMXpqcjZwRkVuSEQxeHU2Q3ZaQnlTeEI4Z2VNL1dTSitMTUZrTlVYNGdS?= =?utf-8?B?czNuUE12RVpreWdjMTRrQXY2U1FWL3RackdvZjJaSkRUMXd5RGNZYzNiQk53?= =?utf-8?B?eFdHMHl2bXlpQUtkK1JIMEN5RGtvYWRDbm1aeW5CYnljVXNPL0MxbHRUZXhL?= =?utf-8?B?Unk0MnlSMlBycUc3WS90WFlLUXh1OW55S01zaWRweWtsTThUYUdhOGU1NGhL?= =?utf-8?B?UT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Co= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0665; 7:BNOpItvsEB/4t7/s7PaW/fMB4rNXKyqVX59eV3YwA3EwAD+7cXEuR1EO+d73z7xWOmzl//6aSb5NDh0VI/by+sNv4R751c1V8hd010vEhUvqdbFR5zBiTfK1iR0044s7+dhf2gfTKtRHzjxK3ZWGinqu+FxgGh0yta33oRq7SRvrA2hidusvcvj+DaRb1wSQJsqqozQIrjMr7pYwZhQPQJ38JK+QOlOx0nETVckB1FH6giee5hcyV/Z+kplkGklu+GmgOGHiZBAv0Giil8hg/sK0AWvzRQ2SBbUlxSyQl3nt1XpOX+q5O6bi22uId0sAr/ip5BnsSZieDhM+7LsK8PBo++9ov+/+lZ0V6JOAFtk=; 20:tzZFxW+c9pfLFGbH65XAVyyCDYJ7bvZJu3safPVI6mDbsyhYZ2gzpBHW/mtFFk0LwblpspbzvOQLjjr2D4/wEdT7VQivUj8QgTFy27TXXk6yAyFI+g8GHpYoS7d03J9orkxZFuLjqQfhO8UyXJMS1UWqUvIsQ6eOqalcmLHcMppmdb41PtteJdsNBlhUo6dQDvPAfEwfsFwFM4rKJALqIg3IhRq7z4WcoY0neLBZhBV2w8M84KCuiwgYqyi2FiRp X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2016 15:54:00.5974 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0665 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.36.47 Subject: [Qemu-devel] [RFC PATCH v3 12/18] sev: add LAUNCH_FINISH 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: brijesh.ksingh@gmail.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/sev.c b/sev.c index fafef6f..ff9266a 100644 --- a/sev.c +++ b/sev.c @@ -278,7 +278,30 @@ sev_launch_start(SEVState *s) static int sev_launch_finish(SEVState *s) { - return 0; + int ret; + struct kvm_sev_launch_finish *data; + + assert(s->state == SEV_STATE_LAUNCHING); + + data = g_malloc0(sizeof(*data)); + if (!data) { + return 1; + } + + ret = sev_ioctl(KVM_SEV_LAUNCH_FINISH, data); + if (ret) { + goto err; + } + + DPRINTF("SEV: LAUNCH_FINISH "); + DPRINTF_U8_PTR(" measurement", data->measurement, + sizeof(data->measurement)); + + s->state = SEV_STATE_RUNNING; +err: + g_free(data); + + return ret; } static int
The command is used to finalize the SEV guest launch process. The command returns a measurement value of the data encrypted through the LAUNCH_UPDATE command. This measurement can be handed to the guest owner to verify that the guest was launched into SEV-enabled mode. Signed-off-by: Brijesh Singh <brijesh.singh@amd.com> --- sev.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-)