Re: [edk2-devel] [edk2-wiki][PATCH v1 0/2] Add OVMF WinDbg Source Debug Page

2020-07-30 Thread Guomin Jiang
I follow the step and test it, it work and thanks for your efforts. Some suggestion: 1. Can we add the QEMU link and clarify the 32bit or 64bit version? For example, I use the https://qemu.weilnetz.de/w64/2020/qemu-w64-setup-20200201.exe 2. Can we add the PUTTY link so the new person can

Re: [edk2-devel] [PATCH 1/1] Add BhyvePkg, to support the bhyve hypervisor

2020-07-30 Thread Rebecca Cran
On 7/13/20 2:25 PM, Rebecca Cran wrote: On 7/13/20 12:09 PM, Laszlo Ersek wrote: Can you please ping me when the PatchCheck.py problem has been solved, so I can go ahead with the merge? Will do. Hi Laszlo, I just rebased the bhyve commit against the latest edk2 master with no

Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci

2020-07-30 Thread Rebecca Cran
Thanks! On 7/30/20 9:50 PM, Gao, Liming wrote: Rebecca: I have merged all changes of LicenseCheck. You can continue your work. If you meet with any issue, please let me know. Thanks Liming -Original Message- From: devel@edk2.groups.io On Behalf Of Liming Gao Sent: 2020年7月27日 10:35

Re: [edk2-devel] [PATCH v4 2/3] MdePkg/BasePciExpressLib: Support variable size MMCONF

2020-07-30 Thread Liming Gao
Marcello: I know your case only uses BasePciExpressLib. But, this change updates library class. All library instances should match the library class. So, you have to update DxeRuntimePciExpressLib and SmmPciExpressLib too. Thanks Liming From: devel@edk2.groups.io On Behalf Of Marcello

Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci

2020-07-30 Thread Liming Gao
Rebecca: I have merged all changes of LicenseCheck. You can continue your work. If you meet with any issue, please let me know. Thanks Liming -Original Message- From: devel@edk2.groups.io On Behalf Of Liming Gao Sent: 2020年7月27日 10:35 To: Rebecca Cran ; devel@edk2.groups.io; Zhang,

Re: [edk2-devel] [PATCH v2 01/15] .pytool/Plugin: Add a plugin LicenseCheck

2020-07-30 Thread Liming Gao
Merged at e848b58d7c85293cd4121287abcea2d22a4f0620..7f79b736b0a57da71d87c987357db0227cd16ac6 Thanks Liming -Original Message- From: devel@edk2.groups.io On Behalf Of Liming Gao Sent: 2020年7月30日 11:15 To: Zhang, Shenglei ; devel@edk2.groups.io Cc: Sean Brogan ; Bret Barkelew ; Kinney,

Re: [edk2-devel] [PATCH 1/2] Revert "BaseTools/PatchCheck.py: Add LicenseCheck"

2020-07-30 Thread Liming Gao
Merged at 137c2c6eff67f4750d77e8e40af6683c412d3ed0 -Original Message- From: devel@edk2.groups.io On Behalf Of Liming Gao Sent: 2020年7月31日 11:14 To: Leif Lindholm Cc: devel@edk2.groups.io; ler...@redhat.com; Andrew Fish ; Kinney, Michael D ; Zhang, Shenglei ; Chen, Christine Subject:

[edk2-devel] [PATCH v1 7/7] FmpDevicePkg/FmpDxe: Improve function parameter validation

2020-07-30 Thread Michael Kubacki
From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2869 Makes some minor improvements to function parameter validation in FmpDxe, in particular to externally exposed functions such as those that back EFI_FIRMWARE_MANAGEMENT_PROTOCOL. Cc: Liming Gao Cc: Michael D Kinney

[edk2-devel] [PATCH v1 5/7] FmpDevicePkg/FmpDxe: Better warn of potential ImageTypeId misconfig

2020-07-30 Thread Michael Kubacki
From: Michael Kubacki A user may fall through to the case they depend on the PcdFmpDeviceImageTypeIdGuid value to get the ImageTypeId GUID value. The default PCD value is 0 (NULL) so the code would further fall back on the gEfiCallerIdGuid value. This change modifies the print error level for

