Re: [edk2-devel] [PATCH V2 04/10] OvmfPkg/IntelTdx: Implement other helper functions in SecTdxHelperLib

2023-01-19 Thread Min Xu
On January 19, 2023 5:54 PM, Gerd Hoffmann wrote: > > > +#pragma pack(1) > > + > > +#define HANDOFF_TABLE_DESC "TdxTable" > > +typedef struct { > > + UINT8 TableDescriptionSize; > > + UINT8 TableDescription[sizeof (HANDOFF_TABLE_DESC)]; > > + UINT64

Re: [edk2-devel] [PATCH v3 1/1] ShellPkg: Export default shell delay as PCD

2023-01-19 Thread Rebecca Cran
Could someone review this please? -- Rebecca Cran On 1/10/23 05:09, Tomas Pilar (tpilar) wrote: Hi, Any chance you could review this change? It's fairly simple. Cheers, Tom On 03/01/2023 17:02, Tomas Pilar (tpilar) wrote: From: Tomas Pilar Create PcdShellDefaultDelay to configure the d

Re: [edk2-devel] [PATCH V2 04/10] OvmfPkg/IntelTdx: Implement other helper functions in SecTdxHelperLib

2023-01-19 Thread Min Xu
On January 19, 2023 5:54 PM, Gerd Hoffmann wrote: > > @@ -807,7 +880,47 @@ TdxHelperMeasureTdHob ( > >VOID > >) > > { > > - return EFI_UNSUPPORTED; > > + EFI_PEI_HOB_POINTERS Hob; > > + EFI_STATUSStatus; > > + UINT8 Digest[SHA384_DIGEST_SIZE]; > > + OVMF_W

[edk2-devel] [edk2-staging/Intel/HttpProxy] Introduction of new branch

2023-01-19 Thread Saloni Kasbekar
Hello EDK2 Community, The "Intel/HttpProxy" branch was created in edk2-staging repository. Role of this branch is to intercept HTTP Proxy feature for Intel product intercept. The branch is based on edk2-staging/HttpProxy branch that follows the code first process for HTTP Proxy feature developme

[edk2-devel] [PATCH] MdeModulePkg: allow PlatformBootManagerLib to use BootNext

2023-01-19 Thread Jeshua Smith via groups.io
Currently BdsEntry caches BootNext before calling PlatformBootManagerLib APIs, with the result that: - If BootNext is already set, a BootNext value written by the APIs will be ignored and deleted, and the current boot will use the cached BootNext value. - If BootNext is not present, a BootNext valu

Re: [edk2-devel] [RFC PATCH] OvmfPkg/PlatformCI VS2019: Enable temporary workaround for cpuhp bugfix

2023-01-19 Thread Yao, Jiewen
Acked-by: Jiewen Yao > -Original Message- > From: devel@edk2.groups.io On Behalf Of Michael > Kubacki > Sent: Friday, January 20, 2023 12:51 AM > To: devel@edk2.groups.io; a...@kernel.org > Cc: Laszlo Ersek ; Gerd Hoffmann > ; Yao, Jiewen ; Michael Brown > ; Oliver Steffen ; Kubacki, Mic

Re: [edk2-devel] [RFC PATCH] OvmfPkg/PlatformCI VS2019: Enable temporary workaround for cpuhp bugfix

2023-01-19 Thread Michael Kubacki
Reviewed-by: Michael Kubacki On 1/19/2023 8:43 AM, Ard Biesheuvel wrote: QEMU for x86 has a nasty CPU hotplug bug of which the ramifications are difficult to oversee, even though KVM acceleration seems to be unaffected. This has been addressed in QEMU mainline, and will percolate through the

[edk2-devel] [PATCH edk2-platforms v1 1/1] Platform/Hisilicon: Fix missing dependency on VariableFlashInfoLib

2023-01-19 Thread Sami Mujawar
From: Guillaume Gardet The Hisilicon/HiKey and Hisilicon/HiKey960 platform firmware builds break due to a missing dependency on VariableFlashInfoLib. Therefore, include VariableFlashInfoLib in the [LibraryClasses.common] section to satisfy the dependency. Cc: Leif Lindholm Cc: Ard Biesheuvel

Re: [edk2-devel][edk2-platforms][PATCH V2 1/1] AdvancedFeaturePkg: Improve sample build instructions

2023-01-19 Thread Rebecca Cran
Reviewed-by: Rebecca Cran On 1/18/23 18:20, Isaac Oram wrote: V1: Make the Windows build example current working directory based instead of arbitrary. V2: Fix case mismatch in edk2 repo local name. Cc: Sai Chaganty Cc: Nate DeSimone Cc: Liming Gao Cc: Rebecca Cran Signed-off-by: Isaac Oram

Re: [edk2-devel] [RFC PATCH] OvmfPkg/PlatformCI VS2019: Enable temporary workaround for cpuhp bugfix

2023-01-19 Thread Gerd Hoffmann
On Thu, Jan 19, 2023 at 02:43:02PM +0100, Ard Biesheuvel wrote: > QEMU for x86 has a nasty CPU hotplug bug of which the ramifications are > difficult to oversee, even though KVM acceleration seems to be > unaffected. This has been addressed in QEMU mainline, and will percolate > through the ecosyst

[edk2-devel] [RFC PATCH] OvmfPkg/PlatformCI VS2019: Enable temporary workaround for cpuhp bugfix

2023-01-19 Thread Ard Biesheuvel
QEMU for x86 has a nasty CPU hotplug bug of which the ramifications are difficult to oversee, even though KVM acceleration seems to be unaffected. This has been addressed in QEMU mainline, and will percolate through the ecosystem at its usual pace. In the mean time, due to the potential impact on p

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-19 Thread Ard Biesheuvel
On Thu, 19 Jan 2023 at 13:55, Oliver Steffen wrote: > > Quoting Gerd Hoffmann (2023-01-19 13:00:21) > > Hi, > > > > > > I tried the most recent Qemu master (v7.2.50) and also v7.0.0, > > > > on the 5.14 (RHEL) kernel and on 6.1.6-200.fc37.aarch64 (from Fedora). > > > > No luck. > > > > > > > > >

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-19 Thread Oliver Steffen
Quoting Gerd Hoffmann (2023-01-19 13:00:21) > Hi, > > > > I tried the most recent Qemu master (v7.2.50) and also v7.0.0, > > > on the 5.14 (RHEL) kernel and on 6.1.6-200.fc37.aarch64 (from Fedora). > > > No luck. > > > > > > > Does that include a backport of commit > > 406504c7b0405d74d74c15a667

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-19 Thread Ard Biesheuvel
On Thu, 19 Jan 2023 at 12:56, Marc Zyngier wrote: > > On Thu, 19 Jan 2023 11:11:34 +, > Ard Biesheuvel wrote: > > > > (cc Marc) > > > > Context: > > - on my TX2 (with the S1PTW r/o memslot fix applied), the new version > > of ArmVirtQemu that uses an initial ID map in emulated NOR flash work

Re: [edk2-devel] [PATCH v3 0/2] OvmfPkg/PlatformInitLib: catch QEMU's CPU hotplug reg block regression

2023-01-19 Thread Gerd Hoffmann
On Thu, Jan 19, 2023 at 12:01:29PM +0100, Laszlo Ersek wrote: > Repo: https://pagure.io/lersek/edk2.git > Branch: cpuhp-reg-catch-4250-v3 > Test build: https://github.com/tianocore/edk2/pull/3930 > Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=4250 Having the quirks containe

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-19 Thread Gerd Hoffmann
Hi, > > I tried the most recent Qemu master (v7.2.50) and also v7.0.0, > > on the 5.14 (RHEL) kernel and on 6.1.6-200.fc37.aarch64 (from Fedora). > > No luck. > > > > Does that include a backport of commit > 406504c7b0405d74d74c15a667cd4c4620c3e7a9? Probably not given that fedora kernels are

Re: [edk2-devel] [PATCH v3 2/2] OvmfPkg/PlatformInitLib: catch QEMU's CPU hotplug reg block regression

2023-01-19 Thread Ard Biesheuvel
On Thu, 19 Jan 2023 at 12:01, Laszlo Ersek wrote: > > In QEMU v5.1.0, the CPU hotplug register block misbehaves: the negotiation > protocol is (effectively) broken such that it suggests that switching from > the legacy interface to the modern interface works, but in reality the > switch never happ

Re: [edk2-devel] [PATCH v3 0/2] OvmfPkg/PlatformInitLib: catch QEMU's CPU hotplug reg block regression

2023-01-19 Thread Michael Brown
On 19/01/2023 11:01, Laszlo Ersek wrote: PlatformCpuCountBugCheck: Present=0 Possible=1 PlatformCpuCountBugCheck: Broken CPU hotplug register block found. Update QEMU to version 8+, or PlatformCpuCountBugCheck: to a stable release with commit dab30fbef389 backported. Refer to PlatformCpuCountBu

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-19 Thread Oliver Steffen
Quoting Ard Biesheuvel (2023-01-19 12:11:34) > (cc Marc) > > Context: > - on my TX2 (with the S1PTW r/o memslot fix applied), the new version > of ArmVirtQemu that uses an initial ID map in emulated NOR flash works > fine. > - in Oliver's case (which is a slightly different flavor of TX2), it > cr

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-19 Thread Ard Biesheuvel
(cc Marc) Context: - on my TX2 (with the S1PTW r/o memslot fix applied), the new version of ArmVirtQemu that uses an initial ID map in emulated NOR flash works fine. - in Oliver's case (which is a slightly different flavor of TX2), it crashes extremely early, presumably at the point where this ID

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-19 Thread Oliver Steffen
Quoting Ard Biesheuvel (2023-01-18 10:22:12) > On Wed, 18 Jan 2023 at 09:48, Ard Biesheuvel wrote: > > > > On Wed, 18 Jan 2023 at 09:28, Oliver Steffen wrote: > > > > > > Quoting Ard Biesheuvel (2023-01-18 08:34:32) > > > > On Wed, 18 Jan 2023 at 07:37, Oliver Steffen > > > > wrote: > > > > > >

[edk2-devel] [PATCH v3 2/2] OvmfPkg/PlatformInitLib: catch QEMU's CPU hotplug reg block regression

2023-01-19 Thread Laszlo Ersek
In QEMU v5.1.0, the CPU hotplug register block misbehaves: the negotiation protocol is (effectively) broken such that it suggests that switching from the legacy interface to the modern interface works, but in reality the switch never happens. The symptom has been witnessed when using TCG accelerati

[edk2-devel] [PATCH v3 1/2] OvmfPkg/PlatformInitLib: factor out PlatformCpuCountBugCheck()

2023-01-19 Thread Laszlo Ersek
Move the QEMU v2.7 reset bug check/workaround to a separate function, as we'll need to detect further issues. Cc: Ard Biesheuvel Cc: Brijesh Singh Cc: Erdem Aktas Cc: Gerd Hoffmann Cc: James Bottomley Cc: Jiewen Yao Cc: Jordan Justen Cc: Michael Brown Cc: Min Xu Cc: Oliver Steffen Cc: Se

[edk2-devel] [PATCH v3 0/2] OvmfPkg/PlatformInitLib: catch QEMU's CPU hotplug reg block regression

2023-01-19 Thread Laszlo Ersek
Repo: https://pagure.io/lersek/edk2.git Branch: cpuhp-reg-catch-4250-v3 Test build: https://github.com/tianocore/edk2/pull/3930 Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=4250 v2 was posted at: - 20230112082845.128463-1-lersek@redhat.com">http://mid.mail-archive.com/20230

Re: [edk2-devel] [PATCH V2 09/10] OvmfPkg/PlatformPei: Build GuidHob for Tdx measurement

2023-01-19 Thread Gerd Hoffmann
On Thu, Jan 19, 2023 at 11:28:21AM +0800, Min Xu wrote: > From: Min M Xu > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4243 > > TdxHelperBuildGuidHobForTdxMeasurement is called in PlatformPei to build > GuidHob for Tdx measurement. > > Cc: Erdem Aktas > Cc: James Bottomley > Cc: Jiew

Re: [edk2-devel] [PATCH V2 07/10] OvmfPkg/IntelTdx: Update tdx measurement in SEC phase

2023-01-19 Thread Gerd Hoffmann
On Thu, Jan 19, 2023 at 11:28:19AM +0800, Min Xu wrote: > From: Min M Xu > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4243 > > After TdxHelperLib is instroduced, the SecMain.c in IntelTdx is updated > with the new functions provided by TdxHelperLib. > > Cc: Erdem Aktas > Cc: James Bo

Re: [edk2-devel] [PATCH V2 06/10] OvmfPkg/PeilessStartupLib: Build GuidHob for Tdx measurements

2023-01-19 Thread Gerd Hoffmann
On Thu, Jan 19, 2023 at 11:28:18AM +0800, Min Xu wrote: > From: Min M Xu > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4243 > > With the introduction of TdxHelperBuildGuidHobForTdxMeasurement in > TdxHelperLib PeilessStartup should also be updated. It should call > TdxHelperBuildGuidHob

Re: [edk2-devel] [PATCH V2 05/10] OvmfPkg/IntelTdx: Add PeiTdxHelperLib

2023-01-19 Thread Gerd Hoffmann
On Thu, Jan 19, 2023 at 11:28:17AM +0800, Min Xu wrote: > From: Min M Xu > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4243 > > TdxHelperLib provides below helper functions for a td-guest. > - TdxHelperProcessTdHob > - TdxHelperMeasureTdHob > - TdxHelperMeasureCfvImage > - TdxHelper

Re: [edk2-devel] [PATCH V2 04/10] OvmfPkg/IntelTdx: Implement other helper functions in SecTdxHelperLib

2023-01-19 Thread Gerd Hoffmann
> @@ -807,7 +880,47 @@ TdxHelperMeasureTdHob ( >VOID >) > { > - return EFI_UNSUPPORTED; > + EFI_PEI_HOB_POINTERS Hob; > + EFI_STATUSStatus; > + UINT8 Digest[SHA384_DIGEST_SIZE]; > + OVMF_WORK_AREA*WorkArea; > + VOID *TdHob; > + >

Re: [edk2-devel] [PATCH V2 02/10] OvmfPkg/IntelTdx: Add TdxHelperLibNull

2023-01-19 Thread Gerd Hoffmann
On Thu, Jan 19, 2023 at 11:28:14AM +0800, Min Xu wrote: > From: Min M Xu > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4243 > > TdxHelperLib provides below helper functions for a td-guest. > - TdxHelperProcessTdHob > - TdxHelperMeasureTdHob > - TdxHelperMeasureCfvImage > - TdxHelper

Re: [edk2-devel] [PATCH V2 01/10] OvmfPkg: Add Tdx measurement data structure in WorkArea

2023-01-19 Thread Gerd Hoffmann
On Thu, Jan 19, 2023 at 11:28:13AM +0800, Min Xu wrote: > From: Min M Xu > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4243 > > From the perspective of security any external input should be measured > and extended to some registers (TPM PCRs or TDX RTMR registers). > > There are below

Re: [edk2-devel] [PATCH V2 03/10] OvmfPkg/IntelTdx: Add SecTdxHelperLib

2023-01-19 Thread Gerd Hoffmann
Hi, > TdxHelperLib provides below helper functions for a td-guest. > - TdxHelperProcessTdHob This is moved over from PlatformInitLib. > - TdxHelperMeasureTdHob > - TdxHelperMeasureCfvImage > - TdxHelperBuildGuidHobForTdxMeasurement This is new. > In this patch only TdxHelperProcessTdHob

Re: [edk2-devel] [PATCH 2/3] ArmVirtPkg: CI: Perform build and boot test of ArmVirtQemuKernel

2023-01-19 Thread Gerd Hoffmann
> diff --git a/ArmVirtPkg/PlatformCI/QemuKernelBuild.py > b/ArmVirtPkg/PlatformCI/QemuKernelBuild.py > new file mode 100644 > index ..1c652478cb41 > --- /dev/null > +++ b/ArmVirtPkg/PlatformCI/QemuKernelBuild.py In OvmfPkg I've moved common code over to PlatformBuildLib.py which is us

[edk2-devel] [PATCH 3/3] ArmVirtPkg: CI: Perform build test of ArmVirtKvmTool

2023-01-19 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel --- ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 25 +++ ArmVirtPkg/PlatformCI/KvmToolBuild.py | 215 2 files changed, 240 insertions(+) diff --git a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml b/ArmVirtPk

[edk2-devel] [PATCH 2/3] ArmVirtPkg: CI: Perform build and boot test of ArmVirtQemuKernel

2023-01-19 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel --- ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 43 ArmVirtPkg/PlatformCI/QemuKernelBuild.py | 268 2 files changed, 311 insertions(+) diff --git a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml b/ArmVirtP

[edk2-devel] [PATCH 1/3] ArmVirtPkg/PrePi: Ensure timely execution of library constructors

2023-01-19 Thread Ard Biesheuvel
PrePi has a bare metal entry point, and so it is in charge of calling the library constructors once the C runtime has been initialized sufficiently. However, we are now relying on a HOB to have been constructed by the time the MMU code runs, and so the constructors should be run before that. Sign

[edk2-devel] [PATCH 0/3] ArmVirtPkg: Increase PlatformCI coverage

2023-01-19 Thread Ard Biesheuvel
We recently experienced some build breakage in one of the ArmVirtPkg platforms that is not covered by PlatformCI, in the PrePi component which replaces the entire PEI stage. This component is now also being used in TDVF, and so any modifications to it may regress the existing users. So add build a

Re: [edk2-devel] [PATCH V1 0/2] Add back FfsFindSectionData in EmbeddedPkg

2023-01-19 Thread Ard Biesheuvel
On Thu, 19 Jan 2023 at 08:55, Gerd Hoffmann wrote: > > On Thu, Jan 19, 2023 at 09:51:06AM +0800, Min Xu wrote: > > Commit c673216 introduces FFS_CHECK_SECTION_HOOK and add it as the > > second input parameter in FfsFindSectionData. This change breaks the build > > of ArmVirtPkg. To fix this issue,