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.5767.1621501569050676684 for ; Thu, 20 May 2021 02:06:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ACpEJav0; 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=1621501568; 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=F1F5UT1Uva/rNZYJUi30sPVhOmlOhEZVvZt/S9dILn8=; b=ACpEJav0HlYGQ3/EWYeZw1KNj5RgQWs4L5bRg26CLDh80BNK9K3K5QhsNVvsrDuKsD1YwF QzzdGevGD3FEKKkSNhqBd+6Sn3cIXfBu7gOixNNMjtsNnQmG8wwZL/4S41UK9q8pXx46rx FJKpbXIPu4bttDR1vmqtsSBsH32FfVQ= 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-485-M6Cay_Y0MRWFG5rmVb42OA-1; Thu, 20 May 2021 05:06:04 -0400 X-MC-Unique: M6Cay_Y0MRWFG5rmVb42OA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9C896107ACCA; Thu, 20 May 2021 09:06:02 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-217.ams2.redhat.com [10.36.112.217]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0B53E10016FF; Thu, 20 May 2021 09:05:59 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v3 00/13] Add GHCBv2 macro and helpers To: devel@edk2.groups.io, brijesh.singh@amd.com Cc: James Bottomley , Min Xu , Jiewen Yao , Tom Lendacky , Jordan Justen , Ard Biesheuvel , Erdem Aktas , Michael D Kinney , Liming Gao , Zhiguang Liu References: <20210519181949.6574-1-brijesh.singh@amd.com> From: "Laszlo Ersek" Message-ID: Date: Thu, 20 May 2021 11:05:58 +0200 MIME-Version: 1.0 In-Reply-To: <20210519181949.6574-1-brijesh.singh@amd.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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 On 05/19/21 20:19, Brijesh Singh wrote: > This series is taken from the SNP RFC. This series defines the GHCBv2 > macros and NAE events. Additionally, it also introduces a helper to > clear the page encryption mask from the Mmio region. > > The series is based on the commit: > 15ee7b76891a CryptoPkg/BaseCryptLib: Fix possible uninitialized use > > Cc: James Bottomley > Cc: Min Xu > Cc: Jiewen Yao > Cc: Tom Lendacky > Cc: Jordan Justen > Cc: Ard Biesheuvel > Cc: Laszlo Ersek > Cc: Erdem Aktas > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Zhiguang Liu > > Change since v2: > - fix commit message for typos and add R-b With the BZ reference typo in patch 6 fixed, this (v3) series is ready to go -- I'll correct the typo and merge the series once Liming tags the release. Please remind me in case I forget. Thanks Laszlo > > Change since v1: > - address the review comments > - drop the Mmio specific changes from 'remove Flush .." patch > > Brijesh Singh (11): > MdePkg/Register/Amd: expand the SEV MSR to include the SNP definition > MdePkg/Register/Amd: realign macros with more space for future > expansion > MdePkg/Register/Amd: define GHCB macros for hypervisor feature > detection > MdePkg/Register/Amd: define GHCB macro for Register GPA structure > MdePkg/Register/Amd: define GHCB macro for the Page State Change > MdePkg/BaseLib: add support for PVALIDATE instruction > OvmfPkg/BaseMemEncryptSevLib: introduce > MemEncryptSevClearMmioPageEncMask() > OvmfPkg/AmdSevDxe: use MemEncryptSevClearMmioPageEncMask() to clear > EncMask > OvmfPkg/QemuFlashFvbServicesRuntimeDxe: use Mmio helper to clear enc > mask > OvmfPkg/TpmMmioSevDecryptPei: use MemEncryptSevClearMmioPageEncMask() > OvmfPkg/BaseMemEncryptSevLib: remove Flush parameter > > Tom Lendacky (2): > MdePkg/Register/Amd: define GHCB macros for SNP AP creation > MdePkg/BaseLib: add support for RMPADJUST instruction > > MdePkg/Library/BaseLib/BaseLib.inf | 2 + > MdePkg/Include/Library/BaseLib.h | 85 +++++++++++ > MdePkg/Include/Register/Amd/Fam17Msr.h | 46 +++++- > MdePkg/Include/Register/Amd/Ghcb.h | 137 +++++++++++++++++- > OvmfPkg/Include/Library/MemEncryptSevLib.h | 35 ++++- > .../BaseMemEncryptSevLib/X64/VirtualMemory.h | 33 ++++- > OvmfPkg/AmdSevDxe/AmdSevDxe.c | 13 +- > OvmfPkg/IoMmuDxe/AmdSevIoMmu.c | 6 +- > .../Ia32/MemEncryptSevLib.c | 41 +++++- > .../X64/MemEncryptSevLib.c | 49 +++++-- > .../X64/PeiDxeVirtualMemory.c | 47 ++++-- > .../X64/SecVirtualMemory.c | 38 ++++- > .../SmmCpuFeaturesLib/SmmCpuFeaturesLib.c | 3 +- > OvmfPkg/PlatformPei/AmdSev.c | 3 +- > .../FwBlockServiceDxe.c | 5 +- > .../QemuFlashSmm.c | 5 +- > .../TpmMmioSevDecryptPeim.c | 5 +- > MdePkg/Include/X64/Nasm.inc | 16 ++ > MdePkg/Library/BaseLib/X64/Pvalidate.nasm | 42 ++++++ > MdePkg/Library/BaseLib/X64/RmpAdjust.nasm | 40 +++++ > 20 files changed, 562 insertions(+), 89 deletions(-) > create mode 100644 MdePkg/Library/BaseLib/X64/Pvalidate.nasm > create mode 100644 MdePkg/Library/BaseLib/X64/RmpAdjust.nasm >