[edk2-devel] [PATCH v1 4/7] FmpDevicePkg/FmpDependencyCheckLib: Return unsatisfied on handle failure

2020-07-30 Thread Michael Kubacki
From: Michael Kubacki CheckFmpDependency () will currently return that dependencies are satisfied if the initial call in the function to locate handles that have gEfiFirmwareManagementProtocolGuid installed fails. This change updates the error handling to return FALSE (dependencies are not

[edk2-devel] [PATCH v1 6/7] FmpDevicePkg/FmpDxe: Indicate ESRT GUID on invalid ImageIdName

2020-07-30 Thread Michael Kubacki
From: Michael Kubacki Updates the debug error message to include the GUID of the FMP instance that encountered the issue to help the user better isolate the problem. Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: Michael Kubacki --- FmpDevicePkg/FmpDxe/FmpDxe.c | 2 +- 1 file changed, 1

[edk2-devel] [PATCH v1 1/7] FmpDevicePkg/FmpDependencyLib: Correct ValidateDependency() documentation

2020-07-30 Thread Michael Kubacki
From: Michael Kubacki Modifies the return value documentation to state that the BOOLEAN value indicates whether a given dependency expression is valid not a capsule. Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: Michael Kubacki ---

[edk2-devel] [PATCH v1 2/7] FmpDevicePkg/FmpDependencyLib: Fix "exression" typo

2020-07-30 Thread Michael Kubacki
From: Michael Kubacki Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: Michael Kubacki --- FmpDevicePkg/Library/FmpDependencyLib/FmpDependencyLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FmpDevicePkg/Library/FmpDependencyLib/FmpDependencyLib.c

[edk2-devel] [PATCH v1 3/7] FmpDevicePkg/FmpDependencyLib: Handle version string overflow

2020-07-30 Thread Michael Kubacki
From: Michael Kubacki This change recognizes the condition of the DEPEX version string extending beyond the end of the dependency expression as an error. Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: Michael Kubacki --- Notes: This is particularly helpful for the user to isolate

[edk2-devel] [PATCH v1 0/7] FmpDevicePkg Minor Fixes

2020-07-30 Thread Michael Kubacki
From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2869 This patch series makes minor fixes and enhancements in FmpDevicePkg. None of the issues impact functionality in a major way. These are smaller sets of changes that are being submitted prior to a larger future patch

Re: [edk2-devel] [PATCH 1/2] Revert "BaseTools/PatchCheck.py: Add LicenseCheck"

2020-07-30 Thread Liming Gao
Reviewed-by: Liming Gao -Original Message- From: Leif Lindholm Sent: 2020年7月14日 19:25 To: Gao, Liming Cc: devel@edk2.groups.io; ler...@redhat.com; Andrew Fish ; Kinney, Michael D ; Zhang, Shenglei ; Chen, Yuwei Subject: Re: [edk2-devel] [PATCH 1/2] Revert "BaseTools/PatchCheck.py:

Re: [edk2-devel] [platforms: PATCH 1/1] Marvell/Drivers: MvFvbDxe: Switch to PcdSet64S

2020-07-30 Thread Liming Gao
Reviewed-by: Liming Gao -Original Message- From: devel@edk2.groups.io On Behalf Of Marcin Wojtas Sent: 2020年7月31日 0:06 To: devel@edk2.groups.io Cc: l...@nuviainc.com; ard.biesheu...@arm.com; m...@semihalf.com; j...@semihalf.com; nad...@marvell.com; kos...@marvell.com Subject:

Re: [edk2-devel] [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: pause in WaitForSemaphore() before re-fetch

2020-07-30 Thread Dong, Eric
Reviewed-by: Eric Dong > -Original Message- > From: Laszlo Ersek > Sent: Thursday, July 30, 2020 2:52 AM > To: edk2-devel-groups-io > Cc: Dong, Eric ; Philippe Mathieu-Daudé > ; Kumar, Rahul1 ; Ni, Ray > > Subject: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: pause in > WaitForSemaphore()

Re: [edk2-devel] acpiview error handling patches

2020-07-30 Thread Gao, Zhichao
I am busy at other works recent weeks. I plan to review the patch in next two weeks. Hope it is acceptable for you. Thanks, Zhichao > -Original Message- > From: devel@edk2.groups.io On Behalf Of Tomas Pilar > (tpilar) > Sent: Wednesday, July 29, 2020 7:23 PM > To: Gao; Gao, Zhichao ;

Re: [edk2-devel] [edk2-wiki][PATCH v1 0/2] Add OVMF WinDbg Source Debug Page

2020-07-30 Thread Michael D Kinney
Hi Michael, Thank you for the documentation. Series Reviewed-by: Michael D Kinney pushed as 4938ba0..27a8f59 Mike > -Original Message- > From: michael.kuba...@outlook.com > > Sent: Wednesday, July 29, 2020 3:53 PM > To: devel@edk2.groups.io > Cc: Justen, Jordan L ; Laszlo > Ersek ;

Re: [edk2-devel] [Patch v2 0/2] Use RngLib instead of TimerLib for OpensslLib

2020-07-30 Thread Michael D Kinney
Hi Matthew, A few comments: 1) MdePkg/Libray/BaseRngLibTimer a) Since this implementation of the RngLib class is layered on top of any TimerLib instance a platform selects, the dir/name of the lib should be BasRngLibTimerLib. b) BaseRngLibTimer.inf - I see the comment that it

