From: "Yao, Jiewen" <jiewen.yao@intel.com>
To: "Vanguput, Narendra K" <narendra.k.vanguput@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [PATCH] UefiCpuPkg\PiSmmCpuDxeSmm: Save and restore CR2 only on-demand paging in SMM BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1593 For every SMI occurrence, save and restore CR2 register only when SMM on-demand paging support is enabl
Date: Tue, 5 Mar 2019 17:25:26 +0000 [thread overview]
Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503F550FCE@shsmsx102.ccr.corp.intel.com> (raw)
Hey
Thanks for the patch.
Would you please follow the EDKII patch format?
Please refer to https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Development-Process
And https://github.com/tianocore/tianocore.github.io/wiki/Commit-Message-Format
Thank you
Yao Jiewen
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> nkvangup
> Sent: Tuesday, March 5, 2019 9:17 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [PATCH] UefiCpuPkg\PiSmmCpuDxeSmm: Save and restore
> CR2 only on-demand paging in SMM BZ:
> https://bugzilla.tianocore.org/show_bug.cgi?id=1593 For every SMI
> occurrence, save and restore CR2 register only when SMM on-demand
> paging support is enable...
>
> ---
> UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 20 ++++++++++++--------
> 1 file changed, 12 insertions(+), 8 deletions(-)
>
> diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
> b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
> index 3b0b3b52ac..5be4a2b020 100644
> --- a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
> +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
> @@ -1111,10 +1111,12 @@ SmiRendezvous (
>
> ASSERT(CpuIndex < mMaxNumberOfCpus);
>
> - //
> - // Save Cr2 because Page Fault exception in SMM may override its value
> - //
> - Cr2 = AsmReadCr2 ();
> + if ((sizeof (UINTN) == sizeof (UINT64)) && (!PcdGetBool
> (PcdCpuSmmStaticPageTable))) {
> + //
> + // Save Cr2 because Page Fault exception in SMM may override its
> value
> + //
> + Cr2 = AsmReadCr2 ();
> + }
>
> //
> // Perform CPU specific entry hooks
> @@ -1253,10 +1255,12 @@ SmiRendezvous (
>
> Exit:
> SmmCpuFeaturesRendezvousExit (CpuIndex);
> - //
> - // Restore Cr2
> - //
> - AsmWriteCr2 (Cr2);
> + if ((sizeof (UINTN) == sizeof (UINT64)) && (!PcdGetBool
> (PcdCpuSmmStaticPageTable))) {
> + //
> + // Restore Cr2
> + //
> + AsmWriteCr2 (Cr2);
> + }
> }
>
> /**
> --
> 2.16.2.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
reply other threads:[~2019-03-05 17:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=74D8A39837DF1E4DA445A8C0B3885C503F550FCE@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