Message ID | 147455602652.8519.16942814867897007687.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 949146077A for <patchwork-qemu-devel@patchwork.kernel.org>; Thu, 22 Sep 2016 15:08:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85FA62ABA8 for <patchwork-qemu-devel@patchwork.kernel.org>; Thu, 22 Sep 2016 15:08:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7A7D22ABAB; Thu, 22 Sep 2016 15:08:16 +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 629E82ABA8 for <patchwork-qemu-devel@patchwork.kernel.org>; Thu, 22 Sep 2016 15:08:14 +0000 (UTC) Received: from localhost ([::1]:49895 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 1bn5bh-0007sK-HM for patchwork-qemu-devel@patchwork.kernel.org; Thu, 22 Sep 2016 11:08:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <brijesh.singh@amd.com>) id 1bn5Nv-0001rd-D1 for qemu-devel@nongnu.org; Thu, 22 Sep 2016 10:54:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <brijesh.singh@amd.com>) id 1bn5Nq-0008Am-7g for qemu-devel@nongnu.org; Thu, 22 Sep 2016 10:53:58 -0400 Received: from mail-co1nam03on0051.outbound.protection.outlook.com ([104.47.40.51]:8349 helo=NAM03-CO1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <brijesh.singh@amd.com>) id 1bn5Np-0008AP-UN for qemu-devel@nongnu.org; Thu, 22 Sep 2016 10:53:54 -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=7Uxk93MZzfkBlYu/gB1fKa/RpH+vBaOuccbtWB/T6Qw=; b=b0iKIrITzIy8dBELVRhaCMoB/0HWhHhzZqRWVqcDJkY0UF2+4skDijaa8OV0wf8yvW3vVM9bhO676oPZCR3118TX5ObkY8f17MhdpYv1VJmL6ozkIzsTsHrzZg2YsOB0NShJuZkpMv8xk/9whFyhIUs2Yw/vdeJqVWJuBqBJVKo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from [127.0.1.1] (165.204.77.1) by SN1PR12MB0670.namprd12.prod.outlook.com (10.163.208.28) 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:49 +0000 From: Brijesh Singh <brijesh.singh@amd.com> To: <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: Thu, 22 Sep 2016 10:53:46 -0400 Message-ID: <147455602652.8519.16942814867897007687.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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BLUPR01CA061.prod.exchangelabs.com (10.160.23.51) To SN1PR12MB0670.namprd12.prod.outlook.com (10.163.208.28) X-MS-Office365-Filtering-Correlation-Id: 30b825fd-a5b6-4bb7-2bc6-08d3e2f843d8 X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0670; 2:jcgZIOY/7hI/ZN4rfJAvAUcUBkjTeyLpL8qY/afwFG7VWLeoNmh6OqTLSPVwFmF2Ud5sYl1hsyWd3cbJYWiQX2ysnTKDjzjpp6/wegGCgiuAowv45LTfwIPgf83nq+Si3MtOs1153A95udZz2LtEGpNWLrJ9KV7Tz9AFwiZQ3R7SdssRAeEl6cTygGX4lnEA; 3:NS7BBFrH6THAWfQLctsGrYMxsWGuK3qeOsW6kieR6O2luAIRCkkYkDOleXYZxsRbSO2CXEeaxxhRRZjj7J3UxSINtWpdoI1vncibIWRc9UqQpxwpfwJV13VuGLCUZ+qd; 25:WrHIPbuzgsJ9manNj0aqsHKUIdwF5mhrKwBgwEqwI5wNGJvgRIRsYiyh7mH3O0MaGb8Rd+ysabsCnvwHSOgbNCRfJaPmwpEf2FpDLZngmSnADLJCYFgG88SXYdmvIGJvSza8Jq568egwVqnoZco2CIeuzSK03Rm2jtPV+9/oVXXmdmTwC/3KP68yy1iaxiSO3FDnfUnvknTLw/HNvFG2GHtlia8vNtU4g4eVLwU10yKnfidbtp+s6oKVqHZ1ZzDmC0NRF1i/qKuxN2Z42txIPXeMh5yvGNh/VHNwaGU9Giiuv/Bx5s8zHB/DzEIAoup9nhfWV3SphHSzwXRVYZWyNLi/fGxsSAevbKI1DhJ2KmJszr+yk9XkWnxfIOMn54z9bAbaPKdjTvpf4bP8A6YnFKecl14Fze2vVvWetoNZnbA= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1PR12MB0670; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0670; 31:hGlAyhlseMvmY9NN7dYhqfpazhPeiSozDX0deudQGLuEZ3bahY8pAHhmWMcu5KP9HZeXelDO8piv9zpHhvwm3BxFLYwmgBHpeZgnhlumw+yoyeDwoNp63sWYzPVYEll8ywgHwwK6kJ7dkANpNBR6as6e3GZl+lYfhNAeub3EHeprQNFcfjFJ3hFIoTNmpxEAy/xyajwuXmSs5Q4OzlmzIbjUcszJrf0Q2mchZXiwBBU=; 20:2FlS89i0A6P5rH0uAPqhUc/sktc8aXWlgUH4/0LS1X1LPdJ4MVeNS6w0B97MC4d7eDqduaVgR9tE6Bg0UsrWavpPJWQfhgCAjU432f/a6RjAqosqwhnGBDE+GnSKRpfPGH1j9WWe/PxWwdXe0o5d3uCJ/mPKl2zSXBwOfhzKohCFjH0RrZ7+ynvgOIwKpUHIGnWkqDhxb9t3HqbuyLwkvGqbBB3xlu3lpt2doa+a1zmG7/3EU9kVNOcIBk/GxKtyFq558S0VwhcEgk5+HH+6Q8yNtG1am0JYhlfsW05EBDxaKGYUi2zH5cTX8O+ghhFP707LkxrjmxV4kvX/CSDjrwCgmzLt1ewBjpVQq/HOK9D6di/EOzdhAm8D15PygmUNPBdIQl/zvNYmhDXePKit8Zy80bHOf6Xf8Iyx3Q//umDZbBXiF7ASPBG8ngKOBX0NE7VOjoecBknwG6xiftxq5sDjBczH9Ewj1m3vFvSNfVM4NmRgu9JvsvajwrQNZbLf X-Microsoft-Antispam-PRVS: <SN1PR12MB067007E66DE77A3EDBABCA3DE5C90@SN1PR12MB0670.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)(3002001)(10201501046)(6055026); SRVR:SN1PR12MB0670; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB0670; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0670; 4:J3oXgbIj8y1hA9GR/1VEx8rZJUGd+lqrWbMgA1f7e/luBS9WVX//+L7tMmwI/r11tbWGgGIWrr4UeaMNBeKGKvZBEfiyQZPNmfPDLtHpMz2TCxpYClza0if91nPK8aNCDBfLDecSqi6918PTbvTlf0j2a2ED5kpi5EMNapFf0KLJxrr5vDY5d4g+GyHGiHV4vy4tlPDNowLE3bvP1SY9QLpZRB24BTMac8IguMD9aQQ3zHW7m8Wkjhwb3FecZXl03AJ1jRe3UL1sfDH5LbCe6h7xeDHSgM39Xk5jVfM1CXwvlDciYw5iOdb01S764p2B6bKEdKVUnuP4hhFpcWIgTEdb6xUCak+V+gCJdnYT5UwDCUiONp5KOaRpZ9t9S2V2jZo10qQe0udQqJ5pitCTbkrPN0fro2p4XpNpUyRjmR8ARXaQTSoU03oDEMr6U7xk X-Forefront-PRVS: 0073BFEF03 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6049001)(7916002)(199003)(189002)(76176999)(586003)(2906002)(54356999)(106356001)(105586002)(2950100001)(5660300001)(6116002)(3846002)(101416001)(33646002)(50986999)(19580405001)(97736004)(86362001)(81166006)(5001770100001)(23676002)(2201001)(305945005)(42186005)(77096005)(81156014)(19580395003)(7846002)(8676002)(33716001)(7736002)(47776003)(66066001)(92566002)(103116003)(4001350100001)(189998001)(107886002)(50466002)(230700001)(229853001)(68736007)(9686002)(83506001)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0670; 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?MTtTTjFQUjEyTUIwNjcwOzIzOnczc0JOeW05QUY1MWw3SEVFR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l5quDe0zZY9ics7M3ncKScUuWIQGe9a6irweAKPo/hIY1JUYzDYyPcl0Q2pVcRe38bhE X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2016 14:53:49.9282 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0670 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.40.51 Subject: [Qemu-devel] [RFC PATCH v2 11/16] 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> 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 dcd7c48..21c491c 100644 --- a/sev.c +++ b/sev.c @@ -955,7 +955,21 @@ sev_launch_start(SEVState *s) static int sev_launch_finish(SEVState *s) { - // add the command to finalize the launch in next patches + int ret; + struct kvm_sev_launch_finish *finish = s->launch_finish; + + assert(s->state == SEV_STATE_LAUNCHING); + + ret = sev_ioctl(KVM_SEV_LAUNCH_FINISH, finish); + if (ret) { + return -1; + } + + DPRINTF("SEV: LAUNCH_FINISH "); + DPRINTF_U8_PTR(" measurement", finish->measurement, + sizeof(finish->measurement)); + + s->state = SEV_STATE_RUNNING; return 0; } @@ -1058,7 +1072,6 @@ sev_guest_launch_finish(void *handle) if (s->state == SEV_STATE_LAUNCHING) { return sev_launch_finish(s); - // use launch_finish commands } else if (s->state == SEV_STATE_RECEIVING) { // use receive_finish commands } else {
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. User can retrieve the measurement via 'measurement' property defined in 'sev-launch-info' object. Signed-off-by: Brijesh Singh <brijesh.singh@amd.com> --- sev.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-)