[edk2-devel] [PATCH v13 46/46] Maintainers.txt: Add reviewers for the OvmfPkg SEV-related files

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky Register reviewers for the SEV-related files in OvmfPkg. Cc: Andrew Fish Cc: Laszlo Ersek Cc: Leif Lindholm Cc: Michael D Kinney Cc: Brijesh Singh Acked-by: Brijesh Singh Reviewed-by: Laszlo Ersek Signed-off-by: Tom Lendacky --- Maintainers.txt | 10 ++ 1

[edk2-devel] [PATCH v13 45/46] UefiCpuPkg/MpInitLib: Prepare SEV-ES guest APs for OS use

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Before UEFI transfers control to the OS, it must park the AP. This is done using the AsmRelocateApLoop function to transition into 32-bit non-paging mode. For an SEV-ES guest, a few additional things must be done: -

[edk2-devel] [PATCH v13 42/46] UefiCpuPkg: Allow AP booting under SEV-ES

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Typically, an AP is booted using the INIT-SIPI-SIPI sequence. This sequence is intercepted by the hypervisor, which sets the AP's registers to the values requested by the sequence. At that point, the hypervisor can start

[edk2-devel] [PATCH v13 43/46] OvmfPkg: Use the SEV-ES work area for the SEV-ES AP reset vector

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 A hypervisor is not allowed to update an SEV-ES guest's register state, so when booting an SEV-ES guest AP, the hypervisor is not allowed to set the RIP to the guest requested value. Instead an SEV-ES AP must be

[edk2-devel] [PATCH v13 44/46] OvmfPkg: Move the GHCB allocations into reserved memory

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 After having transitioned from UEFI to the OS, the OS will need to boot the APs. For an SEV-ES guest, the APs will have been parked by UEFI using GHCB pages allocated by UEFI. The hypervisor will write to the GHCB

[edk2-devel] [PATCH v13 41/46] UefiCpuPkg/MpInitLib: Add CPU MP data flag to indicate if SEV-ES is enabled

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 When starting APs in an SMP configuration, the AP needs to know if it is running as an SEV-ES guest in order to assign a GHCB page. Add a field to the CPU_MP_DATA structure that will indicate if SEV-ES is enabled. This

[edk2-devel] [PATCH v13 40/46] UefiCpuPkg: Add a 16-bit protected mode code segment descriptor

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 A hypervisor is not allowed to update an SEV-ES guests register state, so when booting an SEV-ES guest AP, the hypervisor is not allowed to set the RIP to the guest requested value. Instead, an SEV-ES AP must be

[edk2-devel] [PATCH edk2-platforms v1 3/3] Silicon/Synopsys/DesignWare: Casts to avoid void* pointer arithmetic

2020-07-30 Thread PierreGondois
From: Pierre Gondois By default, gcc allows void* pointer arithmetic. This is a GCC extension. However, the C reference manual states that void* pointer "cannot be operands of addition or subtraction operators". Cf s5.3.1 "Generic Pointers". This patch adds casts to avoid doing void* pointer

