public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Sheng Wei" <w.sheng@intel.com>
To: Laszlo Ersek <lersek@redhat.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Dong, Eric" <eric.dong@intel.com>, "Ni, Ray" <ray.ni@intel.com>
Cc: "Kumar, Rahul1" <rahul1.kumar@intel.com>,
	"Yao, Jiewen" <jiewen.yao@intel.com>
Subject: Re: [PATCH v8 0/2] UefiCpuPkg/PiSmmCpuDxeSmm: Reflect page table depth with page table address
Date: Wed, 18 Nov 2020 01:19:39 +0000	[thread overview]
Message-ID: <CY4PR11MB192800AA1D18C96FA3A776F9E1E10@CY4PR11MB1928.namprd11.prod.outlook.com> (raw)
In-Reply-To: <c7e79c08-3eb6-247b-ba70-0d9af0927429@redhat.com>

Hi Eric, Ray,
Could you help to give confirm for merge these patches?
Thank you.
BR
Sheng Wei

> -----Original Message-----
> From: Laszlo Ersek <lersek@redhat.com>
> Sent: 2020年11月18日 4:02
> To: Sheng, W <w.sheng@intel.com>; devel@edk2.groups.io
> Cc: Dong, Eric <eric.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Kumar,
> Rahul1 <rahul1.kumar@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>
> Subject: Re: [PATCH v8 0/2] UefiCpuPkg/PiSmmCpuDxeSmm: Reflect page table
> depth with page table address
> 
> On 11/16/20 04:18, Sheng Wei wrote:
> > When trying to get page table base, if mInternalCr3 is zero, it will
> > use  the page table from CR3, and reflect the page table depth by CR4 LA57
> bit.
> > If mInternalCr3 is non zero, it will use the page table from
> > mInternalCr3  and reflect the page table depth of mInternalCr3 at same time.
> > In the case of X64, we use m5LevelPagingNeeded to reflect the depth of
> > the page table. And in the case of IA32, it will not the page table
> > depth  information.
> >
> > This patch is a bug fix when enable CET feature with 5 level paging.
> > The SMM page tables are allocated / initialized in PiCpuSmmEntry().
> > When CET is enabled, PiCpuSmmEntry() must further modify the attribute
> > of  shadow stack pages. This page table is not set to CR3 in PiCpuSmmEntry().
> >  So the page table base address is set to mInternalCr3 for modifty the
> > page table attribute. It could not use CR4 LA57 bit to reflect the
> > page table depth for mInternalCr3.
> > So we create a architecture-specific implementation GetPageTable()
> > with
> >  2 output parameters. One parameter is used to output the page table
> > address. Another parameter is used to reflect if it is 5 level paging
> > or not.
> >
> > Correct the Cr3 typo
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3015
> >
> > Signed-off-by: Sheng Wei <w.sheng@intel.com>
> > Cc: Eric Dong <eric.dong@intel.com>
> > Cc: Ray Ni <ray.ni@intel.com>
> > Cc: Laszlo Ersek <lersek@redhat.com>
> > Cc: Rahul Kumar <rahul1.kumar@intel.com>
> > Cc: Jiewen Yao <jiewen.yao@intel.com>
> >
> > Sheng Wei (2):
> >   UefiCpuPkg/PiSmmCpuDxeSmm: Correct the Cr3 typo
> >   UefiCpuPkg/PiSmmCpuDxeSmm: Reflect page table depth with page table
> >     address
> >
> >  UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c           | 26 ++++++++++++-
> >  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h         | 13 ++++---
> >  UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 35
> +++++-------------
> >  UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c            | 43
> ++++++++++++++++++----
> >  4 files changed, 77 insertions(+), 40 deletions(-)
> >
> 
> series
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> 
> The 2nd patch needs an ACK from Eric or Ray; then we can merge this series.
> 
> (It is a bugfix so it can go in even during the hard feature freeze. But we should
> merge it as soon as we can.)
> 
> Thanks,
> Laszlo


  reply	other threads:[~2020-11-18  1:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16  3:18 [PATCH v8 0/2] UefiCpuPkg/PiSmmCpuDxeSmm: Reflect page table depth with page table address Sheng Wei
2020-11-16  3:18 ` [PATCH v8 1/2] UefiCpuPkg/PiSmmCpuDxeSmm: Correct the Cr3 typo Sheng Wei
2020-11-16  3:18 ` [PATCH v8 2/2] UefiCpuPkg/PiSmmCpuDxeSmm: Reflect page table depth with page table address Sheng Wei
2020-11-17 20:02 ` [PATCH v8 0/2] " Laszlo Ersek
2020-11-18  1:19   ` Sheng Wei [this message]
2020-11-18  1:38     ` Dong, Eric
2020-11-18  1:57       ` Sheng Wei

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=CY4PR11MB192800AA1D18C96FA3A776F9E1E10@CY4PR11MB1928.namprd11.prod.outlook.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