[edk2-devel] [PATCH v8 09/10] OvmfPkg/CpuHotplugSmm: do actual CPU hot-eject

2021-02-21 Thread Ankur Arora
Add logic in EjectCpu() to do the actual the CPU ejection. On the BSP, ejection happens by first selecting the CPU via its QemuSelector and then sending the QEMU "eject" command. QEMU in-turn signals the remote VCPU thread which context-switches the CPU out of the SMI handler. Meanwhile the CPU

[edk2-devel] [PATCH v8 06/10] OvmfPkg/SmmCpuFeaturesLib: init CPU ejection state

2021-02-21 Thread Ankur Arora
Init CPU_HOT_EJECT_DATA, which will be used to share CPU ejection state between SmmCpuFeaturesLib (via PiSmmCpuDxeSmm) and CpuHotPlugSmm. The init happens via SmmCpuFeaturesSmmRelocationComplete(), and so it will run as part of the PiSmmCpuDxeSmm entry point function, PiCpuSmmEntry(). Once

[edk2-devel] [PATCH v8 10/10] OvmfPkg/SmmControl2Dxe: negotiate CPU hot-unplug

2021-02-21 Thread Ankur Arora
Advertise OVMF support for CPU hot-unplug and negotiate it if QEMU requests the feature. Cc: Laszlo Ersek Cc: Jordan Justen Cc: Ard Biesheuvel Cc: Igor Mammedov Cc: Boris Ostrovsky Cc: Aaron Young Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132 Signed-off-by: Ankur Arora ---

[edk2-devel] [PATCH v8 07/10] OvmfPkg/SmmCpuFeaturesLib: call CPU hot-eject handler

2021-02-21 Thread Ankur Arora
Call the CPU hot-eject handler if one is installed. The condition for installation is (PcdCpuMaxLogicalProcessorNumber > 1), and there's a hot-unplug request. The handler executes in context of SmmCpuFeaturesRendezvousExit(), which is called at the tail end of SmiRendezvous() after the BSP has

[edk2-devel] [PATCH v8 08/10] OvmfPkg/CpuHotplugSmm: add EjectCpu()

2021-02-21 Thread Ankur Arora
Add EjectCpu(), which handles the CPU ejection, and provides a holding area for said CPUs. It is called via SmmCpuFeaturesRendezvousExit(), at the tail end of the SMI handling. Also UnplugCpus() now stashes QEMU Selectors of CPUs which need to be ejected in CPU_HOT_EJECT_DATA.QemuSelectorMap.

[edk2-devel] [PATCH v8 04/10] OvmfPkg/CpuHotplugSmm: introduce UnplugCpus()

2021-02-21 Thread Ankur Arora
Introduce UnplugCpus() which maps each APIC ID being unplugged onto the hardware ID of the processor and informs PiSmmCpuDxeSmm of removal by calling EFI_SMM_CPU_SERVICE_PROTOCOL.RemoveProcessor(). With this change we handle the first phase of unplug where we collect the CPUs that need to be

[edk2-devel] [PATCH v8 05/10] OvmfPkg/CpuHotplugSmm: define CPU_HOT_EJECT_DATA

2021-02-21 Thread Ankur Arora
Define CPU_HOT_EJECT_DATA and add PCD PcdCpuHotEjectDataAddress, which will be used to share CPU ejection state between OvmfPkg/CpuHotPlugSmm and PiSmmCpuDxeSmm. Cc: Laszlo Ersek Cc: Jordan Justen Cc: Ard Biesheuvel Cc: Igor Mammedov Cc: Boris Ostrovsky Cc: Aaron Young Ref:

[edk2-devel] [PATCH v8 02/10] OvmfPkg/CpuHotplugSmm: collect hot-unplug events

2021-02-21 Thread Ankur Arora
Process fw_remove events in QemuCpuhpCollectApicIds() and collect corresponding APIC IDs for CPUs that are being hot-unplugged. In addition, we now ignore CPUs which only have remove set. These CPUs haven't been processed by OSPM yet. This is based on the QEMU hot-unplug protocol documented

