public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	Michael D Kinney <michael.d.kinney@intel.com>,
	Liming Gao <liming.gao@intel.com>,
	Jian J Wang <jian.j.wang@intel.com>, Hao Wu <hao.a.wu@intel.com>,
	Jagadeesh Ujja <jagadeesh.ujja@arm.com>,
	Achin Gupta <Achin.Gupta@arm.com>,
	Thomas Panakamattam Abraham <thomas.abraham@arm.com>,
	Sami Mujawar <Sami.Mujawar@arm.com>
Subject: Re: [PATCH 0/6] implement standalone MM versions of the variable runtime drivers
Date: Wed, 9 Jan 2019 16:04:59 +0100	[thread overview]
Message-ID: <1ece7e1e-26de-bf6b-55ea-b1e12bce3788@redhat.com> (raw)
In-Reply-To: <CAKv+Gu8HHpZ_0Z9Z3unEwptw=7MnNLhzF9sQFMwosnhtO5QXsw@mail.gmail.com>

On 01/09/19 11:28, Ard Biesheuvel wrote:
> On Wed, 9 Jan 2019 at 10:44, Laszlo Ersek <lersek@redhat.com> wrote:

>> But, it's still not clear to me (without trying) whether I should
>> resolve MmServicesTableLib  for DXE_SMM_DRIVER in addition to
>> SmmServicesTableLib, or in its place. I'd prefer not experimenting with
>> this myself; I'd just like to apply the series, and build & test it. :)
>>
> 
> At the moment, you will need both resolutions for DXE_SMM_DRIVERS
> globally. Based on the outcome of the review of this series, this is
> something we will need to clean up going forward, but currently, even
> the drivers that are updated to use MmServicesTableLib pull in
> libraries that depend on SmmServicesTableLib.
> 
> This should be a rather straight-forward search/replace operation
> [famous last words], and I can commit to dedicating some of my time to
> getting this fixed throughout, at least to the point where modules
> that consume MmServicesTableLib no longer have to supply a resolution
> for SmmServicesTableLib as well.
> 
> So, I will include a patch in the next revision of the series.

Great, thank you. This is exactly the info I needed.

> In the mean time, the hunk below should suffice to complete your regression
> testing.
> 
> --- a/OvmfPkg/OvmfPkgX64.dsc
> +++ b/OvmfPkg/OvmfPkgX64.dsc
> @@ -391,6 +391,7 @@
>    HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
>    SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf
>    SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.inf
> +  MmServicesTableLib|MdePkg/Library/MmServicesTableLib/MmServicesTableLib.inf
>  !ifdef $(DEBUG_ON_SERIAL_PORT)
>    DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
>  !else
> 

I'll replicate this to the other two DSC files [*], and then retry the
tests.

[*] SMM in OVMF has a non-intuitive restriction, in relation to X64 PEI.
SMM "just works" in the IA32 and IA32X64 builds, however, in the X64
build, one has to disable S3 support on the QEMU command line, or else
we hang the boot intentionally. See commit 5133d1f1d297 ("OvmfPkg:
replace README fine print about X64 SMM S3 with PlatformPei check",
2015-11-30).

For this reason, the IA32X64 build is considered the most-featureful, if
-D SMM_REQUIRE is desired.


For those that insist on the X64 build nevertheless, OvmfPkg/README
documents the QEMU option that disables S3, on the Q35 machine type,
which is required for SMM anyway:

  -global ICH9-LPC.disable_s3=1

When using libvirt, the matching knob is:

https://libvirt.org/formatdomain.html#elementsPowerManagement

<pm>
  <suspend-to-mem enabled='no'/>
</pm>


Personally, I focus my SMM testing on IA32 and IA32X64; I almost never
test SMM in the X64 build. This is because S3 has historically proved
very effective at triggering multiprocessing bugs in core SMM code, and
in general UefiCpuPkg infrastructure. Thus, my SMM regression tests:

https://github.com/tianocore/tianocore.github.io/wiki/Testing-SMM-with-QEMU,-KVM-and-libvirt

always include S3 suspend/resume, and that precludes the X64 build of OVMF.

... Sorry about the wall of text, I just wanted to explain why precisely
the short hunk you pasted is unhelpful in this case. Obviously, it does
answer my question, I can copy the class resolution to the other two DSC
files, and in the final OvmfPkg patch, we should update all three DSC files.

I'll be back with test results later.

Thanks!
Laszlo


  reply	other threads:[~2019-01-09 15:05 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-03 18:28 [PATCH 0/6] implement standalone MM versions of the variable runtime drivers Ard Biesheuvel
2019-01-03 18:28 ` [PATCH] BaseTools/GenFds: permit stripped MM_CORE_STANDALONE binaries Ard Biesheuvel
2019-01-04  5:51   ` Feng, Bob C
2019-01-03 18:28 ` [PATCH 1/6] MdePkg/Include: add MmServicesTableLib header file Ard Biesheuvel
2019-01-10  6:06   ` Zeng, Star
2019-01-03 18:28 ` [PATCH 2/6] MdePkg: implement MmServicesTableLib based on traditional SMM Ard Biesheuvel
2019-01-10  1:35   ` Wang, Jian J
     [not found]   ` <9bfb4d7c-3d4e-c05c-49a1-1959ddc902e3@intel.com>
2019-01-10  6:54     ` Zeng, Star
2019-01-03 18:28 ` [PATCH 3/6] MdeModulePkg/FaultTolerantWriteDxe: factor out boot service accesses Ard Biesheuvel
2019-01-10  1:36   ` Wang, Jian J
2019-01-10  6:45   ` Zeng, Star
2019-01-03 18:28 ` [PATCH 4/6] MdeModulePkg/FaultTolerantWriteDxe: implement standalone MM version Ard Biesheuvel
2019-01-10  1:41   ` Wang, Jian J
2019-01-10  1:48     ` Wang, Jian J
2019-01-10  6:31     ` Zeng, Star
2019-01-10  6:47   ` Zeng, Star
2019-01-10  7:29     ` Zeng, Star
2019-01-10  7:33       ` Ard Biesheuvel
2019-01-10  7:59         ` Zeng, Star
2019-01-10 12:28           ` Wang, Jian J
2019-01-10 13:03           ` Laszlo Ersek
2019-01-10 16:23             ` Ard Biesheuvel
2019-01-11  2:18               ` Zeng, Star
2019-01-03 18:28 ` [PATCH 5/6] MdeModulePkg/VariableRuntimeDxe: factor out boot service accesses Ard Biesheuvel
2019-01-08 15:38   ` Laszlo Ersek
2019-01-10  2:33     ` Wang, Jian J
2019-01-10  7:17       ` Zeng, Star
2019-01-10  7:19   ` Zeng, Star
2019-01-03 18:28 ` [PATCH 6/6] MdeModulePkg/VariableRuntimeDxe: implement standalone MM version Ard Biesheuvel
2019-01-10  1:49   ` Wang, Jian J
2019-01-10  1:50   ` Wang, Jian J
2019-01-10  7:28   ` Zeng, Star
2019-01-03 19:13 ` [PATCH 0/6] implement standalone MM versions of the variable runtime drivers Ard Biesheuvel
2019-01-07 12:44 ` Gao, Liming
2019-01-07 13:05   ` Ard Biesheuvel
2019-01-07 19:08     ` Laszlo Ersek
2019-01-09 13:56     ` Gao, Liming
2019-01-09 15:29       ` Ard Biesheuvel
2019-01-14  2:55         ` Gao, Liming
2019-01-14  8:26           ` Ard Biesheuvel
2019-01-14 15:33             ` Gao, Liming
2019-01-09  9:44 ` Laszlo Ersek
2019-01-09 10:28   ` Ard Biesheuvel
2019-01-09 15:04     ` Laszlo Ersek [this message]
2019-01-09 21:46       ` Laszlo Ersek
2019-01-09 21:56         ` Ard Biesheuvel
2019-01-10  8:24 ` Zeng, Star
2019-01-13 15:42 ` Zeng, Star

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=1ece7e1e-26de-bf6b-55ea-b1e12bce3788@redhat.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