On 2021-03-24 8:15 p.m., gaoliming wrote:
Create PR https://github.com/tianocore/edk2/pull/1515
Thanks Liming.
Ankur
Thanks
Liming
-邮件原件-
发件人: devel@edk2.groups.io 代表 gaoliming
发送时间: 2021年3月22日 9:40
收件人: 'Ankur Arora' ; devel@edk2.groups.io
抄送: 'Michael D Kinney
aves like a NOP instruction."
On RISC-V and ARM64, CpuPause() executes a NOP, which is no worse than
the tight loop we have.
Cc: Liming Gao
Signed-off-by: Ankur Arora
Reviewed-by: Michael D Kinney
Reviewed-by: Laszlo Ersek
---
MdePkg/Library/BaseLib/CpuDeadLoop.c | 4 +++-
1 file changed, 3 inser
aves like a NOP instruction."
On RISC-V and ARM64, CpuPause() executes a NOP, which is no worse than
the tight loop we have.
Cc: Liming Gao
Signed-off-by: Ankur Arora
Reviewed-by: Michael D Kinney
Reviewed-by: Laszlo Ersek
---
MdePkg/Library/BaseLib/CpuDeadLoop.c | 4 +++-
1 file changed
current code is in a spin loop. The processor may use this to optimize
power consumption while in the spin loop. Architecturally, this instruction
behaves like a NOP instruction."
Happy to add this to the commit message if you think it'll be useful.
Thanks
Ankur
Thanks
Liming
-邮件原件
Use CpuPause() to allow the CPU to go into a lower power state
state while we spin wait.
Cc: Liming Gao
Signed-off-by: Ankur Arora
Reviewed-by: Michael D Kinney
---
MdePkg/Library/BaseLib/CpuDeadLoop.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/MdePkg/Library
On 2021-03-16 7:07 a.m., Laszlo Ersek wrote:
On 03/12/21 07:26, Ankur Arora wrote:
Hi,
This series adds OVMF support for CPU hot-unplug.
QEMU secureboot hot-unplug logic corresponding to this is in upstream.
Also posted here:
https://lore.kernel.org/qemu-devel/20201207140739.3829993-1
.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
Notes:
Addresses the following comments from v8:
(1a,1b) CheckIfBsp(): get rid of ProcessorNum, document retval.
(2) Line up IsBsp and ApicBaseMsr
(3) s/ongoing SMI iteration/ongoing SMI/
(4) Get rid of the allusions
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
/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
Reviewed-by: Laszlo Ersek
---
OvmfPkg/CpuHotplugSmm/CpuHotplug.c | 210 ++---
1 file changed, 126 insertions(+), 84 deletions(-)
diff --git a/OvmfPkg/CpuHotplugSmm/CpuHotplug.c
b/OvmfPkg/CpuHotplugSmm/CpuHotplug.c
index
://bugzilla.tianocore.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
Reviewed-by: Laszlo Ersek
---
OvmfPkg/CpuHotplugSmm/QemuCpuhp.h | 6 ++
OvmfPkg/CpuHotplugSmm/QemuCpuhp.c | 22 ++
2 files changed, 28 insertions(+)
diff --git a/OvmfPkg/CpuHotplugSmm/QemuCpuhp.h
b/OvmfPkg
. This is used by
EjectCpu() to identify CPUs marked for ejection.
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
---
Notes:
Addresses the
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
Notes:
Addresses the following comments from v8:
(1) Remove line before the "if (MaxNumberofCpus == 1)" check.
(3) Fixup the space around "||".
(2,6) Simplify the three
BSP has
signalled an SMI exit via the "AllCpusInSync" loop.
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
---
Notes:
Addresses the
://bugzilla.tianocore.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
Notes:
Addresses the following comments from v8:
(1) Get rid of the unnecessary commit specifier from the subject.
(2) s/MaxNumberOfCpus/PcdCpuMaxLogicalProcessorNumber/
(3) Shifted the comments to be above
unplugged and mark them for removal in SMM
data structures.
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
Reviewed-by: Laszlo Ersek
---
OvmfPkg
ented here:
https://lore.kernel.org/qemu-devel/20201204170939.1815522-3-imamm...@redhat.com/
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
---
448-1-ankur.a.ar...@oracle.com/
v2:
- Do the ejection via SmmCpuFeaturesRendezvousExit()
URL:
https://patchew.org/EDK2/20210107195515.106158-1-ankur.a.ar...@oracle.com/
RFC:
URL:
https://patchew.org/EDK2/20201208053432.2690694-1-ankur.a.ar...@oracle.com/
Please review.
Thanks
Ankur
Ankur Arora
On 2021-02-23 1:39 p.m., Laszlo Ersek wrote:
On 02/22/21 08:19, Ankur Arora wrote:
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
On 2021-02-23 12:36 p.m., Laszlo Ersek wrote:
superficial comments only; the patch is nearly ready:
On 02/22/21 08:19, Ankur Arora wrote:
Add EjectCpu(), which handles the CPU ejection, and provides a holding
area for said CPUs. It is called via SmmCpuFeaturesRendezvousExit(),
at the tail end
On 2021-02-23 9:18 a.m., Paolo Bonzini wrote:
On 23/02/21 18:06, Laszlo Ersek wrote:
On 02/23/21 08:45, Paolo Bonzini wrote:
On 22/02/21 15:53, Laszlo Ersek wrote:
+
+ if (mCpuHotEjectData != NULL) {
+ CPU_HOT_EJECT_HANDLER Handler;
+
+ Handler = mCpuHotEjectData->Handler;
This patch l
On 2021-02-22 6:53 a.m., Laszlo Ersek wrote:
Adding Paolo, one comment below:
On 02/22/21 08:19, Ankur Arora wrote:
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
On 2021-02-22 6:19 a.m., Laszlo Ersek wrote:
On 02/22/21 08:19, Ankur Arora wrote:
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
On 2021-02-22 5:06 a.m., Laszlo Ersek wrote:
On 02/22/21 08:19, Ankur Arora wrote:
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
On 2021-02-22 4:39 a.m., Laszlo Ersek wrote:
On 02/22/21 08:19, Ankur Arora wrote:
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
On 2021-02-22 4:31 a.m., Laszlo Ersek wrote:
On 02/22/21 08:19, Ankur Arora wrote:
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
On 2021-02-22 4:27 a.m., Laszlo Ersek wrote:
On 02/22/21 08:19, Ankur Arora wrote:
Process fw_remove events in QemuCpuhpCollectApicIds() and collect
corresponding APIC IDs for CPUs that are being hot-unplugged.
(1) We also collect selectors for those; please mention the fact here.
In
.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
Notes:
Addresses the following reviewing comments from v6:
(1) s/CpuEject/EjectCpu/g
(2,2a,2c) Get rid of eject-worker and related.
(2b,2d) Use the PlatformSmmBspElection() logic to find out IsBSP.
(3,3b) Use CPU_HOT_EJEC
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
Notes:
Addresses the following review comments:
(1) Detail in commit message about context in which CPU_HOT_EJECT_DATA
is inited.
(2) Add in sorted order MemoryAllocationLib in LibraryClas
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
BSP has
given the signal to exit via the "AllCpusInSync" loop.
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
---
Notes:
Address th
. This is used by
EjectCpu() to identify CPUs marked for ejection.
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
---
Notes:
Address these review
unplugged and mark them for removal in SMM
data structures.
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
---
Notes:
Addresses these review
://bugzilla.tianocore.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
Notes:
Addresses the following review comments in v6:
(1) Dropped modifications to LibraryClasses in OvmfPkg.dec
(2,3) Cleanup comments around PCD PcdCpuHotEjectDataAddress.
(4) Move PCD PcdCpuHotEjectDataAddress
here:
https://lore.kernel.org/qemu-devel/20201204170939.1815522-3-imamm...@redhat.com/
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
---
://bugzilla.tianocore.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
Notes:
Address this review comment:
() Move QemuCpuhpWriteCpuStatus() (declaration and definition) between
QemuCpuhpWriteCpuSelector() and QemuCpuhpWriteCommand() to match
the order of the register descriptions in
/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
Reviewed-by: Laszlo Ersek
---
Notes:
Addresses these review comments from v6:
(1) s/EFI_ERROR(/EFI_ERROR (/
(2) Remove the empty line in the comment block above
ProcessHotAddedCpus().
() Nest the EFI_ERROR handling inside the
ar...@oracle.com/
RFC:
URL:
https://patchew.org/EDK2/20201208053432.2690694-1-ankur.a.ar...@oracle.com/
Please review.
Thanks
Ankur
Ankur Arora (10):
OvmfPkg/CpuHotplugSmm: refactor hotplug logic
OvmfPkg/CpuHotplugSmm: collect hot-unplug events
OvmfPkg/CpuHotplugSmm: add Qemu Cpu Status
On 2021-02-19 2:12 p.m., Laszlo Ersek wrote:
Hi Ankur,
On 02/19/21 10:04, Ankur Arora wrote:
Hi,
This series adds OVMF support for CPU hot-unplug.
QEMU secureboot hot-unplug logic corresponding to this is in upstream.
Also posted here:
https://lore.kernel.org/qemu-devel
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
()
URL:
https://patchew.org/EDK2/20210107195515.106158-1-ankur.a.ar...@oracle.com/
RFC:
URL:
https://patchew.org/EDK2/20201208053432.2690694-1-ankur.a.ar...@oracle.com/
Please review.
Thanks
Ankur
Ankur Arora (10):
OvmfPkg/CpuHotplugSmm: refactor hotplug logic
OvmfPkg/CpuHotplugSmm: co
here:
https://lore.kernel.org/qemu-devel/20201204170939.1815522-3-imamm...@redhat.com/
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
---
.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
Notes:
Addresses the following reviewing comments from v6:
(1) s/CpuEject/EjectCpu/g
(2,2a,2c) Get rid of eject-worker and related.
(2b,2d) Use the PlatformSmmBspElection() logic to find out IsBSP.
(3,3b) Use CPU_HOT_EJEC
. This is used by
EjectCpu() to identify CPUs marked for ejection.
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
---
Notes:
Address these review
BSP has
given the signal to exit via the "AllCpusInSync" loop.
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
---
Notes:
Address th
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
Notes:
Addresses the following review comments:
(1) Detail in commit message about context in which CPU_HOT_EJECT_DATA
is inited.
(2) Add in sorted order MemoryAllocationLib in LibraryClas
unplugged and mark them for removal in SMM
data structures.
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
---
Notes:
Addresses these review
://bugzilla.tianocore.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
Notes:
Addresses the following review comments in v6:
(1) Dropped modifications to LibraryClasses in OvmfPkg.dec
(2,3) Cleanup comments around PCD PcdCpuHotEjectDataAddress.
(4) Move PCD PcdCpuHotEjectDataAddress
://bugzilla.tianocore.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
Notes:
Address this review comment:
() Move QemuCpuhpWriteCpuStatus() (declaration and definition) between
QemuCpuhpWriteCpuSelector() and QemuCpuhpWriteCommand() to match
the order of the register descriptions in
/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
Reviewed-by: Laszlo Ersek
---
Notes:
Addresses these review comments from v6:
(1) s/EFI_ERROR(/EFI_ERROR (/
(2) Remove the empty line in the comment block above
ProcessHotAddedCpus().
() Nest the EFI_ERROR handling inside the
On 2021-02-05 8:06 a.m., Laszlo Ersek wrote:
Hi Ankur,
I figure it's prudent for me to follow up here too:
On 02/04/21 03:49, Ankur Arora wrote:
On 2021-02-03 12:58 p.m., Laszlo Ersek wrote:
On 02/03/21 07:45, Ankur Arora wrote:
On 2021-02-02 6:15 a.m., Laszlo Ersek wrote:
On 02/02/
On 2021-02-03 12:45 p.m., Laszlo Ersek wrote:
On 02/03/21 06:46, Ankur Arora wrote:
On 2021-02-01 9:37 a.m., Laszlo Ersek wrote:
(6) Please drop this hunk. We don't try to be smarter than QEMU, in
general, whenever we perform feature negotiation.
Also, AFAICS, we will do the hotplug
On 2021-02-03 12:36 p.m., Laszlo Ersek wrote:
On 02/03/21 06:20, Ankur Arora wrote:
Just as a sidenote, I do see two copies of the mCpuHotEjectData in
the PiSmmCpuSmm and CpuHotplugSmm maps (which makes sense, given
that both include SmmCpuFeaturesLib):
.bss.mCpuHotEjectData
On 2021-02-03 12:55 p.m., Laszlo Ersek wrote:
On 02/03/21 07:13, Ankur Arora wrote:
On 2021-02-02 6:00 a.m., Laszlo Ersek wrote:
On 02/01/21 21:12, Ankur Arora wrote:
On 2021-02-01 11:08 a.m., Laszlo Ersek wrote:
(16) This function uses a data structure for communication between BSP
and
On 2021-02-03 12:58 p.m., Laszlo Ersek wrote:
On 02/03/21 07:45, Ankur Arora wrote:
On 2021-02-02 6:15 a.m., Laszlo Ersek wrote:
On 02/02/21 15:00, Laszlo Ersek wrote:
... I guess that volatile-qualifying both CPU_HOT_EJECT_DATA, and the
array pointed-to by CPU_HOT_EJECT_DATA.ApicIdMap
On 2021-02-02 6:15 a.m., Laszlo Ersek wrote:
On 02/02/21 15:00, Laszlo Ersek wrote:
... I guess that volatile-qualifying both CPU_HOT_EJECT_DATA, and the
array pointed-to by CPU_HOT_EJECT_DATA.ApicIdMap, should suffice. In
combination with the sync-up point that you quoted. This seems to match
On 2021-02-02 6:00 a.m., Laszlo Ersek wrote:
On 02/01/21 21:12, Ankur Arora wrote:
On 2021-02-01 11:08 a.m., Laszlo Ersek wrote:
apologies, I've got more comments here:
On 01/29/21 01:59, Ankur Arora wrote:
/**
+ CPU Hot-eject handler, called from SmmCpuFeaturesRendezvousExit(),
On 2021-02-01 9:37 a.m., Laszlo Ersek wrote:
On 01/29/21 01:59, Ankur Arora wrote:
As part of the negotiation treat ICH9_LPC_SMI_F_CPU_HOT_UNPLUG as a
subfeature of feature flag ICH9_LPC_SMI_F_CPU_HOTPLUG, so enable it
only if the other is also being negotiated.
Cc: Laszlo Ersek
Cc: Jordan
On 2021-02-02 5:23 a.m., Laszlo Ersek wrote:
On 02/01/21 20:21, Ankur Arora wrote:
On 2021-02-01 9:22 a.m., Laszlo Ersek wrote:
On 01/29/21 01:59, Ankur Arora wrote:
Designate a worker CPU (we use the one executing the root MMI
handler), which will do the actual ejection via QEMU in CpuEject
On 2021-02-01 5:36 a.m., Laszlo Ersek wrote:
On 01/29/21 01:59, Ankur Arora wrote:
Init CPU_HOT_EJECT_DATA, which will be used to share CPU ejection state
between SmmCpuFeaturesLib (via PiSmmCpuDxeSmm) and CpuHotPlugSmm.
CpuHotplugSmm also sets up the CPU ejection mechanism via
On 2021-01-31 7:13 p.m., Laszlo Ersek wrote:
On 01/29/21 01:59, Ankur Arora wrote:
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
On 2021-01-29 5:15 p.m., Laszlo Ersek wrote:
On 01/29/21 01:59, Ankur Arora wrote:
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
On 2021-01-31 8:53 p.m., Laszlo Ersek wrote:
On 01/29/21 01:59, Ankur Arora wrote:
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
On 2021-01-29 6:36 p.m., Laszlo Ersek wrote:
On 01/29/21 01:59, Ankur Arora wrote:
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
On 2021-01-29 6:18 p.m., Laszlo Ersek wrote:
On 01/29/21 01:59, Ankur Arora wrote:
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
On 2021-02-01 11:08 a.m., Laszlo Ersek wrote:
apologies, I've got more comments here:
On 01/29/21 01:59, Ankur Arora wrote:
/**
+ CPU Hot-eject handler, called from SmmCpuFeaturesRendezvousExit(),
+ on each CPU at exit from SMM.
+
+ If, the executing CPU is not being ejected, nothi
On 2021-02-01 9:22 a.m., Laszlo Ersek wrote:
On 01/29/21 01:59, Ankur Arora wrote:
Designate a worker CPU (we use the one executing the root MMI
handler), which will do the actual ejection via QEMU in CpuEject().
CpuEject(), on the worker CPU, ejects each marked CPU by first
selecting its APIC
: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
OvmfPkg/SmmControl2Dxe/SmiFeatures.c | 25 ++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/OvmfPkg/SmmControl2Dxe/SmiFeatures.c
b/OvmfPkg/SmmControl2Dxe/SmiFeatures.c
unplugged and mark them for removal in SMM
data structures.
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
---
OvmfPkg/CpuHotplugSmm/CpuHotplug.c | 84
e.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
Notes:
I'm treating events (insert=1, fw_remove=1) below as invalid (return
EFI_PROTOCOL_ERROR, which ends up as an assert), but I'm not sure
that is correct:
if ((CpuStatus & QEMU_CPUH
-ankur.a.ar...@oracle.com/
v2:
- Do the ejection via SmmCpuFeaturesRendezvousExit()
URL:
https://patchew.org/EDK2/20210107195515.106158-1-ankur.a.ar...@oracle.com/
RFC:
URL:
https://patchew.org/EDK2/20201208053432.2690694-1-ankur.a.ar...@oracle.com/
Please review.
Thanks
Ankur
Ankur Arora (9)
ess.
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
---
.../SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf| 3 +
.../Library/SmmCpuFeatures
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
OvmfPkg/CpuHotplugSmm/CpuHotplug.c | 73 ++
1 file changed, 67 insertions(+), 6 deletions(-)
diff --git a/OvmfPkg/CpuHotplugSmm/CpuHotplug.c
b/OvmfPkg/CpuHotplugSmm/CpuHotpl
by CpuEject()
to identify such CPUs.
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
---
OvmfPkg/CpuHotplugSmm/CpuHotplug.c | 109
://bugzilla.tianocore.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
OvmfPkg/OvmfPkg.dec | 10 +
OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf | 1 +
OvmfPkg/Include/Library/CpuHotEjectData.h | 35 +++
3 files changed, 46 insertions(+)
create
://bugzilla.tianocore.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
OvmfPkg/CpuHotplugSmm/QemuCpuhp.h | 6 ++
OvmfPkg/CpuHotplugSmm/QemuCpuhp.c | 22 ++
2 files changed, 28 insertions(+)
diff --git a/OvmfPkg/CpuHotplugSmm/QemuCpuhp.h
b/OvmfPkg/CpuHotplugSmm/QemuCpuhp.h
index
/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
Notes:
> + if (EFI_ERROR(Status)) {
> +goto Fatal;
>}
(13) Without having seen the rest of the patches, I think this error
check should be nested under the same (PluggedCount > 0) condition; in
ot
On 2021-01-26 1:32 p.m., Laszlo Ersek wrote:
On 01/26/21 22:17, Ankur Arora wrote:
On 2021-01-26 1:07 p.m., Laszlo Ersek wrote:
On 01/26/21 20:15, Ankur Arora wrote:
On 2021-01-26 11:01 a.m., Laszlo Ersek wrote:
I'll continue the review later this week.
Acking the comments above.
On 2021-01-26 1:07 p.m., Laszlo Ersek wrote:
On 01/26/21 20:15, Ankur Arora wrote:
On 2021-01-26 11:01 a.m., Laszlo Ersek wrote:
I'll continue the review later this week.
Acking the comments above.
Thank you!
Meanwhile let me reprocess the series in light of the comments above.
On 2021-01-26 10:03 a.m., Laszlo Ersek wrote:
Hi Ankur,
On 01/26/21 07:44, Ankur Arora wrote:
Hi,
This series adds support for CPU hot-unplug with OVMF.
Please see this in conjunction with the QEMU secureboot hot-unplug v2
series posted here (now upstreamed):
https://lore.kernel.org/qemu
On 2021-01-26 11:01 a.m., Laszlo Ersek wrote:
On 01/26/21 07:44, Ankur Arora wrote:
Refactor CpuHotplugMmi() to pull out the CPU hotplug logic into
PlugCpus(). This is in preparation for supporting CPU hot-unplug.
Cc: Laszlo Ersek
Cc: Jordan Justen
Cc: Ard Biesheuvel
Cc: Igor Mammedov
Cc
: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
OvmfPkg/SmmControl2Dxe/SmiFeatures.c | 25 ++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/OvmfPkg/SmmControl2Dxe/SmiFeatures.c
b/OvmfPkg/SmmControl2Dxe/SmiFeatures.c
by
CpuEject() to identify such CPUs.
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
---
OvmfPkg/CpuHotplugSmm/CpuHotplug.c | 94
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
OvmfPkg/CpuHotplugSmm/CpuHotplug.c | 73 ++
1 file changed, 67 insertions(+), 6 deletions(-)
diff --git a/OvmfPkg/CpuHotplugSmm/CpuHotplug.c
b/OvmfPkg/CpuHotplugSmm/CpuHotpl
ess.
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
---
.../SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf| 3 +
.../Library/SmmCpuFeatures
://bugzilla.tianocore.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
OvmfPkg/OvmfPkg.dec | 10 ++
OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf | 1 +
OvmfPkg/Include/Library/CpuHotEjectData.h | 32 +++
3 files changed, 43 insertions(+)
create
://bugzilla.tianocore.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
OvmfPkg/CpuHotplugSmm/QemuCpuhp.h | 6 ++
OvmfPkg/CpuHotplugSmm/QemuCpuhp.c | 22 ++
2 files changed, 28 insertions(+)
diff --git a/OvmfPkg/CpuHotplugSmm/QemuCpuhp.h
b/OvmfPkg/CpuHotplugSmm/QemuCpuhp.h
index
unplugged and mark them for removal in SMM
data structures.
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
---
OvmfPkg/CpuHotplugSmm/CpuHotplug.c | 77
=3132
Signed-off-by: Ankur Arora
---
OvmfPkg/CpuHotplugSmm/CpuHotplug.c | 208 ++---
1 file changed, 123 insertions(+), 85 deletions(-)
diff --git a/OvmfPkg/CpuHotplugSmm/CpuHotplug.c
b/OvmfPkg/CpuHotplugSmm/CpuHotplug.c
index cfe698ed2b5e..a5052a501e5a 100644
--- a
e.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora
---
OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h | 2 ++
OvmfPkg/CpuHotplugSmm/QemuCpuhp.c | 35 +--
2 files changed, 29 insertions(+), 8 deletions(-)
diff --git a/OvmfPkg/Include/IndustryStandard/QemuCpuHotp
5074533.277448-1-ankur.a.ar...@oracle.com/
v2:
- Do the ejection via SmmCpuFeaturesRendezvousExit()
URL:
https://patchew.org/EDK2/20210107195515.106158-1-ankur.a.ar...@oracle.com/
RFC:
URL:
https://patchew.org/EDK2/20201208053432.2690694-1-ankur.a.ar...@oracle.com/
Please review.
Th
On 2021-01-21 11:51 a.m., Laszlo Ersek wrote:
On 01/21/21 20:11, Ankur Arora wrote:
On 2021-01-21 4:29 a.m., Laszlo Ersek wrote:
For catching such issues early on, please run "PatchCheck.py" before
posting, e.g. as in:
$ python3 BaseTools/Scripts/PatchCheck.py master..topic_branc
On 2021-01-21 4:29 a.m., Laszlo Ersek wrote:
Hi Ankur,
On 01/18/21 19:35, Ankur Arora wrote:
On 2021-01-18 9:09 a.m., Laszlo Ersek wrote:
On 01/18/21 07:34, Ankur Arora wrote:
Hi,
This series adds support for CPU hot-unplug with OVMF.
Please see this in conjunction with the QEMU secureboot
92 matches
Mail list logo