From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web11.7252.1602747841739117446 for ; Thu, 15 Oct 2020 00:44:01 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ssjsejo2; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602747840; 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=HwNzT1We0es93+3TrU+7kUooW+C66llFhK/0XBan+64=; b=Ssjsejo2ccKNn8T1Uw5hAVh+qZg5suep/g6GlinRZFDHJj4Swupl1A4L07qp8g/64CUel3 /OdWx3BI7cQVulcVIJZjtnd4qT2zHHHwSlVQ/mynS+6igCjo5h/szebDNRbf9+vL1W1XLJ 3qK5HmqfSvrUIYoB2vj1ePNYMn5ZXPo= 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-351-TDfMB89bPiSwiN4WlOi4Vg-1; Thu, 15 Oct 2020 03:43:58 -0400 X-MC-Unique: TDfMB89bPiSwiN4WlOi4Vg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 41EBA1015CA9; Thu, 15 Oct 2020 07:43:56 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-119.ams2.redhat.com [10.36.113.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8D2C460C07; Thu, 15 Oct 2020 07:43:51 +0000 (UTC) Subject: Re: [PATCH 0/9] SEV-ES guest support fixes and cleanup To: Tom Lendacky , devel@edk2.groups.io Cc: Brijesh Singh , Ard Biesheuvel , Eric Dong , Liming Gao , Jordan Justen , Michael D Kinney , Rahul Kumar , Zhiguang Liu , Ray Ni References: From: "Laszlo Ersek" Message-ID: Date: Thu, 15 Oct 2020 09:43:50 +0200 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Tom, On 10/10/20 18:06, Tom Lendacky wrote: > From: Tom Lendacky > > This patch series provides some fixes, updates and cleanup to the SEV-ES > guest support: > > The first patch updates the calculation of the qword offset of fields > within the GHCB. Specifically, it removes the hardcoding of the offsets > and uses the OFFSET_OF () and sizeof () functions to calculate the > values, removes unused values and add values that will be used in later > patches. > > The next five patches set the SwExitCode/SwExitInfo1/SwExitInfo2/SwScratch > valid bits in the GHCB ValidBitmap area when these fields are set at > VMGEXIT. > > The next two patches update the Qemu flash drive services support to > add SEV-ES support to erasing blocks and to disable interrupts when using > the GHCB. > > Finally, the last patch uses the processor number for setting the AP stack > pointer instead of the APIC ID (using GetProcessorNumber()). please file a TianoCore BZ for this series, assign it to yourself, link the v1 posting in a comment on the BZ, and update the commit messages to reference that BZ. I find this relevant because edk2-stable202008 resolved TianoCore#2198. If (in your opinion) downstreams that aim at supporting SEV-ES should also have these patches (for example, if they should backport them on top of edk2-stable202008), then having a TianoCore Bugzilla would be quite helpful to them, for tracking purposes. Thanks, Laszlo > > --- > > These patches are based on commit: > ae511331e0fb ("BaseTools Build_Rule: Add the missing ASM16_FLAGS for ASM16 source file") > > Cc: Ard Biesheuvel > Cc: Eric Dong > Cc: Laszlo Ersek > Cc: Liming Gao > Cc: Jordan Justen > Cc: Michael D Kinney > Cc: Rahul Kumar > Cc: Zhiguang Liu > Cc: Ray Ni > Cc: Tom Lendacky > Cc: Brijesh Singh > > Tom Lendacky (9): > OvmfPkg/VmgExitLib: Update ValidBitmap settings > OvmfPkg/VmgExitLib: Set the SW exit fields when performing VMGEXIT > OvmfPkg/VmgExitLib: Set the SwScratch valid bit for IOIO events > OvmfPkg/VmgExitLib: Set the SwScratch valid bit for MMIO events > UefiCpuPkg/MpInitLib: Set the SW exit fields when performing VMGEXIT > OvmfPkg/QemuFlashFvbServicesRuntimeDxe: Set the SwScratch valid bit > OvmfPkg/QemuFlashFvbServicesRuntimeDxe: Fix erase blocks for SEV-ES > OvmfPkg/QemuFlashFvbServicesRuntimeDxe: Disable interrupts when using > GHCB > UefiCpuPkg/MpInitLib: For SEV-ES guest set stack based on processor > number > > MdePkg/Include/Register/Amd/Ghcb.h | 48 ++++++++------------ > OvmfPkg/Library/VmgExitLib/VmgExitLib.c | 30 ++++++++++++ > OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c | 10 +++- > OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c | 4 +- > OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c | 21 +++++++++ > UefiCpuPkg/Library/MpInitLib/MpLib.c | 7 ++- > UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 6 +++ > 7 files changed, 91 insertions(+), 35 deletions(-) >