public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Yao, Jiewen" <jiewen.yao@intel.com>
To: "Wu, Hao A" <hao.a.wu@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Kubacki, Michael A" <michael.a.kubacki@intel.com>
Subject: Re: [PATCH v1] MinPlatformPkg/Test: Update to consume SpeculationBarrier
Date: Tue, 25 Dec 2018 05:04:12 +0000	[thread overview]
Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503F46AE80@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <20181225012349.7496-1-hao.a.wu@intel.com>

Reviewed-by: Jiewen.yao@intel.com

> -----Original Message-----
> From: Wu, Hao A
> Sent: Tuesday, December 25, 2018 9:24 AM
> To: edk2-devel@lists.01.org
> Cc: Wu, Hao A <hao.a.wu@intel.com>; Kubacki, Michael A
> <michael.a.kubacki@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>
> Subject: [PATCH v1] MinPlatformPkg/Test: Update to consume
> SpeculationBarrier
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1417
> 
> 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().
> 
> Cc: Michael A Kubacki <michael.a.kubacki@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Hao Wu <hao.a.wu@intel.com>
> ---
> 
> Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/SmmTestPo
> intCheckLib.c | 6 +++---
> 
> Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointCo
> mmunication.c | 6 +++---
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/SmmTest
> PointCheckLib.c
> b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/SmmTest
> PointCheckLib.c
> index dc40dae6d5..2d051bb6bb 100644
> ---
> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/SmmTest
> PointCheckLib.c
> +++
> b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/SmmTest
> PointCheckLib.c
> @@ -376,11 +376,11 @@
> TestPointSmmReadyToBootSmmPageProtectionHandler (
> 
>    if (CommData->UefiMemoryMapSize != 0) {
>      //
> -    // The AsmLfence() call here is to ensure the previous range/content
> checks
> -    // for the CommBuffer (copied in to CommData) have been completed
> before
> +    // The SpeculationBarrier() call here is to ensure the previous
> range/content
> +    // checks for the CommBuffer (copied in to CommData) have been
> completed before
>      // calling into TestPointCheckSmmCommunicationBuffer().
>      //
> -    AsmLfence ();
> +    SpeculationBarrier ();
>      Result = TRUE;
> 
>      Status = TestPointCheckSmmCommunicationBuffer (
> diff --git
> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointC
> ommunication.c
> b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointC
> ommunication.c
> index b4757da046..d2387f6244 100644
> ---
> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointC
> ommunication.c
> +++
> b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointC
> ommunication.c
> @@ -253,11 +253,11 @@ SmmTestPointSmiHandlerGetDataByOffset (
>    }
> 
>    //
> -  // The AsmLfence() call here is to ensure the previous range/content
> checks
> -  // for the CommBuffer have been completed before calling into
> +  // The SpeculationBarrier() call here is to ensure the previous
> range/content
> +  // checks for the CommBuffer have been completed before calling into
>    // SmiHandlerTestPointCopyData().
>    //
> -  AsmLfence ();
> +  SpeculationBarrier ();
>    SmiHandlerTestPointCopyData (
>      Data,
>      DataSize,
> --
> 2.12.0.windows.1



      reply	other threads:[~2018-12-25  5:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-25  1:23 [PATCH v1] MinPlatformPkg/Test: Update to consume SpeculationBarrier Hao Wu
2018-12-25  5:04 ` Yao, Jiewen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=74D8A39837DF1E4DA445A8C0B3885C503F46AE80@shsmsx102.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox