public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Yao, Jiewen" <jiewen.yao@intel.com>
To: "Xu, Min M" <min.m.xu@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Andrew Fish <afish@apple.com>,
	Leif Lindholm <quic_llindhol@quicinc.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>,
	Dann Frazier <dann.frazier@canonical.com>,
	"Aktas, Erdem" <erdemaktas@google.com>,
	"James Bottomley" <jejb@linux.ibm.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	"Gao, Liming" <gaoliming@byosoft.com.cn>
Subject: Re: [PATCH V2 1/1] [edk2-stable202205]OvmfPkg/OvmfPkgX64: Use different CcProbeLib when SMM is on or off
Date: Wed, 18 May 2022 03:43:28 +0000	[thread overview]
Message-ID: <MW4PR11MB5872CBA77E6971FB995DEEF18CD19@MW4PR11MB5872.namprd11.prod.outlook.com> (raw)
In-Reply-To: <21af12a38d5cf2acc4fe2c7ee39105feecf4e91d.1652844962.git.min.m.xu@intel.com>

Hi Steward Team
I request this be in stable202205. It is a regression issue since stable202202.

Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

Thank you
Yao Jiewen


> -----Original Message-----
> From: Xu, Min M <min.m.xu@intel.com>
> Sent: Wednesday, May 18, 2022 11:37 AM
> To: devel@edk2.groups.io
> Cc: Xu, Min M <min.m.xu@intel.com>; Andrew Fish <afish@apple.com>; Leif
> Lindholm <quic_llindhol@quicinc.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>; Dann Frazier <dann.frazier@canonical.com>;
> Aktas, Erdem <erdemaktas@google.com>; James Bottomley
> <jejb@linux.ibm.com>; Yao, Jiewen <jiewen.yao@intel.com>; Tom Lendacky
> <thomas.lendacky@amd.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Yao,
> Jiewen <jiewen.yao@intel.com>
> Subject: [PATCH V2 1/1] [edk2-stable202205]OvmfPkg/OvmfPkgX64: Use
> different CcProbeLib when SMM is on or off
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3930
> 
> CcProbeLib is designed to check the vm guest type. The OvmfPkg/CcProbeLib
> reads the OvmfWorkArea (0x80B000) to get the vm guest type which is
> written by each guest (SEV or TDX guest). But in SMM drivers the access
> to OvmfWorkArea is illegal. PiSmmCpuDxeSmm.inf is an example. It uses
> IoLib which in OvmfPkgX64 BaseIoLibIntrinsicSev.inf is included. The
> IoLib probes if the working guest is td guest by calling CcProbe().
> 
> So CcProbeLibNull will be included when SMM_REQUIRE is set. Currently
> only TDVF uses CcProbe to check the guest type, and TDVF doesn't
> support SMM, so this fix has no side-effect.
> 
> Cc: Andrew Fish <afish@apple.com>
> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Dann Frazier <dann.frazier@canonical.com>
> Cc: Erdem Aktas <erdemaktas@google.com>
> Cc: James Bottomley <jejb@linux.ibm.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Tom Lendacky <thomas.lendacky@amd.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Tested-by: dann frazier <dann.frazier@canonical.com>
> Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
> Signed-off-by: Min Xu <min.m.xu@intel.com>
> ---
>  OvmfPkg/OvmfPkgX64.dsc | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
> index 71526bba3183..db7f4def7a24 100644
> --- a/OvmfPkg/OvmfPkgX64.dsc
> +++ b/OvmfPkg/OvmfPkgX64.dsc
> @@ -171,7 +171,6 @@
>    PciCapLib|OvmfPkg/Library/BasePciCapLib/BasePciCapLib.inf
> 
> PciCapPciSegmentLib|OvmfPkg/Library/BasePciCapPciSegmentLib/BasePciCapP
> ciSegmentLib.inf
>    PciCapPciIoLib|OvmfPkg/Library/UefiPciCapPciIoLib/UefiPciCapPciIoLib.inf
> -  CcProbeLib|OvmfPkg/Library/CcProbeLib/CcProbeLib.inf
>    IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicSev.inf
> 
> OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/
> OemHookStatusCodeLibNull.inf
>    SerialPortLib|PcAtChipsetPkg/Library/SerialIoLib/SerialIoLib.inf
> @@ -198,6 +197,9 @@
> 
>  !if $(SMM_REQUIRE) == FALSE
>    LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxBaseLib.inf
> +  CcProbeLib|OvmfPkg/Library/CcProbeLib/CcProbeLib.inf
> +!else
> +  CcProbeLib|MdePkg/Library/CcProbeLibNull/CcProbeLibNull.inf
>  !endif
> 
> CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/Customize
> dDisplayLib.inf
> 
> FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLi
> b.inf
> --
> 2.29.2.windows.2


  reply	other threads:[~2022-05-18  3:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1652844962.git.min.m.xu@intel.com>
2022-05-18  3:37 ` [PATCH V2 1/1] [edk2-stable202205]OvmfPkg/OvmfPkgX64: Use different CcProbeLib when SMM is on or off Min Xu
2022-05-18  3:43   ` Yao, Jiewen [this message]
2022-05-18  6:45     ` 回复: [edk2-devel] " gaoliming
2022-05-20  1:23       ` Yao, Jiewen

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=MW4PR11MB5872CBA77E6971FB995DEEF18CD19@MW4PR11MB5872.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