public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ruiyu" <ruiyu.ni@Intel.com>
To: Laszlo Ersek <lersek@redhat.com>,
	"Dong, Eric" <eric.dong@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [Patch] UefiCpuPkg/S3Resume2Pei: disable paging before creating new page table.
Date: Tue, 9 Oct 2018 16:26:17 +0800	[thread overview]
Message-ID: <062a4679-e3bf-28f1-31ba-83a124abb655@Intel.com> (raw)
In-Reply-To: <f3ef94b8-47c7-3ec8-ba5d-3f0f46fee3b9@redhat.com>

On 10/9/2018 4:09 PM, Laszlo Ersek wrote:
>>
>> Two comments:
>> 1. We'd better not map the PcdCpuStackGuard to paging-enable. Maybe some
>> other feature also enables the paging in PEI phase but the
>> PcdCpuStackGuard is FALSE.
> 
> I think I agree.
> 
>> 2. When PEI is in 64bit mode, disabling paging may not work because
>> paging-enable is a must in 64bit mode.
> 
> I think this case is academic. S3Resume2Pei does not support 64-bit PEI
> with SMM enabled. This is why we have commit 5133d1f1d297 ("OvmfPkg:
> replace README fine print about X64 SMM S3 with PlatformPei check",
> 2015-11-30) in OVMF.

I found that commit. I just checked S3Resume2Pei module. It does assumes 
it's running in 32bit mode. And CpuS3.c also assumes S3Resume2Pei is 
running in 32bit mode.

> 
> Anyway, I'm making this comment in the general sense only. I'm not
> suggesting that we disable paging unconditionally. Actually, I believe,
> I will suggest (under the v3 posting) restricting the write to CR0 even
> more.
Why?

> 
> Thanks!
> Laszlo
> 
>>
>>>>          AsmWriteCr3 ((UINTN)SmmS3ResumeState->SmmS3Cr3);
>>>>
>>>>          //
>>>> diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
>>>> b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
>>>> index 6ce1bf944c..0f131d19df 100644
>>>> --- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
>>>> +++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
>>>> @@ -90,6 +90,7 @@
>>>>    [Pcd]
>>>>      gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable  ##
>>>> SOMETIMES_CONSUMES
>>>>
>>>> gEfiMdeModulePkgTokenSpaceGuid.PcdPteMemoryEncryptionAddressOrM
>>>> ask    ## CONSUMES
>>>> +
>>>> gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard                       ##
>>>> CONSUMES
>>>>
>>>>    [Depex]
>>>>      TRUE
>>>> -- 
>>>> 2.15.0.windows.1
>>>>
>>>> _______________________________________________
>>>> edk2-devel mailing list
>>>> edk2-devel@lists.01.org
>>>> https://lists.01.org/mailman/listinfo/edk2-devel
>>
>>
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
> 


-- 
Thanks,
Ray


  reply	other threads:[~2018-10-09  8:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-09  1:51 [Patch] UefiCpuPkg/S3Resume2Pei: disable paging before creating new page table Eric Dong
2018-10-09  1:59 ` Wang, Jian J
2018-10-09  2:03   ` Wang, Jian J
2018-10-09  2:27     ` Dong, Eric
2018-10-09  2:05 ` Dong, Eric
2018-10-09  2:15   ` Ni, Ruiyu
2018-10-09  8:09     ` Laszlo Ersek
2018-10-09  8:26       ` Ni, Ruiyu [this message]
2018-10-09  8:54         ` Laszlo Ersek
  -- strict thread matches above, loose matches on Subject: below --
2018-10-10  7:43 Eric Dong
2018-10-10  7:58 ` Yao, Jiewen
2018-10-10 13:03   ` Laszlo Ersek
2018-10-10 13:14     ` Yao, Jiewen
2018-10-10 13:19       ` Laszlo Ersek
2018-10-10 13:30         ` Yao, Jiewen
2018-10-10 14:00           ` Laszlo Ersek

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=062a4679-e3bf-28f1-31ba-83a124abb655@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