From nobody Thu Nov 14 16:58:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+70764+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+70764+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=oracle.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 161164350912868.453361888691; Mon, 25 Jan 2021 22:45:09 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id l1qIYY1788612xTmRn6aIVGf; Mon, 25 Jan 2021 22:45:08 -0800 X-Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) by mx.groups.io with SMTP id smtpd.web12.8816.1611643503257729971 for ; Mon, 25 Jan 2021 22:45:03 -0800 X-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10Q6Z238054252; Tue, 26 Jan 2021 06:44:59 GMT X-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 368b7qrnuh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Jan 2021 06:44:59 +0000 X-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10Q6a686097113; Tue, 26 Jan 2021 06:44:59 GMT X-Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2177.outbound.protection.outlook.com [104.47.59.177]) by userp3030.oracle.com with ESMTP id 368wqw1qcn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Jan 2021 06:44:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V4Cyc0J4mUNMerKfeCLzQLRA7pJ8doppWvAn5BGsuPNSZfC2kFyQ3FDQzHUjV0XyLGQtoyW470fPvnOqCmZtktGi3x1E1TGyPFhbFFCEiTV3kelG1DKfb9y7Fy/oq7S+ljL3tvVkJP99kWJArPyajUBzjOT+LQY84LAeLSiNZQpyKkjLrL6asNOJKY4MlvWbryXj1yGjYPDQXBey+2L8pRLMGgTAS0L+TMZNZ+09fYKCgMzfLVhmi2S1JTCuFpMRh1CRiKyzKyg4VBEedgCaGxI7DcSFqXRQF50mswk6qMBhycbnMAztjNB9xgNU7YLeV9Bt1zAUXLJWOVdKmQbmnw== 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=KruchKDVRnQGahXUBntvFG5pwlD4Eboc4HOu3NfliRc=; b=nKxx1Ycshp7fZWBvXWuNKsMcPAhnZ+owwF+9KO5hrPJyDeY5dDgzXk1sJs5Okq8uRS2cxfICaPQy1fqPWF8st5kQRlxi7mNysHoiZ2xGWnDWyf8IXaHR/Dt4b+ZFv2pLmeX5O5sygyXTRe62P01nvzaamcm6VTVL/e2RqqQyN1V3f70u63pJ5OS0lWYEpTNCDGUpSh0/HRqW1r7CnwsGQ53NXrVLAZIgKmu5E/BgED6/RVikQ42bQt7OEEvLJXRJlEUUZkKXkD6rRfF6T5rQswdQoCIzwoRjgQwSX6Zg4TQAoU5BGnXv5NCGM4AV952qTdDyAmlvfedXpaPRZcduow== 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 X-Received: from CY4PR10MB1718.namprd10.prod.outlook.com (2603:10b6:910:9::17) by CY4PR1001MB2184.namprd10.prod.outlook.com (2603:10b6:910:45::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.14; Tue, 26 Jan 2021 06:44:53 +0000 X-Received: from CY4PR10MB1718.namprd10.prod.outlook.com ([fe80::39dc:6ba7:9397:cb6]) by CY4PR10MB1718.namprd10.prod.outlook.com ([fe80::39dc:6ba7:9397:cb6%6]) with mapi id 15.20.3784.019; Tue, 26 Jan 2021 06:44:53 +0000 From: "Ankur Arora" To: devel@edk2.groups.io Cc: lersek@redhat.com, imammedo@redhat.com, boris.ostrovsky@oracle.com, Ankur Arora , Jordan Justen , Ard Biesheuvel , Aaron Young Subject: [edk2-devel] [PATCH v5 5/9] OvmfPkg/CpuHotplugSmm: define CPU_HOT_EJECT_DATA Date: Mon, 25 Jan 2021 22:44:36 -0800 Message-Id: <20210126064440.299596-6-ankur.a.arora@oracle.com> In-Reply-To: <20210126064440.299596-1-ankur.a.arora@oracle.com> References: <20210126064440.299596-1-ankur.a.arora@oracle.com> X-Originating-IP: [70.36.60.91] X-ClientProxiedBy: MWHPR18CA0061.namprd18.prod.outlook.com (2603:10b6:300:39::23) To CY4PR10MB1718.namprd10.prod.outlook.com (2603:10b6:910:9::17) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Received: from localhost.localdomain (70.36.60.91) by MWHPR18CA0061.namprd18.prod.outlook.com (2603:10b6:300:39::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.12 via Frontend Transport; Tue, 26 Jan 2021 06:44:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c43cfe29-780c-4395-92aa-08d8c1c5e2eb X-MS-TrafficTypeDiagnostic: CY4PR1001MB2184: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: EagMOm5Ayu/aB496+OXcWJr3F6mfzbkuJTdiGfD7q9rmtqzfrl0Dihn4kUPXisInIdiGzi624eF11QPBJVVZ2G6DcpDzpLzWK4mYKtVO3OtOgf9onQETiwQrvPnPmuY7KWrSX0UhamlZ1qTIBoX4gun+M8VyBKlxl4x1m1Mt7bwUwC1PzLJwBt+NnLzPzEBLDSkabaJ3gMM7P7T6vlEJ/SsLEWArU0B4T3THk64KYzDEHHxa3+oPYnSdm+Z500ty+QLqcWGEC6d7QIcWk3NFnZxG9WzPPBhoobN4ALji6hLnHRnKqs92qkXr69zVRspyQwuKd7GaSyS0f38wr98bheq3FqyZU18C4v8C+iTh24FokZJRTuSrLON+9r1xWIEc+k9BqEC5Gds01F3rX9R0kMLoxvW2+GfBibmIejf0bkw454zicYimh+wYvgxuzvCb2eaMmpIfF3CLrnAE82B1V1atZCwtojlr03Vv6xvgTJ201Gimuo/o/5xwKYgblhSUQsghWx7je9vVG0ru+KZJLA== X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?pEn+beZ8Hh77S1+QI9QvCE7dDwVFEf1uOlHmBxvOV/8h2DeN9duBj1LLzyNS?= =?us-ascii?Q?Kb2ZDk/Ab40q2S/R2v2FFYWVxAbbElnM75X+erjW3m3pQo6nR0cENLCScz8v?= =?us-ascii?Q?O/mQ1txuSm6fdc67zzv7hQ7JdqzsNOU8pvM+UC2XQlUy+CUjiR3BuipDYFkX?= =?us-ascii?Q?PVyXS0mTPXfAkltG+b/YL58MLzZ/wmMS7GX/ly75E/CvA3s3G8Kix8GjZAnR?= =?us-ascii?Q?kfgjYbURlq13yOfDj1jFp9Ped8vx5ZF6BudZmdBj8LXX3VUxsFSlf+jHeOs8?= =?us-ascii?Q?C3Hx/IbjQqezZrSkVIdYBRZ8hOSRsCF97vcBxtenhyui2nascqkTSl3K9cDo?= =?us-ascii?Q?Nr/S4BQEBFhpWa2dDr11snDkhM+WxZsULPzfnFMZgnCPe8fuf8otq+m+STBJ?= =?us-ascii?Q?ucXCPe7V6RVvSaB9h0RLsJBfy+49aQCdUkxG908lUlvhLKBcOMiatgjOYYq8?= =?us-ascii?Q?mx/A5vlNG8Fy4xuCwBcyz/iQpnm5ZDKd5NBo3M/O6XeHZNhpoZgyd31htwUr?= =?us-ascii?Q?fx+PzzoEERWfLtEFFV6kzv8iagXIociuRMKntxbQcyx+YeQHaeXax1rt+AoU?= =?us-ascii?Q?uDzS3hOPxW/idZcOWzgEqyOMpeMT/v9Yn6M7X4PhdWr/i0FQj//A1slsl+ln?= =?us-ascii?Q?FkRMMMEHydw2dETxMl0VLUemGVty3rzeG3prEcd8nl9OLAeMi8HKEKodd7SR?= =?us-ascii?Q?m/D1PZHmHo/wADIzNK7VsX51lj3hAnWVvK80BHwTegsnyR+biE39i/YxUhye?= =?us-ascii?Q?xM2peMFPfbGtzyQdWJqtHEqz166TUHTHH1MIjTGidLjojTP4cZI5O9eSOkCU?= =?us-ascii?Q?44vrp/clYJM8pP014k+oyMHADFGkaaxwN1eFyaY3ob5HRYMioPzYBZWu/KDK?= =?us-ascii?Q?+jjKEvuwtSLIPitKgV/ym87EmZkM4GvjR4eYVbMCS/Oyuxr+63Wg1JBGw0A8?= =?us-ascii?Q?C95OQUKJ2N2kmcoJM7rnKgTu5vVAmiPq0+gyo8NUI6r5zngHDO8k5LrZctRd?= =?us-ascii?Q?YdiY8kaA3LmZCiRuRnvD0gvn+SZmtd//gzBsoHmT48Xqp86Fs0ylQfzqPG14?= =?us-ascii?Q?tLudD7n2?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c43cfe29-780c-4395-92aa-08d8c1c5e2eb X-MS-Exchange-CrossTenant-AuthSource: CY4PR10MB1718.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2021 06:44:53.4961 (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: 80Fh+uvPvUSy1g0U1RxcQPfmMopROv/4FyRnly7dTYHUr24rOVTKUPB0tqHw+wiazrLY18XAu/vFVWIJQhe+fI6sGS92XiTCy7mf+2PuR+M= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1001MB2184 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ankur.a.arora@oracle.com X-Gm-Message-State: jo9gRImeUegKT06PPeWmAVbsx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1611643508; bh=anxpWbushDT+dqQmDeqHG1EDRtOtb5VUDEVyevwZ9jQ=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=bpG5yRJn3ZKP70xzEXAvhWtrWvsS8ACW9+ZFDLpeWtZH1uLk/R0hBXKtqqWU69rtpZi n+xPaue8XRiZofSRpUWMSG79MxAagMAyBo0ksn2AqEXgOw00cSWYg2rz6pE+G+YgZJA5l 87WCu3/UcSw1Q0J1U/ZZmnlZ8yUP9Mojx8I= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" 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: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3132 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 mode 100644 OvmfPkg/Include/Library/CpuHotEjectData.h diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec index 4348bb45c64a..e79ff28465e3 100644 --- a/OvmfPkg/OvmfPkg.dec +++ b/OvmfPkg/OvmfPkg.dec @@ -106,6 +106,10 @@ [LibraryClasses] # XenPlatformLib|Include/Library/XenPlatformLib.h =20 + ## @libraryclass Share CPU hot-eject state + # + CpuHotEjectData|Include/Library/CpuHotEjectData.h + [Guids] gUefiOvmfPkgTokenSpaceGuid =3D {0x93bb96af, 0xb9f2, 0x4eb8, {= 0x94, 0x62, 0xe0, 0xba, 0x74, 0x56, 0x42, 0x36}} gEfiXenInfoGuid =3D {0xd3b46f3b, 0xd441, 0x1244, {= 0x9a, 0x12, 0x0, 0x12, 0x27, 0x3f, 0xc1, 0x4d}} @@ -352,6 +356,12 @@ [PcdsDynamic, PcdsDynamicEx] # This PCD is only accessed if PcdSmmSmramRequire is TRUE (see below). gUefiOvmfPkgTokenSpaceGuid.PcdQ35SmramAtDefaultSmbase|FALSE|BOOLEAN|0x34 =20 + ## This PCD adds a communication channel between PiSmmCpuDxe and + # CpuHotplugSmm. + # + # Only accessed if PcdCpuHotPlugSupport is TRUE + gUefiOvmfPkgTokenSpaceGuid.PcdCpuHotEjectDataAddress|0|UINT64|0x46 + [PcdsFeatureFlag] gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE|BOOLEAN|0= x1c gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|FALSE|BOOLEAN= |0x1d diff --git a/OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf b/OvmfPkg/CpuHotplugSm= m/CpuHotplugSmm.inf index 04322b0d7855..e08b572ef169 100644 --- a/OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf +++ b/OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf @@ -54,6 +54,7 @@ [Protocols] =20 [Pcd] gUefiCpuPkgTokenSpaceGuid.PcdCpuHotPlugDataAddress ## CON= SUMES + gUefiOvmfPkgTokenSpaceGuid.PcdCpuHotEjectDataAddress ## CON= SUMES gUefiOvmfPkgTokenSpaceGuid.PcdQ35SmramAtDefaultSmbase ## CON= SUMES =20 [FeaturePcd] diff --git a/OvmfPkg/Include/Library/CpuHotEjectData.h b/OvmfPkg/Include/Li= brary/CpuHotEjectData.h new file mode 100644 index 000000000000..839ddad6d8f8 --- /dev/null +++ b/OvmfPkg/Include/Library/CpuHotEjectData.h @@ -0,0 +1,32 @@ +/** @file + Definition for a structure sharing state for CPU hot-eject. + + Copyright (C) 2021, Oracle Corporation. + + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef _CPU_HOT_EJECT_DATA_H_ +#define _CPU_HOT_EJECT_DATA_H_ + +typedef +VOID +(EFIAPI *CPU_HOT_EJECT_FN)( + IN UINTN ProcessorNum + ); + +#define CPU_EJECT_INVALID (MAX_UINT64) +#define CPU_EJECT_WORKER (MAX_UINT64-1) + +#define CPU_HOT_EJECT_DATA_REVISION_1 0x00000001 + +typedef struct { + UINT32 Revision; // Used for version identification f= or this structure + UINT32 ArrayLength; // Number of entries for the ApicIdM= ap array + + UINT64 *ApicIdMap; // Pointer to CpuIndex->ApicId map f= or pending ejects + CPU_HOT_EJECT_FN Handler; // Handler to do the CPU ejection + UINT64 Reserved; +} CPU_HOT_EJECT_DATA; + +#endif /* _CPU_HOT_EJECT_DATA_H_ */ --=20 2.9.3 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#70764): https://edk2.groups.io/g/devel/message/70764 Mute This Topic: https://groups.io/mt/80125312/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-