From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web12.8965.1596157806976067299 for ; Thu, 30 Jul 2020 18:10:07 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=bA79clhl; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: eric.dong@intel.com) IronPort-SDR: Y5LznbJyv1MPwGFfDU7vYqIvcyDrWh2hxgZgExbJPiBPCrYmfYuGhhBuoQXm31m/yI6jTjtrRK tCa7ikbD8x+Q== X-IronPort-AV: E=McAfee;i="6000,8403,9698"; a="139701237" X-IronPort-AV: E=Sophos;i="5.75,416,1589266800"; d="scan'208";a="139701237" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jul 2020 18:10:05 -0700 IronPort-SDR: 0Kq3a/tRpovFN81Mp0XEz6psOKqfswKHIuafYuaGq6REQCkXyKt7W/PMa99H0lStaDsXpFvx5I ZtBcBdsl7cTg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,416,1589266800"; d="scan'208";a="304785789" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga002.jf.intel.com with ESMTP; 30 Jul 2020 18:10:05 -0700 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 30 Jul 2020 18:10:05 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 30 Jul 2020 18:10:05 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.177) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 30 Jul 2020 18:10:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R3YS+XvUU9WCWZBEWVj2y5hZ6mTdg3Ln4n0cH51/PxJAmnUu94xsbEEc5imS1zxGzKOdj7KE2R+N++ZPbFjiwSs1RtIcSPYmFE6KD7HVUR/PZl4SGYmpsZeXHYxVPYFNeNdPip/e9qHI3HgPxNI/y2YLjaUT9poxoeTetu8038Yx7YMRM5a17EpZCxiO4HkqpyYfZViwUBVsl9bI7lUAXO8IH41YeP5iYYjHY1BN+cjuDUtvDD0M8dI/FxGk6I+yQLmDvoRUnxoH0ijILfZFBPDSlWvpwGCNsIQRH1oG2xkALRq1uaepKDzJ2LGeaO+H5Cz2RrZ76yBHMM0vjRtUyw== 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=CSdBfcWD0XFizKnRscna9aur+JDREV2+eGIK3UiiXjE=; b=PVX0hWn4uIeblR0asipWVEznGtEsHoz/dzD1dLxyDTnRPbJuWzj/NQ/q1Nqab9tQyeDbQLLAkp9eca+s4PuOU7DiJAunMU2L0zXfiGINdTAIw6g1HBX45xAst6Xh2CNQqSwx22sBnagetSLdSce0W+fD0eOHwjbgOztqDIDFR0YAjZboN79YVuoqzzO6SxFZ4UvaSCd+jjBf7YA4UwyZtlTm/E+52hv7bwIsetY7bP2vXUDV70GXEf3e1CAeGz6AmSwV9kVQ6LO6D687Oamz7nz8gnEMG8G+3s/0h3Ggar8H9+IYV2p/GWxWFPUJa4yw/NBbyXg0nZm9yGley0TRMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CSdBfcWD0XFizKnRscna9aur+JDREV2+eGIK3UiiXjE=; b=bA79clhlZOoekkm1R5gXklFd8yDiCQvdTU/fPsbytRdmFz+0wD4+pifHPWAYFfEOpLxC5b9Jp6D2X02Hs2EDB7x0YNFIJqXhODpUbhjYUsXHD3QFouk4lw8jGE0PhWmXLXrF7MY0OCfWQsQvg5xV8xPXx2C40ZnKF/LUdecAEAI= Received: from DM6PR11MB3274.namprd11.prod.outlook.com (2603:10b6:5:b::26) by DM6PR11MB4108.namprd11.prod.outlook.com (2603:10b6:5:197::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.21; Fri, 31 Jul 2020 01:10:03 +0000 Received: from DM6PR11MB3274.namprd11.prod.outlook.com ([fe80::7173:fdb:cfda:5820]) by DM6PR11MB3274.namprd11.prod.outlook.com ([fe80::7173:fdb:cfda:5820%6]) with mapi id 15.20.3216.033; Fri, 31 Jul 2020 01:10:03 +0000 From: "Dong, Eric" To: Laszlo Ersek , edk2-devel-groups-io CC: =?utf-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= , "Kumar, Rahul1" , "Ni, Ray" Subject: Re: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: pause in WaitForSemaphore() before re-fetch Thread-Topic: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: pause in WaitForSemaphore() before re-fetch Thread-Index: AQHWZdlvDq8/SI7F+0G+druZDjVHKakg4swQ Date: Fri, 31 Jul 2020 01:10:03 +0000 Message-ID: References: <20200729185217.10084-1-lersek@redhat.com> In-Reply-To: <20200729185217.10084-1-lersek@redhat.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.37] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ab9dd9dc-0732-4422-cd52-08d834ee749c x-ms-traffictypediagnostic: DM6PR11MB4108: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: BGny1qsiULcZ4uKilIz423VbuvVRo/cUG5Jn7ToHr4j1bLeAQ4dSNe8mTQBG1dULkFa1nS85hY5Vs5U/KdOg7zP6aAf7mIDWQGw6fI2srSgZ82rOsdNRpGTBZYnShBdNK/dT9/E5CFzp6n/Ed3/DmytOCv6JiYZJkbiUYbvmnBwb7vHrne2//oftSLhKeXXqFHz5QAYR2EZyDlveEoQ0kxglyR7+05cO9xYq/d+nfHEsrjTeq+wk82SSe3rMXBIxJNOODdOIk1RAVSj6AK1yJ/m6YspLLeo8EhXg+TKeyqNN1DmoTD1vvxNm8Yk+vrb2PXsfAcUgbhk9UEVSoZ4utalpGlbFegVNIGI9rsx3JAaWuBWMGZu6NtlrwIgU/EypjeCM3d6fSoL8ah1IuoWd+A== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB3274.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(6029001)(4636009)(39860400002)(396003)(366004)(346002)(136003)(376002)(8936002)(19627235002)(107886003)(5660300002)(76116006)(66556008)(8676002)(66446008)(66476007)(4326008)(52536014)(54906003)(64756008)(53546011)(71200400001)(9686003)(6506007)(55016002)(2906002)(7696005)(110136005)(316002)(66946007)(186003)(26005)(966005)(478600001)(83380400001)(86362001)(33656002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: RpRJ4LJe0sUVBK93D+Hg4656Lrsg19MqJEjOM/M+Qxr17/H/0u1tETIHp3MWAlcDXCe96YJcaK5yJBXi3PCNQxqNYT73Okge/XC3iD3HJAor9HwGjhpyM1q+j+zJnBIvG6CZVLrBQ7/oGB0myHVxQg9iD4/bEwKlEgpwQlmfy8fIUmogyUOvB4O3KfCEUON2OETO7mz9nRk79ZP6eCYBP8yum+isHw0xi0yER3pzdMMqi7bd/TSKnqvIPKbSIT31q8PJktlBV8OTNt6Y9AuwP+QWeI6WlIwaw0xAM0D/V0EmsWIL4C2lQQE19GiM2fzu6AXRDF+Gn2klM/cUEzfnHC8pmoSxL4AeQ9hzPTCXzK4VryEg3xjZNPlICLxVdl+HzU9j8i8bgA5ZQn+YzgcxCtZtuIlrOH39Nb6RL5mHBpKTPsrnuRKLlIlaKrwmhtWmk3Y/JB0HcTvtxXCV9xMAfRlALcGDUkqNBl/J0bUOa7vp6KGenn/lR8k11CSda44W MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB3274.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ab9dd9dc-0732-4422-cd52-08d834ee749c X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Jul 2020 01:10:03.5079 (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: 5cJfmeYTE1r1+bGY576o3ngShvfo+QLlZLzRhzZlEhzXLCc3FUvqGvWDmj4+anFVuX7ECDoQg0v1EBHyjVMrQw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4108 Return-Path: eric.dong@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 UmV2aWV3ZWQtYnk6IEVyaWMgRG9uZyA8ZXJpYy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