[edk2-devel] [PATCH edk2-platforms v1 0/3] Casts to avoid void* pointer arithmetic

2020-07-30 Thread PierreGondois
These patches cast void* pointers to UINTN, preventing to do void* pointer arithmetc. Pierre Gondois (3): Silicon/Marvell/Drivers: Casts to avoid void* pointer arithmetic Silicon/Socionext/SynQuacer: Casts to avoid void* pointer arithmetic Silicon/Synopsys/DesignWare: Casts to avoid void*

[edk2-devel] [PATCH edk2-platforms v1 1/3] Silicon/Marvell/Drivers: Casts to avoid void* pointer arithmetic

2020-07-30 Thread PierreGondois
From: Pierre Gondois By default, gcc allows void* pointer arithmetic. This is a GCC extension. However, the C reference manual states that void* pointer "cannot be operands of addition or subtraction operators". Cf s5.3.1 "Generic Pointers". This patch adds casts to avoid doing void* pointer

[edk2-devel] [PATCH edk2-platforms v1 2/3] Silicon/Socionext/SynQuacer: Casts to avoid void* pointer arithmetic

2020-07-30 Thread PierreGondois
From: Pierre Gondois By default, gcc allows void* pointer arithmetic. This is a GCC extension. However, the C reference manual states that void* pointer "cannot be operands of addition or subtraction operators". Cf s5.3.1 "Generic Pointers". This patch adds casts to avoid doing void* pointer

[edk2-devel] [PATCH v13 37/46] OvmfPkg/Sec: Add #VC exception handling for Sec phase

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 An SEV-ES guest will generate a #VC exception when it encounters a non-automatic exit (NAE) event. It is expected that the #VC exception handler will communicate with the hypervisor using the GHCB to handle the NAE

[edk2-devel] [PATCH v13 35/46] OvmfPkg/PlatformPei: Reserve SEV-ES work area if S3 is supported

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Protect the SEV-ES work area memory used by an SEV-ES guest. Regarding the lifecycle of the SEV-ES memory area: PcdSevEsWorkArea (a) when and how it is initialized after first boot of the VM If SEV-ES is enabled,

[edk2-devel] [PATCH v13 36/46] OvmfPkg/ResetVector: Add support for a 32-bit SEV check

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 During BSP startup, the reset vector code will issue a CPUID instruction while in 32-bit mode. When running as an SEV-ES guest, this will trigger a #VC exception. Add exception handling support to the early reset vector

[edk2-devel] [PATCH v13 38/46] OvmfPkg/Sec: Enable cache early to speed up booting

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Currently, the OVMF code relies on the hypervisor to enable the cache support on the processor in order to improve the boot speed. However, with SEV-ES, the hypervisor is not allowed to change the CR0 register to enable

