From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) by mx.groups.io with SMTP id smtpd.web11.683.1613773199612547720 for ; Fri, 19 Feb 2021 14:19:59 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=Hqw10/W/; spf=pass (domain: oracle.com, ip: 141.146.126.78, mailfrom: ankur.a.arora@oracle.com) Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 11JMJwiQ035267; Fri, 19 Feb 2021 22:19:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2020-01-29; bh=9gmMv6bXlfrFwtqtrM1oPoN89YUMKHdOJJ28fMevf0w=; b=Hqw10/W/U51Dx3aNIacgufgCeX1WMWx26cnE87nYeygzXjJn1zFAjuYovnw2CopIALY2 AdhY4yTuUHd+Lf4k9x+D+J5Mg9eUeQ0rslcv+Wct/RglNY6nEKWioQJIcM1/J8RUzqR2 ovBMItkOM8Y6+xqiLfI6MZECcDEtyh2v5Bm5cg7J9dl91z6+cmc2tRROJ1xGMFbEGP29 tZyWIKafFuhQhFw7y3EsTxap7jLwT5n8XONxlbC2OuRxFVdnalhqcJLUzlbzxvP1MOd5 Tt820HDn7FoVm668LUcc/Wk+Sahiqd/7HpgNf/+KF2fGWTKxplTnW2ClQpcVaHUYNwbf dA== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 36pd9ajfjh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 19 Feb 2021 22:19:58 +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 11JMJo7T144591; Fri, 19 Feb 2021 22:19:57 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2176.outbound.protection.outlook.com [104.47.58.176]) by userp3020.oracle.com with ESMTP id 36prhw6m8s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 19 Feb 2021 22:19:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yh50qbnGnkSquAZVAaS7oSJRhdn5NLLTE11IwITOSwgZyyeIQdOGti0IU+xon6Ej3twaj7I2S3uO9QsMMtGHtoQD7cVPRR9rEPC0gv1nxel9KuZDTPVh3vza50K7RH0vLehfpeEz1qVH7+znV2J6i0Tzj2QD+iL/SL9+vFu4bhO3KslniwNIc58Ots0z97mN5TgBCn8Vsg97G1qrr4ybqCIv06UVAphfwtpdTb7jTFAF5ErwGQBdDnzlF7yLDPl3d6Kz8h6RRMQvMlHojc+3HpZMQHEuEZ9tWu6qJyu4WMizybJD249aOcBRc6mxCRam2gep+5uOLkm1UW/rpX/L1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9gmMv6bXlfrFwtqtrM1oPoN89YUMKHdOJJ28fMevf0w=; b=FSagVzrJR+KG+uZLRP4nYpdAjrwzl5peqM+AxCqHCwdBMrKaGVGiiMEYOdbf0ODLLhiDYO22LX1LouQdVsZwFcej3jVWdVXsS2EO2OFjO0AC30IrEIxaAb7ltl17txw/fneTTaWxFSTBBRR6p+rcDMiFALR9SEZBgTm8N88d3thLodTLwOHALzso8/Ib6i0eO2Jv8OQZu0sDhAoqkOiBdu81cmlod61P0qIn+ugnJzM8DDoD1FSdjgI1UUE+8+HsDjIJnbPoQshXuweGfOLE44vt7kk+14E1H0RC3JoxLoXDCrfyHmYjQT5b3z78zIT0bsYBRuLPJQAlzLd/6rOWKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9gmMv6bXlfrFwtqtrM1oPoN89YUMKHdOJJ28fMevf0w=; b=sPmt/6UwkDR39iRSNtEDIvoi6OQ6AjuMJxSjMp5h4bEOGTVYOMauhsT3YWFgqvC5NwpAWRK9ile2D86nK6tWNmlawSPXjmxCFB8N5a8+MRLBxRlFIKE6qiYPStddDLyrR/TdDgY5W7C7rWe/P1i3GscZPsqd5W8dVjfMHTWru6Y= Received: from SJ0PR10MB4605.namprd10.prod.outlook.com (2603:10b6:a03:2d9::24) by SJ0PR10MB4656.namprd10.prod.outlook.com (2603:10b6:a03:2d1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.31; Fri, 19 Feb 2021 22:19:54 +0000 Received: from SJ0PR10MB4605.namprd10.prod.outlook.com ([fe80::a021:790:7ce6:6f16]) by SJ0PR10MB4605.namprd10.prod.outlook.com ([fe80::a021:790:7ce6:6f16%6]) with mapi id 15.20.3868.029; Fri, 19 Feb 2021 22:19:54 +0000 Subject: Re: [edk2-devel] [PATCH v7 00/10] support CPU hot-unplug To: Laszlo Ersek , devel@edk2.groups.io Cc: imammedo@redhat.com, boris.ostrovsky@oracle.com References: <20210219090444.1332380-1-ankur.a.arora@oracle.com> From: "Ankur Arora" Message-ID: <80297fa9-5767-faf6-07fc-1c4be8728327@oracle.com> Date: Fri, 19 Feb 2021 14:19:50 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 In-Reply-To: X-Originating-IP: [148.87.23.11] X-ClientProxiedBy: MW4PR04CA0112.namprd04.prod.outlook.com (2603:10b6:303:83::27) To SJ0PR10MB4605.namprd10.prod.outlook.com (2603:10b6:a03:2d9::24) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.0.108] (148.87.23.11) by MW4PR04CA0112.namprd04.prod.outlook.com (2603:10b6:303:83::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.28 via Frontend Transport; Fri, 19 Feb 2021 22:19:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 99bfc078-39e3-481e-eb29-08d8d5247bca X-MS-TrafficTypeDiagnostic: SJ0PR10MB4656: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UAfOPWaxl96S7IrankVhsIDy4k/8T92wnYZDx0xJVL3f2C1Eay9WMNxMMh/ELY24t84S/cR4D6L2SZOmDwM0nnhQvY6z2rzTwodIjD+dgMx5k3huANfijXP2sQ6IpT+DL52bq4E9Bk/pgSqGRBI0if3p8t2sQCmtLHXU0r7NiPIKFTJn9C6Ds1JJievf6dEzBzQ3M2eXHDZ2T/Aj84QUXklxgXTk8JyneTdvE3SDuepYswsh1hk8+fgd6ewUSoycn+ehlVJ+r0j2Y0Z4xlVwrk6RVZR6xk5tMViIfKQUX1+WuLqM/QVSmrl1K7HKgiikqOFaD6lHaDjFKW1IVf+2Rvc3ez9uJebFkq8vgiWHOhCsUkb64btsyvtPBlQKCTnlmhvmJCS6PRU+DiqIY9eqOyiXxJTvG45G1iJ74gm9HdomwA6dsYABTAlTJd2XDi8oO/usF+AN2d/JNiHoNFH0J3JfX8TSSYmlSX5YqWUk+6CIXJ+ZM2BR0/WKhuQo6len7pk73fH7p7uk4rgWKXh9Kkzhv0O3Quw2bLgcccf9dCT8vZb6DzMlNb/iAJHuCxHlPZzNS0/sEyhKo5wafOhA0olEl5v9Mh40axtuvSuukSYX4FvMVwmfa+N35pyux/0y65UruNd7ijzrpwv6Io3USs+E0OilBT6HqGIhr99Lq1WhZPviuipgMSYBhMQaeLwc X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR10MB4605.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(396003)(39860400002)(376002)(346002)(136003)(366004)(66946007)(31696002)(66476007)(83380400001)(31686004)(8676002)(66556008)(6486002)(16576012)(36756003)(316002)(86362001)(5660300002)(2616005)(2906002)(26005)(956004)(16526019)(107886003)(478600001)(966005)(8936002)(186003)(53546011)(19627235002)(4326008)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?Vys1eURGUEx4MmJsczZ0dkhXQys3eGtWVkEzNnVmZUhuaW8zWWVEQmdvUHFn?= =?utf-8?B?WDNyVTRtR254UFVqbTJlVmRMdUg0aDNRZjQxMWxxdWlQT3dobk1tSGgzVTBU?= =?utf-8?B?UCtvRnJGa29vL1BwbEtwRmxZbjhSVkI0U240KzU3WmxkVzM2dWF6cW9yVXNE?= =?utf-8?B?azlFRDFuYnRlQUxpdEdFcGJVdDhDK2xOdHJsOHJ6NVVKWHdvMUY2WHpmZXBs?= =?utf-8?B?eHY4aVlMUm4yWk1rVFVkVU0vdVlRTk9tWDNtbER0TkMveHdHZVpQaGFoakdJ?= =?utf-8?B?QmQrQWtkUFJzVEVCbGtMR0VuemVHNHhEYzJDbEtjUFh3TWk4U2U2bTRNWkZn?= =?utf-8?B?djZDWC9yOURERUY4L09PaWFVbm1rTXFHa3lyWUQxLy9URFNWenVkNUJNeHJ4?= =?utf-8?B?MWZwTkVNMGtYNEJCUnBuL0lHUG83am5td252SmxCb1VSTzV6cTFzSHBK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ejdYZXZLYVln?= =?utf-8?B?dTFVUVREOGlzV3lpRldGWFk1ZEE5V29WWXpPbGpxM0tSb0k0ZXpTQ2lHN2Zn?= =?utf-8?B?cXhnTGtmUUEvWnJwc1RldkR4TDBmaTY0K01mRm1HQ2dBc21SME9ON04zQkx0?= =?utf-8?B?eGd0WTdpOXJZeG8vNmQxTnBSZTJGcUZ3NWVKR0hhbnJoMFprV3JlQ0hZQVln?= =?utf-8?B?TitWZXFJajRDN3dlYXowQWdaeHhFUmlQYnlTZDRzeTM0cWVuYXY4WnJNaHJ1?= =?utf-8?B?MHE2bm9BV0FnMXNCZ2h5OUY4c1RrQXZiZU9CbWsvb1phVW1qYXB4QWhDam9s?= =?utf-8?B?V1p3NVZVSzhqTXdGODdwcXVJcHRQQmI3a0pXSURxa3k5TjRGaWNlZ2RMM09Z?= =?utf-8?Q?+xzg/Oi8mP1eDC1Ib1IXpELY+vr2SQrbjh11Z8S?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99bfc078-39e3-481e-eb29-08d8d5247bca X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB4605.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Feb 2021 22:19:54.6365 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jaosBBhwolH23WwGhwtsFvkW/MJom2rlcMZ6xu4eLMQeA0MP6VVpu8vq4wpI0SYh5d3eAvsg6RoO0vwsjHtUqVWEfb3luJayBEMFOjfgT+0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB4656 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9900 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 adultscore=0 mlxscore=0 bulkscore=0 suspectscore=0 malwarescore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102190179 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9900 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 clxscore=1015 impostorscore=0 mlxscore=0 phishscore=0 mlxlogscore=999 spamscore=0 bulkscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102190179 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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/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-v7 >> >> Changelog: >> >> v7: >> - Address review comments from v6. >> - Fix ejection bug where we were using APIC ID to do the ejection >> rather than the Qemu Selector. >> - Describes safety properties and ordering needed for concurrent >> accesses to CPU_HOT_EJECT_DATA->QemuSelectorMap, and >> CPU_HOT_EJECT_DATA->Handler, > > I plan to review this series early next week. Thanks. > This work is now going to miss the upcoming stable tag (soft feature > freeze is 2021-02-22 00:00:00 UTC-8), but we can hopefully merge it > early in the next development cycle. Yeah, I did get a little late with v7. > > Meanwhile, based on my github notifications folder, I believe you may > not have put this version of the series through CI -- if that's correct, > then please consider doing it. I hadn't. Will do. Thanks Ankur > > Thanks! > Laszlo > >> >> v6: >> - addresses v5 review comments. >> URL: https://patchew.org/EDK2/20210129005950.467638-1-ankur.a.arora@oracle.com/ >> >> v5: >> - fixes ECC errors (all but one in "OvmfPkg/CpuHotplugSmm: add >> add Qemu Cpu Status helper"). >> URL: https://patchew.org/EDK2/20210126064440.299596-1-ankur.a.arora@oracle.com/ >> >> v4: >> - Gets rid of unnecessary UefiCpuPkg changes >> URL: https://patchew.org/EDK2/20210118063457.358581-1-ankur.a.arora@oracle.com/ >> >> 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. >> >> Thanks >> Ankur >> >> Ankur Arora (10): >> 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/SmmCpuFeaturesLib: call CPU hot-eject handler >> OvmfPkg/CpuHotplugSmm: add EjectCpu() >> OvmfPkg/CpuHotplugSmm: do actual CPU hot-eject >> OvmfPkg/SmmControl2Dxe: negotiate CPU hot-unplug >> >> OvmfPkg/OvmfPkg.dec | 4 + >> OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf | 2 + >> .../SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf | 4 + >> OvmfPkg/CpuHotplugSmm/QemuCpuhp.h | 7 + >> OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h | 2 + >> OvmfPkg/Include/Pcd/CpuHotEjectData.h | 52 ++ >> OvmfPkg/CpuHotplugSmm/CpuHotplug.c | 578 +++++++++++++++++---- >> OvmfPkg/CpuHotplugSmm/QemuCpuhp.c | 106 +++- >> .../Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c | 136 +++++ >> OvmfPkg/SmmControl2Dxe/SmiFeatures.c | 18 +- >> 10 files changed, 789 insertions(+), 120 deletions(-) >> create mode 100644 OvmfPkg/Include/Pcd/CpuHotEjectData.h >> >