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.20184.1622290651402527830 for ; Sat, 29 May 2021 05:17:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QcB8vTxo; 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=1622290649; 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=7nPx/58gVFVHjNfF+FM9dXJidaEJAIIGIlzNoAJRuIM=; b=QcB8vTxoaaW6sJkFrrMTFOK9ZLJSmrcAR9jJlcKOO0hPKF3rfSr94g3vFD6mnDoxXhi1ac yHQVnAKXPnYOL9Sotcuq0XTyyH3SXYczqA/yHNZMs/UqL0SpUzeQY8ODn8RyWEcrLZA4AP yasmYHmaWi52TLSig07NXlwBFcIHo84= 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-529-Nj0ysxmsPrSh-OZxU3hAYA-1; Sat, 29 May 2021 08:17:25 -0400 X-MC-Unique: Nj0ysxmsPrSh-OZxU3hAYA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 265F4107ACC7; Sat, 29 May 2021 12:17:23 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-50.ams2.redhat.com [10.36.112.50]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CBFA7179B3; Sat, 29 May 2021 12:17:19 +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: <8ffef042-4028-6dc6-398c-b4f2ef3a1c91@redhat.com> Date: Sat, 29 May 2021 14:17:18 +0200 MIME-Version: 1.0 In-Reply-To: <20210519181949.6574-1-brijesh.singh@amd.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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 > > 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 > Merged as commit range dbc22a178546..adfa3327d4fc, via . Thanks Laszlo