[edk2-devel] [PATCH v13 39/46] OvmfPkg/QemuFlashFvbServicesRuntimeDxe: Bypass flash detection with SEV-ES

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 The flash detection routine will attempt to determine how the flash device behaves (e.g. ROM, RAM, Flash). But when SEV-ES is enabled and the flash device behaves as a ROM device (meaning it is marked read-only by the

[edk2-devel] [PATCH v13 34/46] OvmfPkg: Reserve a page in memory for the SEV-ES usage

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Reserve a fixed area of memory for SEV-ES use and set a fixed PCD, PcdSevEsWorkAreaBase, to this value. This area will be used by SEV-ES support for two purposes: 1. Communicating the SEV-ES status during BSP boot to

[edk2-devel] [PATCH v13 33/46] UefiCpuPkg: Create an SEV-ES workarea PCD

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Create an SEV-ES workarea PCD. This PCD will be used for BSP communication during SEC and for AP startup during PEI and DXE phases, the latter is the reason for creating it in the UefiCpuPkg. Cc: Eric Dong Cc: Ray Ni

[edk2-devel] [PATCH v13 32/46] OvmfPkg/PlatformPei: Move early GDT into ram when SEV-ES is enabled

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 The SEV support will clear the C-bit from non-RAM areas. The early GDT lives in a non-RAM area, so when an exception occurs (like a #VC) the GDT will be read as un-encrypted even though it is encrypted. This will result

[edk2-devel] [PATCH v13 30/46] OvmfPkg/PlatformPei: Reserve GHCB-related areas if S3 is supported

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Protect the memory used by an SEV-ES guest when S3 is supported. This includes the page table used to break down the 2MB page that contains the GHCB so that it can be marked un-encrypted, as well as the GHCB area.

[edk2-devel] [PATCH v13 31/46] OvmfPkg: Create GHCB pages for use during Pei and Dxe phase

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Allocate memory for the GHCB pages and the per-CPU variable pages during SEV initialization for use during Pei and Dxe phases. The GHCB page(s) must be shared pages, so clear the encryption mask from the current page

[edk2-devel] [PATCH v13 29/46] OvmfPkg: Create a GHCB page for use during Sec phase

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 A GHCB page is needed during the Sec phase, so this new page must be created. Since the #VC exception handler routines assume that a per-CPU variable area is immediately after the GHCB, this per-CPU variable area must

[edk2-devel] [PATCH v13 26/46] OvmfPkg/VmgExitLib: Add support for DR7 Read/Write NAE events

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a DR7 read or write intercept generates a #VC exception. The #VC handler must provide special support to the guest for this. On a DR7 write, the #VC handler must cache the value and issue a VMGEXIT to

[edk2-devel] [PATCH v13 28/46] OvmfPkg: Add support to perform SEV-ES initialization

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 When SEV-ES is enabled, then SEV is also enabled. Add support to the SEV initialization function to also check for SEV-ES being enabled, and if enabled, set the SEV-ES enabled PCD (PcdSevEsIsEnabled). Cc: Jordan Justen

[edk2-devel] [PATCH v13 24/46] OvmfPkg/VmgExitLib: Add support for MONITOR/MONITORX NAE events

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a MONITOR/MONITORX intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Acked-by: Laszlo

[edk2-devel] [PATCH v13 27/46] OvmfPkg/MemEncryptSevLib: Add an SEV-ES guest indicator function

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Create a function that can be used to determine if the VM is running as an SEV-ES guest. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Reviewed-by: Laszlo Ersek Signed-off-by: Tom Lendacky ---

[edk2-devel] [PATCH v13 22/46] OvmfPkg/VmgExitLib: Add support for VMMCALL NAE events

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a VMMCALL intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Acked-by: Laszlo Ersek

[edk2-devel] [PATCH v13 25/46] OvmfPkg/VmgExitLib: Add support for MWAIT/MWAITX NAE events

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a MWAIT/MWAITX intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Acked-by: Laszlo Ersek

[edk2-devel] [PATCH v13 23/46] OvmfPkg/VmgExitLib: Add support for RDTSCP NAE events

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a RDTSCP intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Acked-by: Laszlo Ersek

[edk2-devel] [PATCH v13 21/46] OvmfPkg/VmgExitLib: Add support for INVD NAE events

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a INVD intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Acked-by: Laszlo Ersek

[edk2-devel] [PATCH v13 20/46] OvmfPkg/VmgExitLib: Add support for RDPMC NAE events

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a RDPMC intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Acked-by: Laszlo Ersek

[edk2-devel] [PATCH v13 19/46] OvmfPkg/VmgExitLib: Add support for RDTSC NAE events

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a RDTSC intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Acked-by: Laszlo Ersek

[edk2-devel] [PATCH v13 18/46] OvmfPkg/VmgExitLib: Add support for WBINVD NAE events

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a WBINVD intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Acked-by: Laszlo Ersek

[edk2-devel] [PATCH v13 17/46] OvmfPkg/VmgExitLib: Add support for NPF NAE events (MMIO)

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a NPF intercept for an NPT entry with a reserved bit set generates a #VC exception. This condition is assumed to be an MMIO access. VMGEXIT must be used to allow the hypervisor to handle this intercept.

[edk2-devel] [PATCH v13 16/46] OvmfPkg/VmgExitLib: Add support for MSR_PROT NAE events

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a MSR_PROT intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Add support to construct the required GHCB values to support an MSR_PROT NAE event.

[edk2-devel] [PATCH v13 09/46] OvmfPkg: Prepare OvmfPkg to use the VmgExitLib library

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Various CpuExceptionHandlerLib libraries will updated to use the new VmgExitLib library. To prevent any build breakage, update the OvmfPkg DSC files that use a form of the CpuExceptionHandlerLib library to include the

[edk2-devel] [PATCH v13 13/46] OvmfPkg/VmgExitLib: Add support for IOIO_PROT NAE events

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a IOIO_PROT intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Add support to construct the required GHCB values to support a IOIO_PROT NAE event.

[edk2-devel] [PATCH v13 15/46] OvmfPkg/VmgExitLib: Add support for CPUID NAE events

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a CPUID intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Add support to construct the required GHCB values to support a CPUID NAE event.

[edk2-devel] [PATCH v13 14/46] OvmfPkg/VmgExitLib: Support string IO for IOIO_PROT NAE events

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Add support to the #VC exception handler to handle string IO. This requires expanding the IO instruction parsing to recognize string based IO instructions as well as preparing an un-encrypted buffer to be used to

[edk2-devel] [PATCH v13 10/46] UefiPayloadPkg: Prepare UefiPayloadPkg to use the VmgExitLib library

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Various CpuExceptionHandlerLib libraries will updated to use the new VmgExitLib library. To prevent any build breakage, update the UefiPayloadPkg DSC files that use a form of the CpuExceptionHandlerLib library to include

[edk2-devel] [PATCH v13 11/46] UefiCpuPkg/CpuExceptionHandler: Add base support for the #VC exception

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Add base support to handle #VC exceptions. Update the common exception handlers to invoke the VmgExitHandleVc () function of the VmgExitLib library when a #VC is encountered. A non-zero return code will propagate to the

[edk2-devel] [PATCH v13 12/46] OvmfPkg/VmgExitLib: Implement library support for VmgExitLib in OVMF

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky The base VmgExitLib library provides a default limited interface. As it does not provide full support, create an OVMF version of this library to begin the process of providing full support of SEV-ES within OVMF. SEV-ES support is only provided for X64 builds, so only

[edk2-devel] [PATCH v13 08/46] UefiCpuPkg: Implement library support for VMGEXIT

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 To support handling #VC exceptions and issuing VMGEXIT instructions, create a library with functions that can be used to perform these #VC/VMGEXIT related operations. This includes functions for: - Handling #VC

[edk2-devel] [PATCH v13 07/46] MdePkg/BaseLib: Add support for the VMGEXIT instruction

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 VMGEXIT is a new instruction used for Hypervisor/Guest communication when running as an SEV-ES guest. A VMGEXIT will cause an automatic exit (AE) to occur, resulting in a #VMEXIT with an exit code value of 0x403. Since

[edk2-devel] [PATCH v13 05/46] MdeModulePkg/DxeIplPeim: Support GHCB pages when creating page tables

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 GHCB pages must be mapped as shared pages, so modify the process of creating identity mapped pagetable entries so that GHCB entries are created without the encryption bit set. The GHCB range consists of two pages per

[edk2-devel] [PATCH v13 04/46] MdePkg: Add a structure definition for the GHCB

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 The GHCB is used by an SEV-ES guest for communicating between the guest and the hypervisor. Create the GHCB definition as defined by the GHCB protocol definition. Cc: Michael D Kinney Cc: Liming Gao Reviewed-by:

[edk2-devel] [PATCH v13 03/46] MdePkg: Add the MSR definition for the GHCB register

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 For SEV-ES, the GHCB page address is stored in the GHCB MSR register (0xc0010130). Define the register and the format used for register during GHCB protocol negotiation. Cc: Michael D Kinney Cc: Liming Gao

[edk2-devel] [PATCH v13 06/46] MdePkg/BaseLib: Add support for the XGETBV instruction

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a CPUID instruction requires the current value of the XCR0 register. In order to retrieve that value, the XGETBV instruction needs to be executed. Provide the necessary support to execute the XGETBV

[edk2-devel] [PATCH v13 00/46] SEV-ES guest support

2020-07-30 Thread Lendacky, Thomas
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

[edk2-devel] [PATCH v13 02/46] UefiCpuPkg: Create PCD to be used in support of SEV-ES

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 A new dynamic UefiCpuPkg PCD is needed to support SEV-ES under OVMF: - PcdSevEsIsEnabled: BOOLEAN value used to indicate if SEV-ES is enabled Cc: Eric Dong Cc: Ray Ni Cc: Laszlo Ersek Reviewed-by: Eric Dong

[edk2-devel] [PATCH v13 01/46] MdeModulePkg: Create PCDs to be used in support of SEV-ES

2020-07-30 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Two new dynamic MdeModulePkg PCDs are needed to support SEV-ES under OVMF: - PcdGhcbBase: UINT64 value that is the base address of the GHCB allocation. - PcdGhcbSize: UINT64 value

[edk2-devel] [Patch v2 2/2] MdePkg: TimerRngLib: Added RngLib that uses TimerLib

2020-07-30 Thread Matthew Carlson
From: Matthew Carlson Added a new RngLib that provides random numbers from the TimerLib using the performance counter. This is meant to be used for OpenSSL to replicate past behavior. This should not be used in production as a real source of entropy. Cc: Michael D Kinney Cc: Liming Gao Cc:

[edk2-devel] [Patch v2 0/2] Use RngLib instead of TimerLib for OpensslLib

2020-07-30 Thread Matthew Carlson
From: Matthew Carlson This fixes bugzilla 1871. See PR here: https://github.com/tianocore/edk2/pull/831 Matthew Carlson (2): CryptoPkg: OpensslLib: Use RngLib to generate entropy in rand_pool MdePkg: TimerRngLib: Added RngLib that uses TimerLib CryptoPkg/Library/OpensslLib/rand_pool.c

[edk2-devel] [Patch v2 1/2] CryptoPkg: OpensslLib: Use RngLib to generate entropy in rand_pool

2020-07-30 Thread Matthew Carlson
From: Matthew Carlson Changes OpenSSL to no longer depend on TimerLib and instead use RngLib. This allows platforms to decide for themsevles what sort of entropy source they provide to OpenSSL and TlsLib. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Signed-off-by: Matthew Carlson ---

Re: [edk2-devel] [PATCH] MdePkg: Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES

2020-07-30 Thread Marcin Wojtas
Hi Leif, śr., 29 lip 2020 o 15:35 Leif Lindholm napisał(a): > > Right, so the following platforms break once this patch is merged: > > - AMD Overdrive, Overdrive 1000, Cello > - Hisilicon D03, D05, D06 (some of these due to binary drivers in > edk2-non-osi) > - Marvell Armada 78x0/80x0,

[edk2-devel] [platforms: PATCH 1/1] Marvell/Drivers: MvFvbDxe: Switch to PcdSet64S

2020-07-30 Thread Marcin Wojtas
According to the bug: https://bugzilla.tianocore.org/show_bug.cgi?id=2777 the deprecated code under DISABLE_NEW_DEPRECATED_INTERFACES will be removed, which will result in compilation breakage of the Marvell platforms. Prevent that by switching to the different PcdSet API. Signed-off-by: Marcin

Re: [edk2-devel] [edk2-platforms PATCH 1/5] Silicon/Synopsys/DesignWare: Import DesignWare USB3 peripheral driver

2020-07-30 Thread Leif Lindholm
Hi Vin, +Mike, Sorry for delay in responding. OK, so we know where it comes from - but we can no longer accept code under the plan 2-clause BSD license into edk2-platforms master. However, 2-clause BSD can be relicensed as 2-clause BSD + patent. Please do so, converting the comment header

Re: [edk2-devel] [PATCH V2 2/2] BaseTools: Factorize GCC flags

2020-07-30 Thread Leif Lindholm
And now I spotted this one. Why are we going back and changing build flags for toolchain profiles that are kept around for legacy use only? GCC 4.8 was released in 2013. While I agree it *semantically* makes sense for GCC*_CC_FLAGS to inherit GCC_ALL_CC_FLAGS, I am pretty sure the discrepancy

Re: [edk2-devel] [edk2-wiki][PATCH v1 2/2] Update OVMF FAQ to include WinDbg enabling instructions

2020-07-30 Thread Laszlo Ersek
On 07/30/20 00:52, Michael Kubacki wrote: > From: Michael Kubacki > > Includes a link to the WinDbg enabling page in the OVMF FAQ and > fixes a broken link to the generic EDK II source level debug page. > > Cc: Jordan Justen > Cc: Laszlo Ersek > Cc: Ard Biesheuvel > Cc: Michael D Kinney >