public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Dong, Eric" <eric.dong@intel.com>
To: "Wu, Hao A" <hao.a.wu@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	"Yao, Jiewen" <jiewen.yao@intel.com>,
	"Gao, Liming" <liming.gao@intel.com>,
	"Ni, Ruiyu" <ruiyu.ni@intel.com>,
	Laszlo Ersek <lersek@redhat.com>
Subject: Re: [PATCH v1 5/5] UefiCpuPkg/PiSmmCpuDxeSmm: Update to consume SpeculationBarrier
Date: Mon, 24 Dec 2018 00:54:09 +0000	[thread overview]
Message-ID: <ED077930C258884BBCB450DB737E662259D666D9@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <20181221031106.12960-6-hao.a.wu@intel.com>

Reviewed-by: Eric Dong <eric.dong@intel.com>

> -----Original Message-----
> From: Wu, Hao A
> Sent: Friday, December 21, 2018 11:11 AM
> To: edk2-devel@lists.01.org
> Cc: Wu, Hao A <hao.a.wu@intel.com>; Ard Biesheuvel
> <ard.biesheuvel@linaro.org>; Yao, Jiewen <jiewen.yao@intel.com>; Gao,
> Liming <liming.gao@intel.com>; Dong, Eric <eric.dong@intel.com>; Ni, Ruiyu
> <ruiyu.ni@intel.com>; Laszlo Ersek <lersek@redhat.com>
> Subject: [PATCH v1 5/5] UefiCpuPkg/PiSmmCpuDxeSmm: 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: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Hao Wu <hao.a.wu@intel.com>
> ---
>  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> 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 CpuIndex
> -  // 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 ();
> 
>    //
>    // Check for special EFI_SMM_SAVE_STATE_REGISTER_PROCESSOR_ID
> --
> 2.12.0.windows.1



  reply	other threads:[~2018-12-24  0:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-21  3:11 [PATCH v1 0/5] Ues arch-generic API SpeculationBarrier() to replace AsmLfence() Hao Wu
2018-12-21  3:11 ` [PATCH v1 1/5] MdePkg/BaseLib: Introduce new SpeculationBarrier API Hao Wu
2018-12-24  3:15   ` Gao, Liming
2018-12-21  3:11 ` [PATCH v1 2/5] MdeModulePkg/FaultTolerantWrite: Update to consume SpeculationBarrier Hao Wu
2018-12-24  2:56   ` Wang, Jian J
2018-12-21  3:11 ` [PATCH v1 3/5] MdeModulePkg/SmmLockBox: " Hao Wu
2018-12-24  2:56   ` Wang, Jian J
2018-12-21  3:11 ` [PATCH v1 4/5] MdeModulePkg/Variable: " Hao Wu
2018-12-24  2:59   ` Wang, Jian J
2018-12-21  3:11 ` [PATCH v1 5/5] UefiCpuPkg/PiSmmCpuDxeSmm: " Hao Wu
2018-12-24  0:54   ` Dong, Eric [this message]
2018-12-21 11:22 ` [PATCH v1 0/5] Ues arch-generic API SpeculationBarrier() to replace AsmLfence() Ard Biesheuvel

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=ED077930C258884BBCB450DB737E662259D666D9@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