[edk2-devel] [PATCH v8 03/10] OvmfPkg/CpuHotplugSmm: add Qemu Cpu Status helper

2021-02-21 Thread Ankur Arora
Add QemuCpuhpWriteCpuStatus() which will be used to update the QEMU CPU status register. On error, it hangs in a similar fashion as other helper functions. Cc: Laszlo Ersek Cc: Jordan Justen Cc: Ard Biesheuvel Cc: Igor Mammedov Cc: Boris Ostrovsky Cc: Aaron Young Ref:

[edk2-devel] [PATCH v8 01/10] OvmfPkg/CpuHotplugSmm: refactor hotplug logic

2021-02-21 Thread Ankur Arora
Refactor CpuHotplugMmi() to pull out the CPU hotplug logic into ProcessHotAddedCpus(). This is in preparation for supporting CPU hot-unplug. Cc: Laszlo Ersek Cc: Jordan Justen Cc: Ard Biesheuvel Cc: Igor Mammedov Cc: Boris Ostrovsky Cc: Aaron Young Ref:

[edk2-devel] [PATCH v8 00/10] support CPU hot-unplug

2021-02-21 Thread Ankur Arora
Hi, [ Note, v8 is substantially same as v7, but fixes a couple of CI errors. ] This series adds OVMF support for CPU hot-unplug. QEMU secureboot hot-unplug logic corresponding to this is in upstream. Also posted here:

[edk2-devel] MP Services Protocol : Support Hyper threading or not

2021-02-21 Thread Tiger Liu(BJ-RD)
Dear All: I have a question about MP Services Protocol. Does it support Hyper-threading technology? For example: A Quad-cores CPU(with HT feature support), actually it is equal to 8 logical cores. Take assumption 8 logical cores are all healthy and being enabled. So: 1. Will

Re: [edk2-devel] [PATCH - resend] MdeModulePkg/BootLogoLib: Center logo 38.2% from top of screen

2021-02-21 Thread Wu, Hao A
> -Original Message- > From: Patrick Rudolph > Sent: Thursday, February 18, 2021 8:43 PM > To: gaoliming > Cc: devel@edk2.groups.io; tcrawf...@system76.com; Wang, Jian J > ; Wu, Hao A ; Gao, Zhichao > ; Ni, Ray > Subject: Re: [edk2-devel] [PATCH - resend] MdeModulePkg/BootLogoLib: >

Re: [edk2-devel] [PATCH v5 1/2] MdePkg/Include: Add CET instructions to Nasm.inc

2021-02-21 Thread Zhiguang Liu
Hi Sheng Wei, I don't have the access to push patch. Hi Liming, Can you help merge this patch? Thanks Thanks Zhiguang > -Original Message- > From: Sheng, W > Sent: Monday, February 22, 2021 10:12 AM > To: gaoliming ; devel@edk2.groups.io; Liu, > Zhiguang > Cc: Kinney, Michael D ; Yao,

Re: [edk2-devel] [PATCH v5 2/2] UefiCpuPkg/CpuExceptionHandlerLib: Clear CET shadow stack token busy bit

2021-02-21 Thread Sheng Wei
Hi Jiewen, Thank you for review the patch. Could you give review-by on this patch? Thank you. BR Sheng Wei > -Original Message- > From: devel@edk2.groups.io On Behalf Of Sheng > Wei > Sent: 2021年2月20日 11:15 > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Laszlo > Ersek ; Kumar,

Re: [edk2-devel] [PATCH v5 1/2] MdePkg/Include: Add CET instructions to Nasm.inc

2021-02-21 Thread Sheng Wei
Hi Zhiguang, Could you help to merge the patch to the master branch ? @gaoliming Thank you for giving the review-by. BR Sheng Wei > -Original Message- > From: gaoliming > Sent: 2021年2月20日 13:35 > To: devel@edk2.groups.io; Sheng, W > Cc: Kinney, Michael D ; Liu, Zhiguang > ; Yao, Jiewen

