public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: Ankur Arora <ankur.a.arora@oracle.com>, devel@edk2.groups.io
Cc: imammedo@redhat.com, boris.ostrovsky@oracle.com
Subject: Re: [PATCH v9 00/10] support CPU hot-unplug
Date: Tue, 16 Mar 2021 15:07:33 +0100	[thread overview]
Message-ID: <e8b275a4-6392-9280-6964-96de9815d595@redhat.com> (raw)
In-Reply-To: <20210312062656.2477515-1-ankur.a.arora@oracle.com>

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-imammedo@redhat.com/
>
> Testing (with QEMU 5.2.50):
>  - Stable with randomized CPU plug/unplug (guest maxcpus=33,128)
>  - Synthetic tests with simultaneous multi CPU hot-unplug
>
> Also at:
>   github.com/terminus/edk2/ hot-unplug-v9
>
> Changelog:
>
> v9:
>   - Rebased on top of edd46cd407ea
>   - Clarify comments around memory-barriers in patches 7, 8, 9
>   - Address other review comments from v8

Merged as commit range 4751a48aeb2a..f3bdfc41866e, via
<https://github.com/tianocore/edk2/pull/1494>, with the following R-b's
/ comments / light tweaks added:

>  1:  4b4466ed7c44 =  1:  0cb242e33693 OvmfPkg/CpuHotplugSmm: refactor hotplug logic
>  2:  719828efdebe !  2:  a752dd07466c OvmfPkg/CpuHotplugSmm: collect hot-unplug events
>     @@ -20,6 +20,7 @@
>          Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
>          Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
>          Message-Id: <20210312062656.2477515-3-ankur.a.arora@oracle.com>
>     +    Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>
>      diff --git a/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h b/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h
>      --- a/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h
>  3:  7d732efcb7af =  3:  2d92e052c3af OvmfPkg/CpuHotplugSmm: add Qemu Cpu Status helper
>  4:  64649eeeee42 =  4:  15e6ae8ea400 OvmfPkg/CpuHotplugSmm: introduce UnplugCpus()
>  5:  7190a5d134a7 !  5:  8ade9d425a6e OvmfPkg: define CPU_HOT_EJECT_DATA
>     @@ -15,6 +15,7 @@
>          Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
>          Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
>          Message-Id: <20210312062656.2477515-6-ankur.a.arora@oracle.com>
>     +    Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>
>      diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec
>      --- a/OvmfPkg/OvmfPkg.dec
>  6:  1fd019dac476 !  6:  b6d5996706dd OvmfPkg/SmmCpuFeaturesLib: init CPU ejection state
>     @@ -22,6 +22,7 @@
>          Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
>          Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
>          Message-Id: <20210312062656.2477515-7-ankur.a.arora@oracle.com>
>     +    Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>
>      diff --git a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf b/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
>      --- a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
>  7:  c8758d9b9764 !  7:  af9c77e151fa OvmfPkg/SmmCpuFeaturesLib: call CPU hot-eject handler
>     @@ -19,6 +19,7 @@
>          Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
>          Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
>          Message-Id: <20210312062656.2477515-8-ankur.a.arora@oracle.com>
>     +    Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>
>      diff --git a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c b/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c
>      --- a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c
>  8:  5ff8e8700678 !  8:  30c69d2cfa63 OvmfPkg/CpuHotplugSmm: add EjectCpu()
>     @@ -19,6 +19,7 @@
>          Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
>          Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
>          Message-Id: <20210312062656.2477515-9-ankur.a.arora@oracle.com>
>     +    Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>
>      diff --git a/OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf b/OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf
>      --- a/OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf
>  9:  d6660f8f2f14 !  9:  f05328886302 OvmfPkg/CpuHotplugSmm: do actual CPU hot-eject
>     @@ -27,6 +27,9 @@
>          Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
>          Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
>          Message-Id: <20210312062656.2477515-10-ankur.a.arora@oracle.com>
>     +    Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>     +    [lersek@redhat.com: unneeded inner QemuSelector declaration in EjectCpu()
>     +     triggers VS warning #4456 (local variable shadowed); remove it]
>
>      diff --git a/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h b/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h
>      --- a/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h
>     @@ -102,8 +105,6 @@
>      +    UINT32 Idx;
>      +
>      +    for (Idx = 0; Idx < mCpuHotEjectData->ArrayLength; Idx++) {
>     -+      UINT64 QemuSelector;
>     -+
>      +      QemuSelector = mCpuHotEjectData->QemuSelectorMap[Idx];
>      +
>      +      if (QemuSelector != CPU_EJECT_QEMU_SELECTOR_INVALID) {
> 10:  0a9a1cd40b98 ! 10:  f3bdfc41866e OvmfPkg/SmmControl2Dxe: negotiate CPU hot-unplug
>     @@ -14,6 +14,9 @@
>          Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
>          Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
>          Message-Id: <20210312062656.2477515-11-ankur.a.arora@oracle.com>
>     +    [lersek@redhat.com: preserve the empty line between the ICH9_LPC_SMI_F_*
>     +     group of macro definitions and the SCRATCH_BUFFER type definition]
>     +    Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>
>      diff --git a/OvmfPkg/SmmControl2Dxe/SmiFeatures.c b/OvmfPkg/SmmControl2Dxe/SmiFeatures.c
>      --- a/OvmfPkg/SmmControl2Dxe/SmiFeatures.c
>     @@ -22,16 +25,15 @@
>       // "etc/smi/supported-features" and "etc/smi/requested-features" fw_cfg files.
>       //
>       #define ICH9_LPC_SMI_F_CPU_HOTPLUG BIT1
>     --
>      +//
>      +// The following bit value stands for "enable CPU hot-unplug, and inject an SMI
>      +// with control value ICH9_APM_CNT_CPU_HOTPLUG upon hot-unplug", in the
>      +// "etc/smi/supported-features" and "etc/smi/requested-features" fw_cfg files.
>      +//
>      +#define ICH9_LPC_SMI_F_CPU_HOT_UNPLUG BIT2
>     +
>       //
>       // Provides a scratch buffer (allocated in EfiReservedMemoryType type memory)
>     - // for the S3 boot script fragment to write to and read from.
>      @@
>         QemuFwCfgReadBytes (sizeof mSmiFeatures, &mSmiFeatures);
>

Thanks for the contribution,
Laszlo


  parent reply	other threads:[~2021-03-16 14:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12  6:26 [PATCH v9 00/10] support CPU hot-unplug Ankur Arora
2021-03-12  6:26 ` [PATCH v9 01/10] OvmfPkg/CpuHotplugSmm: refactor hotplug logic Ankur Arora
2021-03-12  6:26 ` [PATCH v9 02/10] OvmfPkg/CpuHotplugSmm: collect hot-unplug events Ankur Arora
2021-03-16  9:56   ` [edk2-devel] " Laszlo Ersek
2021-03-12  6:26 ` [PATCH v9 03/10] OvmfPkg/CpuHotplugSmm: add Qemu Cpu Status helper Ankur Arora
2021-03-12  6:26 ` [PATCH v9 04/10] OvmfPkg/CpuHotplugSmm: introduce UnplugCpus() Ankur Arora
2021-03-12  6:26 ` [PATCH v9 05/10] OvmfPkg: define CPU_HOT_EJECT_DATA Ankur Arora
2021-03-16 10:03   ` [edk2-devel] " Laszlo Ersek
2021-03-12  6:26 ` [PATCH v9 06/10] OvmfPkg/SmmCpuFeaturesLib: init CPU ejection state Ankur Arora
2021-03-16 10:12   ` [edk2-devel] " Laszlo Ersek
2021-03-12  6:26 ` [PATCH v9 07/10] OvmfPkg/SmmCpuFeaturesLib: call CPU hot-eject handler Ankur Arora
2021-03-16 10:20   ` [edk2-devel] " Laszlo Ersek
2021-03-12  6:26 ` [PATCH v9 08/10] OvmfPkg/CpuHotplugSmm: add EjectCpu() Ankur Arora
2021-03-16 10:35   ` [edk2-devel] " Laszlo Ersek
2021-03-12  6:26 ` [PATCH v9 09/10] OvmfPkg/CpuHotplugSmm: do actual CPU hot-eject Ankur Arora
2021-03-16 11:27   ` [edk2-devel] " Laszlo Ersek
2021-03-16 12:52   ` Laszlo Ersek
2021-03-12  6:26 ` [PATCH v9 10/10] OvmfPkg/SmmControl2Dxe: negotiate CPU hot-unplug Ankur Arora
2021-03-16 11:40   ` [edk2-devel] " Laszlo Ersek
2021-03-16 14:07 ` Laszlo Ersek [this message]
2021-03-16 17:56   ` [PATCH v9 00/10] support " Ankur Arora

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e8b275a4-6392-9280-6964-96de9815d595@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox