From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=eric.dong@intel.com; receiver=edk2-devel@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5DE8F21B02822 for ; Sun, 23 Dec 2018 16:54:13 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Dec 2018 16:54:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,389,1539673200"; d="scan'208";a="104284921" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga008.jf.intel.com with ESMTP; 23 Dec 2018 16:54:12 -0800 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 23 Dec 2018 16:54:12 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 23 Dec 2018 16:54:12 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.182]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.210]) with mapi id 14.03.0415.000; Mon, 24 Dec 2018 08:54:10 +0800 From: "Dong, Eric" To: "Wu, Hao A" , "edk2-devel@lists.01.org" CC: Ard Biesheuvel , "Yao, Jiewen" , "Gao, Liming" , "Ni, Ruiyu" , Laszlo Ersek Thread-Topic: [PATCH v1 5/5] UefiCpuPkg/PiSmmCpuDxeSmm: Update to consume SpeculationBarrier Thread-Index: AQHUmNrmjrOy/m7muUGfHdq5ba5W8aWNFGZg Date: Mon, 24 Dec 2018 00:54:09 +0000 Message-ID: References: <20181221031106.12960-1-hao.a.wu@intel.com> <20181221031106.12960-6-hao.a.wu@intel.com> In-Reply-To: <20181221031106.12960-6-hao.a.wu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v1 5/5] UefiCpuPkg/PiSmmCpuDxeSmm: Update to consume SpeculationBarrier X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2018 00:54:13 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Eric Dong > -----Original Message----- > From: Wu, Hao A > Sent: Friday, December 21, 2018 11:11 AM > To: edk2-devel@lists.01.org > Cc: Wu, Hao A ; Ard Biesheuvel > ; Yao, Jiewen ; Gao, > Liming ; Dong, Eric ; Ni, Ruiy= u > ; Laszlo Ersek > Subject: [PATCH v1 5/5] UefiCpuPkg/PiSmmCpuDxeSmm: Update to > consume SpeculationBarrier >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D1417 >=20 > Since BaseLib API AsmLfence() is a x86 arch specific API and should be > avoided using in generic codes, this commit replaces the usage of > AsmLfence() with arch-generic API SpeculationBarrier(). >=20 > Cc: Ard Biesheuvel > Cc: Jiewen Yao > Cc: Liming Gao > Cc: Eric Dong > Cc: Ruiyu Ni > Cc: Laszlo Ersek > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Hao Wu > --- > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c > b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c > index 19979d5418..8c9fa14b5b 100644 > --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c > +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c > @@ -238,10 +238,10 @@ SmmReadSaveState ( > return EFI_INVALID_PARAMETER; > } > // > - // The AsmLfence() call here is to ensure the above check for the CpuI= ndex > - // has been completed before the execution of subsequent codes. > + // The SpeculationBarrier() call here is to ensure the above check > + for the // CpuIndex has been completed before the execution of > subsequent codes. > // > - AsmLfence (); > + SpeculationBarrier (); >=20 > // > // Check for special EFI_SMM_SAVE_STATE_REGISTER_PROCESSOR_ID > -- > 2.12.0.windows.1