Re: [edk2-devel] [PATCH v2 0/2] TigerlakeOpenBoard: Fix build errors with GCC5

2021-02-21 Thread Heng Luo
Thanks Takuto Naito! For the series.. Reviewed-by: Heng Luo > -Original Message- > From: Takuto Naito > Sent: Sunday, February 21, 2021 11:10 PM > To: devel@edk2.groups.io > Cc: Chaganty, Rangasai V ; Desimone, > Nathaniel L ; Luo, Heng > Subject: [PATCH v2 0/2] TigerlakeOpenBoard:

Re: [edk2-devel] [PATCH v2 1/2] TigerlakeOpenBoardPkg: Fix build errors with GCC5

2021-02-21 Thread Heng Luo
Reviewed-by: Heng Luo > -Original Message- > From: Takuto Naito > Sent: Sunday, February 21, 2021 11:10 PM > To: devel@edk2.groups.io > Cc: Chaganty, Rangasai V ; Desimone, > Nathaniel L ; Luo, Heng > Subject: [PATCH v2 1/2] TigerlakeOpenBoardPkg: Fix build errors with GCC5 > > REF:

Re: [edk2-devel] [PATCH v2 2/2] TigerlakeSiliconPkg/IpBlock: Fix build errors with GCC5

2021-02-21 Thread Heng Luo
Reviewed-by: Heng Luo > -Original Message- > From: Takuto Naito > Sent: Sunday, February 21, 2021 11:10 PM > To: devel@edk2.groups.io > Cc: Chaganty, Rangasai V ; Desimone, > Nathaniel L ; Luo, Heng > Subject: [PATCH v2 2/2] TigerlakeSiliconPkg/IpBlock: Fix build errors with > GCC5 >

Re: [edk2-devel] [PATCH v2 2/3] ArmPkg: Rename some functions and parameters in OemMiscLib

