From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.61]) by mx.groups.io with SMTP id smtpd.web12.27885.1595448814841476613 for ; Wed, 22 Jul 2020 13:13:35 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=K+N5rTFj; spf=pass (domain: redhat.com, ip: 205.139.110.61, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595448814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=V3fEAE8sMQ9Gvm1ReucYQ0qW8veIixqfq2O3f+CCR6A=; b=K+N5rTFjaFgBsfjmOopkJvnBrD+pvu1jhN8Qfrpfgy0loSkfG06X9x6AW9AA0MT3jmKCBt Auop+yIzZ/QqHG/d72Vv5kOkwKDKgiXqsJTJsvqabQNRuzYxdy4ojO6IHyZKc+uvhs4otN K+I3X6INmBtD7J/4P7ZZXIByFzukCWk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-272-IQdH0Gp4PFG88baxyhwHfA-1; Wed, 22 Jul 2020 16:13:13 -0400 X-MC-Unique: IQdH0Gp4PFG88baxyhwHfA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B11838015F7; Wed, 22 Jul 2020 20:13:10 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-129.ams2.redhat.com [10.36.113.129]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9645D19D61; Wed, 22 Jul 2020 20:13:05 +0000 (UTC) Subject: Re: [PATCH v11 00/46] SEV-ES guest support To: Tom Lendacky , devel@edk2.groups.io Cc: Brijesh Singh , Ard Biesheuvel , Eric Dong , Jordan Justen , Liming Gao , Michael D Kinney , Ray Ni , Andrew Fish , Anthony Perard , Benjamin You , Dandan Bi , Guo Dong , Hao A Wu , Jian J Wang , Julien Grall , Leif Lindholm , Maurice Ma References: From: "Laszlo Ersek" Message-ID: <9f6d4185-83d2-2745-2106-6399f85e60e4@redhat.com> Date: Wed, 22 Jul 2020 22:13:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 07/21/20 23:18, Tom Lendacky wrote: > From: Tom Lendacky > > This patch series provides support for running EDK2/OVMF under SEV-ES. > > Secure Encrypted Virtualization - Encrypted State (SEV-ES) expands on the > SEV support to protect the guest register state from the hypervisor. See > "AMD64 Architecture Programmer's Manual Volume 2: System Programming", > section "15.35 Encrypted State (SEV-ES)" [1]. > > In order to allow a hypervisor to perform functions on behalf of a guest, > there is architectural support for notifying a guest's operating system > when certain types of VMEXITs are about to occur. This allows the guest to > selectively share information with the hypervisor to satisfy the requested > function. The notification is performed using a new exception, the VMM > Communication exception (#VC). The information is shared through the > Guest-Hypervisor Communication Block (GHCB) using the VMGEXIT instruction. > The GHCB format and the protocol for using it is documented in "SEV-ES > Guest-Hypervisor Communication Block Standardization" [2]. > > The main areas of the EDK2 code that are updated to support SEV-ES are > around the exception handling support and the AP boot support. > > Exception support is required starting in Sec, continuing through Pei > and into Dxe in order to handle #VC exceptions that are generated. Each > AP requires it's own GHCB page as well as a page to hold values specific > to that AP. > > AP booting poses some interesting challenges. The INIT-SIPI-SIPI sequence > is typically used to boot the APs. However, the hypervisor is not allowed > to update the guest registers. The GHCB document [2] talks about how SMP > booting under SEV-ES is performed. > > Since the GHCB page must be a shared (unencrypted) page, the processor > must be running in long mode in order for the guest and hypervisor to > communicate with each other. As a result, SEV-ES is only supported under > the X64 architecture. > > [1] https://www.amd.com/system/files/TechDocs/24593.pdf > [2] https://developer.amd.com/wp-content/resources/56421.pdf > > --- > > These patches are based on commit: > 9132a31b9c83 ("MdeModulePkg/DxeCorePerformanceLib: Switch to UnicodeStrnToAsciiStrS") > > A version of the tree can be found at: > https://github.com/AMDESE/ovmf/tree/sev-es-v19 > > Cc: Andrew Fish > Cc: Anthony Perard > Cc: Ard Biesheuvel > Cc: Benjamin You > Cc: Dandan Bi > Cc: Eric Dong > Cc: Guo Dong > Cc: Hao A Wu > Cc: Jian J Wang > Cc: Jordan Justen > Cc: Julien Grall > Cc: Laszlo Ersek > Cc: Leif Lindholm > Cc: Liming Gao > Cc: Maurice Ma > Cc: Michael D Kinney > Cc: Ray Ni > > Changes since v10: > - Fix conflicts around GccInline.c file after moving to latest commit > - Fix conflicts with OVMF PCD values after moving to latest commit The updates in patch 29 (OvmfPkg: Create a GHCB page for use during Sec phase) look OK; thanks. My understanding is that the MdePkg and MdeModulePkg patches remain needing approval; is that correct? Thanks! Laszlo