From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 832DFD811D1 for ; Wed, 10 Apr 2024 08:09:25 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=b3Ao0rhAk23WCy6gekqH3ocf7sLjtXyuTbLe2WJDwWo=; c=relaxed/simple; d=groups.io; h=From:To:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20240206; t=1712736564; v=1; b=GZkjlY8jQE8oOxZlQ0XwAHULcGMsMu57D3ystaVzei2PI4mMdy1m6z31MAK4ukoFBc7sDmrQ 1TGZK3MbJj2dlCM2ayHUvaFjxnyYEkYMhnLoSHAFgUlG2HHoBk70tDCjrwozRSwqsjcZdDswxD4 MKrxW2UZ3SAugEDk9qA+qovBsCcwUS4FljnQ2/rt4dQ3SCqGZpIx6s6QZZ3di0l/FZMGf4AU3eB nSvPVBE58/E+RqxW9NjtIKDRIh77kSjfTtfdqNyeyGnSQ8bQck7Lq+1vPfTYpYsoGHim0a8+q/u co6ctISXjN7P6ny7Uqs+JxRLthdEgAZp3p+wiZ23jC/yQ== X-Received: by 127.0.0.2 with SMTP id mnY2YY7687511xizJ5nE5WTb; Wed, 10 Apr 2024 01:09:24 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by mx.groups.io with SMTP id smtpd.web11.161642.1712736563204682185 for ; Wed, 10 Apr 2024 01:09:23 -0700 X-CSE-ConnectionGUID: dD0uLbb+RLizj/184Bg5gg== X-CSE-MsgGUID: xIJ2u/ogSBuyCwpgEtV/YQ== X-IronPort-AV: E=McAfee;i="6600,9927,11039"; a="11874596" X-IronPort-AV: E=Sophos;i="6.07,190,1708416000"; d="scan'208,217";a="11874596" X-Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2024 01:09:22 -0700 X-CSE-ConnectionGUID: JrgRcX6FTbeUir5Az2kXgg== X-CSE-MsgGUID: jvXKQydsT26YsCwjaPUIog== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,190,1708416000"; d="scan'208,217";a="21044930" X-Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa008.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 10 Apr 2024 01:09:23 -0700 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 10 Apr 2024 01:09:21 -0700 X-Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 10 Apr 2024 01:09:21 -0700 X-Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Wed, 10 Apr 2024 01:09:21 -0700 X-Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.169) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 10 Apr 2024 01:09:21 -0700 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by DS0PR11MB7788.namprd11.prod.outlook.com (2603:10b6:8:f5::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.26; Wed, 10 Apr 2024 08:09:18 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::2c31:82b7:9f26:5817]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::2c31:82b7:9f26:5817%5]) with mapi id 15.20.7430.045; Wed, 10 Apr 2024 08:09:18 +0000 From: "Ni, Ray" To: "devel@edk2.groups.io" , "Liu, Zhiguang" Subject: Re: [edk2-devel] [PATCH v3 0/6] Support to unregister SMI handler in SMI handlers Thread-Topic: [edk2-devel] [PATCH v3 0/6] Support to unregister SMI handler in SMI handlers Thread-Index: AQHaixunBDtXJds3/0W5tpSisq+CSbFhJnJS Date: Wed, 10 Apr 2024 08:09:18 +0000 Message-ID: References: <20240410074907.4095-1-zhiguang.liu@intel.com> In-Reply-To: <20240410074907.4095-1-zhiguang.liu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|DS0PR11MB7788:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: vFgjsqGP0k01yV6BPyCpLoF3td2ChsZfU01Pk1ULXQ69yC0qJnGfZcrrrjydIRJNW2rs/t6TEaq/h+cEII32hZaEbgM+s0oMcpQQWTo/f3p4xRiiQ6Wrvavx14fwpPnl+uM/qarPM/4UsfLTBh9uFHQswmjAIRzW6s2ZWoZITb6mBFAnVz18D4bGVbU+7aO49sTPMa8MwOSltilcrbeDytQhgxrb39F+tggVNKt2hTSlqS71/f/jFXS6ONHemkDcFK2o9cUyH0ZNRFvVWEAnxGxcQHv+r64mHp6nPBLqZEqVATln4bxNO1iNcjOC23TnyM2nw5NR2gh5bqfDzVeMHUUTa8PI+aiXDPdyXxLpLruusoDVcUuatiw4PDmoB5w/z/lXAyJiL6XQ2Rlawdu78q/+vXWC2CRaRmkIOVd/Sqorx9zcKSHVCkPkuwPmeRsuBtqLpsJpfIIxfAds/QZYA9gOv5hCqthLQ/ZJJGbO+yLs3Zi0OvkVUGuuP6q5gW8eoWLLQItdyjSwg3VnGHaQSCx48kR2o/ZNEQDjtczLKDnd46F/Ah4fk0Zsk/throhoZQYw/RB+3azjbwn13IEScPIFVn0INeIaFnqmYSNt0s7zRbAG/hIs7/kh9lhCWotV x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?h8Cj4NZ6Kb0ssNt2Xunuj7eBrhlIInszutknouY2xykdnPiX9inGIGEyfenF?= =?us-ascii?Q?c16x5HK3Hprlj2wwjxgnfu8qP2FVO+nVjX0H+PpKbopyfHMCBOhmLwpLq56F?= =?us-ascii?Q?/Lv2iERcT9ra7F4bHKTqdTHgqHFg5rteWfynRYq+5rUtA9RMAwUuiCB/heqD?= =?us-ascii?Q?/ngmOrAoDhGGe3HhR0+/n2d5Hr5mV0rx4d9MaMhMf/q1LiheskzXYbM3VTBc?= =?us-ascii?Q?rRpRbP0Oxyxc3i9wRM1s6rZzgw+ScIJ2ksy5zs81jAusjX+R/N8iZOIrj3Hs?= =?us-ascii?Q?qX+CnX3+vLAXdnoBgrOu4JaX+Vl8qAIxSDspCXxuQKNRItoO4H5OBZvqhI6h?= =?us-ascii?Q?KTy4V/MnRxr5B6vNz2gyIII5GLG5/qZp20kO1SWSzDSVqkuHCf2+mepur2/b?= =?us-ascii?Q?0ynudkH9NSaRqMSkXb2d6/RYsa19ND7IFikzBO0U2A+mztvZg5ld2PJXgUpj?= =?us-ascii?Q?BHOYQyjmrnaDXg/KCiPoTbXkctW81TrRXxGSZEcluEH8DxhEdcf7gRn/zIhN?= =?us-ascii?Q?UD+47DYO2+pkLz7TJDu7DQnJR+W1oCURLj+23TrNWbQ8vJmDeg5BisBzmXM1?= =?us-ascii?Q?G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Kqog?= =?us-ascii?Q?ngrlyO80PLZXycPdLy4s1PUFIEwBDM7OhROxKNUS9RE+EfVyJGCd/eF6fke1?= =?us-ascii?Q?nsOPsiy++ejj6sm/zMI=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 650ad832-4667-4da2-f6a8-08dc5935852c X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2024 08:09:18.2127 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Umywj/4/b/MEzKFg35CQ32ZWabbYPAC7E1g19jX7Kf8G2NBSR3cmuAGf4TSEzwtEFMg2GIWBwJNZLb6glLlKfg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB7788 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Wed, 10 Apr 2024 01:09:23 -0700 Resent-From: ray.ni@intel.com Reply-To: devel@edk2.groups.io,ray.ni@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: d5fZPBpcYfYW9Y5wTGufrrobx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN6PR11MB8244C0384675BACE30505C188C062MN6PR11MB8244namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=GZkjlY8j; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none) --_000_MN6PR11MB8244C0384675BACE30505C188C062MN6PR11MB8244namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni Thanks, Ray ________________________________ From: devel@edk2.groups.io on behalf of Zhiguang Liu= Sent: Wednesday, April 10, 2024 15:49 To: devel@edk2.groups.io Cc: Liu, Zhiguang Subject: [edk2-devel] [PATCH v3 0/6] Support to unregister SMI handler in S= MI handlers Months ago, I sent patch set to fix potential issues in the usage of SMI ha= ndler unregistering SMI handler. Discussion can be found in below link: https://edk2.groups.io/g/devel/topic/103925794#114251 The conclusion was to only support SMI handler unregistering itself, and no= t allow SMI handler unregistering other handlers, because we thought there= would be no such usage. However, recently, I find in some platform, there is kind of usage. To also support SMI handler unregistering other handlers, this patch set us= e a totally different design. So I revert the former ones first to make the= code more readable. Thank Laszlo for bring up the initial idea for the new design. V2&V3: Code refine based on Ray's comments Zhiguang Liu (6): Revert 2ec8f0c6407f062441b205b900038933865c7b3c Revert 049ff6c39c73edd3709c05bd0e46184320471358 Revert 17b28722008eab745ce186b72cd325944cbe6bf0 Revert ae1079b386a597108a8070652bf7cdaa4ec3dda3 MdeModulePkg/SMM: Support to unregister SMI handler in SMI handlers StandaloneMmPkg: Support to unregister MMI handler in MMI handlers MdeModulePkg/Core/PiSmmCore/PiSmmCore.h | 1 + MdeModulePkg/Core/PiSmmCore/Smi.c | 198 ++++++++++++++++------- StandaloneMmPkg/Core/Mmi.c | 200 +++++++++++++++++------- 3 files changed, 292 insertions(+), 107 deletions(-) -- 2.31.1.windows.1 -=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 (#117580): https://edk2.groups.io/g/devel/message/117580 Mute This Topic: https://groups.io/mt/105437953/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --_000_MN6PR11MB8244C0384675BACE30505C188C062MN6PR11MB8244namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Reviewed-by: Ray Ni <ray.ni@intel.com>

Thanks,
Ray

From: devel@edk2.groups.io = <devel@edk2.groups.io> on behalf of Zhiguang Liu <zhiguang.liu@int= el.com>
Sent: Wednesday, April 10, 2024 15:49
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Liu, Zhiguang <zhiguang.liu@intel.com>
Subject: [edk2-devel] [PATCH v3 0/6] Support to unregister SMI handl= er in SMI handlers
 
Months ago, I sent patch set to fix potential issu= es in the usage of SMI handler unregistering SMI handler. Discussion can be= found in below
link:
https://e= dk2.groups.io/g/devel/topic/103925794#114251

The conclusion was to only support SMI handler unregistering itself, and no= t allow  SMI handler unregistering other handlers, because we thought = there would be no such usage.
However, recently, I find in some platform, there is kind of usage.
To also support SMI handler unregistering other handlers, this patch set us= e a totally different design. So I revert the former ones first to make the= code more readable.

Thank Laszlo for bring up the initial idea for the new design.

V2&V3:
Code refine based on Ray's comments

Zhiguang Liu (6):
  Revert 2ec8f0c6407f062441b205b900038933865c7b3c
  Revert 049ff6c39c73edd3709c05bd0e46184320471358
  Revert 17b28722008eab745ce186b72cd325944cbe6bf0
  Revert ae1079b386a597108a8070652bf7cdaa4ec3dda3
  MdeModulePkg/SMM: Support to unregister SMI handler in SMI handlers<= br>   StandaloneMmPkg: Support to unregister MMI handler in MMI handlers
 MdeModulePkg/Core/PiSmmCore/PiSmmCore.h |   1 +
 MdeModulePkg/Core/PiSmmCore/Smi.c      = | 198 ++++++++++++++++-------
 StandaloneMmPkg/Core/Mmi.c       &= nbsp;      | 200 +++++++++++++++++-------
 3 files changed, 292 insertions(+), 107 deletions(-)

--
2.31.1.windows.1






_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#117580) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_MN6PR11MB8244C0384675BACE30505C188C062MN6PR11MB8244namp_--