2021-02-21 Thread Rebecca Cran
On 2/21/21 2:21 PM, Leif Lindholm wrote: On Sat, Feb 20, 2021 at 20:28:59 -0700, Rebecca Cran wrote: -UINT8 -GetChassisType ( - VOID - ) -{ - EFI_STATUS Status; - UINT8 ChassisType; - - Status = OemGetChassisType (); - if (EFI_ERROR (Status))

Re: [edk2-devel] [PATCH v2 3/3] ArmPkg: Update OemGetChassisType function to return MISC_CHASSIS_TYPE

2021-02-21 Thread Leif Lindholm
On Sat, Feb 20, 2021 at 20:29:00 -0700, Rebecca Cran wrote: > Update OemGetChassisType in OemMiscLib to return MISC_CHASSIS_TYPE > instead of EFI_STATUS, which matches other OemMiscLib functions. > > Signed-off-by: Rebecca Cran Reviewed-by: Leif Lindholm > --- >

Re: [edk2-devel] [edk2-platform][PATCH v1 1/1] EmbeddedPkg/VirtualRealTimeClockLib : Reduce DEBUG message verbosity

2021-02-21 Thread Leif Lindholm
On Sun, Feb 21, 2021 at 21:50:20 +0100, Ard Biesheuvel wrote: > On Sun, 21 Feb 2021 at 21:43, Leif Lindholm wrote: > > > > On Sun, Feb 21, 2021 at 11:50:27 +0100, Ard Biesheuvel wrote: > > > On Sat, 20 Feb 2021 at 22:46, Leif Lindholm wrote: > > > > > > > > *How* annoying was this? > > > > > > >

Re: [edk2-devel] [PATCH v2 2/3] ArmPkg: Rename some functions and parameters in OemMiscLib

2021-02-21 Thread Leif Lindholm
On Sat, Feb 20, 2021 at 20:28:59 -0700, Rebecca Cran wrote: > o Rename 'Offset' parameter in OemUpdateSmbiosInfo to 'Field'. > o Rename OemGetProcessorMaxSockets to OemGetMaxProcessors. > o Rename OemIsSocketPresent to OemIsProcessorPresent. > o Update Universal/Smbios to follow the changes to

Re: [edk2-devel] [edk2-platform][PATCH v1 1/1] EmbeddedPkg/VirtualRealTimeClockLib : Reduce DEBUG message verbosity

2021-02-21 Thread Ard Biesheuvel
On Sun, 21 Feb 2021 at 21:43, Leif Lindholm wrote: > > On Sun, Feb 21, 2021 at 11:50:27 +0100, Ard Biesheuvel wrote: > > On Sat, 20 Feb 2021 at 22:46, Leif Lindholm wrote: > > > > > > *How* annoying was this? > > > > > > This is kind of useful information, well at the "would be good to see > > >

Re: [edk2-devel] [PATCH v2 1/3] ArmPkg: Fix ordering of return type and EFIAPI specifier in OemMiscLib

2021-02-21 Thread Leif Lindholm
On Sat, Feb 20, 2021 at 20:28:58 -0700, Rebecca Cran wrote: > The return type should be on the line before any EFIAPI specifier. > > Signed-off-by: Rebecca Cran Reviewed-by: Leif Lindholm > --- > ArmPkg/Include/Library/OemMiscLib.h | 14 +++--- >

Re: [edk2-devel] [edk2-platform][PATCH v1 1/1] EmbeddedPkg/VirtualRealTimeClockLib : Reduce DEBUG message verbosity

2021-02-21 Thread Leif Lindholm
On Sun, Feb 21, 2021 at 11:50:27 +0100, Ard Biesheuvel wrote: > On Sat, 20 Feb 2021 at 22:46, Leif Lindholm wrote: > > > > *How* annoying was this? > > > > This is kind of useful information, well at the "would be good to see > > in a regular DEBUG build" level. > > > > This change will have

[edk2-devel] [PATCH v2 2/2] TigerlakeSiliconPkg/IpBlock: Fix build errors with GCC5

2021-02-21 Thread Takuto Naito
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3224 - Fix the Teton Glacier Endpoint entry in mPciDeviceTable Cc: Sai Chaganty Cc: Nate DeSimone Cc: Heng Luo Signed-off-by: Takuto Naito --- Notes: v2: - Split the v1 patch into 2 patches, One is for

[edk2-devel] [PATCH v2 1/2] TigerlakeOpenBoardPkg: Fix build errors with GCC5

2021-02-21 Thread Takuto Naito
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3224 - Fix the path of TigerLakeFspBinPkg - Fix misuse of RETURN_ERROR - Remove unused function CheckNationalSio. Cc: Sai Chaganty Cc: Nate DeSimone Cc: Heng Luo Signed-off-by: Takuto Naito --- Notes: v2: - Split the v1 patch into

[edk2-devel] [PATCH v2 0/2] TigerlakeOpenBoard: Fix build errors with GCC5

2021-02-21 Thread Takuto Naito
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3224 TigerlakeOpenBoard: Fix build errors with GCC5 v2: - Split the v1 patch into 2 patches. One is for Platform/Intel/TigerlakeOpenBoardPkg, another one is for edk2-platforms\Silicon\Intel\TigerlakeSiliconPkg.

Re: [edk2-devel] [edk2-platform][PATCH v1 1/1] EmbeddedPkg/VirtualRealTimeClockLib : Reduce DEBUG message verbosity

2021-02-21 Thread Ard Biesheuvel
On Sat, 20 Feb 2021 at 22:46, Leif Lindholm wrote: > > *How* annoying was this? > > This is kind of useful information, well at the "would be good to see > in a regular DEBUG build" level. > > This change will have suddenly effectively hidden a message that was > already present in many