From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79]) by mx.groups.io with SMTP id smtpd.web12.528.1610994939756850036 for ; Mon, 18 Jan 2021 10:35:39 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=mboAwoBD; spf=pass (domain: oracle.com, ip: 141.146.126.79, mailfrom: ankur.a.arora@oracle.com) Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10IIEOD6067283; Mon, 18 Jan 2021 18:35:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=MzPhfhQZueymfjmP4qjH41KLK2gmovfNxNenAzjKuec=; b=mboAwoBD7i36hnh0mvNtdTeiiw9r+tlHewkuSZXz13flaTHFE0XzPDdzuvMqUfSfjIDt +Sxos7ZTZmFDD7px99CESyDA0AMn+m1E9vdRxIwhWwk0HCBNUFGs9ru8Xc4n4TEB28LM X8jddZxZjAlP1gBjQkkahJdpvyqNjDYnBIjxjrqVWdGRukmrsePJVN01ZLyDS06fVgVL iMGSoN2d5F0fE7g4ctOEzojgcZHbwjquDEB2/5uGUiOs6aqx3DeDZlWpXggzMVLfHIT/ TYFzEq+g12sFjOHhX3tudWVLYymnmbXLbbmDWAKnZmiPgKOKW3kg0hg5n5HmlQn2onT1 TQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2130.oracle.com with ESMTP id 363nnaeff8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 18 Jan 2021 18:35:38 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10IIH9qP165394; Mon, 18 Jan 2021 18:35:38 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 3649wqbmjf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 18 Jan 2021 18:35:36 +0000 Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 10IIZ2e6011859; Mon, 18 Jan 2021 18:35:02 GMT Received: from [192.168.0.108] (/70.36.60.91) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 18 Jan 2021 10:35:02 -0800 Subject: Re: [edk2-devel] [PATCH v4 0/9] support CPU hot-unplug To: Laszlo Ersek , devel@edk2.groups.io Cc: imammedo@redhat.com, boris.ostrovsky@oracle.com References: <20210118063457.358581-1-ankur.a.arora@oracle.com> From: "Ankur Arora" Message-ID: <5d932166-9413-d195-230f-8d7c9a70aa2e@oracle.com> Date: Mon, 18 Jan 2021 10:35:00 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9868 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 mlxlogscore=999 bulkscore=0 spamscore=0 phishscore=0 malwarescore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101180111 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9868 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 impostorscore=0 spamscore=0 mlxlogscore=999 clxscore=1015 bulkscore=0 adultscore=0 lowpriorityscore=0 suspectscore=0 phishscore=0 mlxscore=0 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101180111 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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 hot-unplug v2 >> series posted here (now upstreamed): >> https://lore.kernel.org/qemu-devel/20201207140739.3829993-1-imammedo@redhat.com/ >> >> Patches 1 and 3, >> ("OvmfPkg/CpuHotplugSmm: refactor hotplug logic") >> ("OvmfPkg/CpuHotplugSmm: add Qemu Cpu Status helper") >> are either refactors or add support functions. >> >> OvmfPkg/CpuHotplugSmm: introduce UnplugCpus() >> OvmfPkg/CpuHotplugSmm: add CpuEject() >> OvmfPkg/CpuHotplugSmm: add worker to do CPU ejection >> >> Patch 2 and 9, >> ("OvmfPkg/CpuHotplugSmm: collect hot-unplug events") >> ("OvmfPkg/SmmControl2Dxe: negotiate CPU hot-unplug") >> handle the QEMU protocol logic for collection of CPU hot-unplug events >> or the protocol negotiation. >> >> Patch 4, >> ("OvmfPkg/CpuHotplugSmm: introduce UnplugCpus()") >> adds the MMI logic for CPU hot-unplug handling and informing >> the PiSmmCpuDxeSmm of CPU removal. >> >> Patches 5 and 6, >> ("OvmfPkg/CpuHotplugSmm: define CPU_HOT_EJECT_DATA") >> ("OvmfPkg/SmmCpuFeaturesLib: init CPU ejection state") >> sets up state for doing the CPU ejection as part of hot-unplug. >> >> Patches 7, and 8, >> ("OvmfPkg/CpuHotplugSmm: introduce UnplugCpus()") >> ("OvmfPkg/CpuHotplugSmm: add worker to do CPU ejection") >> add the CPU ejection logic. >> >> Testing (with QEMU 5.2.50): >> - Stable with randomized CPU plug/unplug (guest maxcpus=1,8,128) >> - Synthetic tests with simultaneous multi CPU hot-unplug >> - Negotiation with/without CPU hotplug enabled >> >> Also at: >> github.com/terminus/edk2/ hot-unplug-v4 >> >> Changelog: >> v4: >> - Gets rid of unnecessary UefiCpuPkg changes >> >> v3: >> - Use a saner PCD based interface to share state between PiSmmCpuDxeSmm >> and OvmfPkg/CpuHotplugSmm >> - Cleaner split of the hot-unplug code >> URL: https://patchew.org/EDK2/20210115074533.277448-1-ankur.a.arora@oracle.com/ >> >> v2: >> - Do the ejection via SmmCpuFeaturesRendezvousExit() >> URL: https://patchew.org/EDK2/20210107195515.106158-1-ankur.a.arora@oracle.com/ >> >> RFC: >> URL: https://patchew.org/EDK2/20201208053432.2690694-1-ankur.a.arora@oracle.com/ >> >> >> Please review. > > I've got this series in my review queue (confirming). > > I'd like to finish review on the > series first, > since that's what I've got mostly in my mind at this point. > > I hope to start reviewing the unplug series in a few days. Sounds good. Thanks. Ankur > > Thanks > Laszlo > >> >> Thanks >> Ankur >> >> Ankur Arora (9): >> OvmfPkg/CpuHotplugSmm: refactor hotplug logic >> OvmfPkg/CpuHotplugSmm: collect hot-unplug events >> OvmfPkg/CpuHotplugSmm: add Qemu Cpu Status helper >> OvmfPkg/CpuHotplugSmm: introduce UnplugCpus() >> OvmfPkg/CpuHotplugSmm: define CPU_HOT_EJECT_DATA >> OvmfPkg/SmmCpuFeaturesLib: init CPU ejection state >> OvmfPkg/CpuHotplugSmm: add CpuEject() >> OvmfPkg/CpuHotplugSmm: add worker to do CPU ejection >> OvmfPkg/SmmControl2Dxe: negotiate CPU hot-unplug >> >> OvmfPkg/CpuHotplugSmm/CpuHotplug.c | 435 ++++++++++++++++----- >> OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf | 1 + >> OvmfPkg/CpuHotplugSmm/QemuCpuhp.c | 58 ++- >> OvmfPkg/CpuHotplugSmm/QemuCpuhp.h | 6 + >> OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h | 2 + >> OvmfPkg/Include/Library/CpuHotEjectData.h | 31 ++ >> .../Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c | 62 +++ >> .../SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf | 3 + >> OvmfPkg/OvmfPkg.dec | 6 + >> OvmfPkg/SmmControl2Dxe/SmiFeatures.c | 25 +- >> 10 files changed, 527 insertions(+), 102 deletions(-) >> create mode 100644 OvmfPkg/Include/Library/CpuHotEjectData.h >> >