public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Anthony PERARD" <anthony.perard@citrix.com>
To: Gary Lin <glin@suse.com>
Cc: <devel@edk2.groups.io>, Laszlo Ersek <lersek@redhat.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Jordan Justen <jordan.l.justen@intel.com>,
	Julien Grall <julien@xen.org>, Jim Fehlig <jfehlig@suse.com>
Subject: Re: [RFC PATCH] OvmfPkg/OvmfXen: set PcdAcpiS3Enable at initialization
Date: Mon, 19 Jul 2021 11:11:53 +0100	[thread overview]
Message-ID: <YPVP6ZV4qlv/Gt8N@perard> (raw)
In-Reply-To: <20210708040549.8364-1-glin@suse.com>

On Thu, Jul 08, 2021 at 12:05:49PM +0800, Gary Lin wrote:
> There are several functions in OvmfPkg/Library using
> QemuFwCfgS3Enabled() to detect the S3 support status. However, in
> MdeModulePkg, PcdAcpiS3Enable is used to check S3 support. Since
> InitializeXenPlatform() didn't set PcdAcpiS3Enable as
> InitializePlatform() did, this made the inconsistency between
> drivers/functions.
> 
> For example, S3SaveStateDxe checked PcdAcpiS3Enable and skipped
> S3BootScript because the default value is FALSE. On the other hand,
> PlatformBootManagerBeforeConsole() from OvmfPkg/Library called
> QemuFwCfgS3Enabled() and found it returned TRUE, so it invoked
> SaveS3BootScript(). However, S3SaveStateDxe skipped S3BootScript, so
> SaveS3BootScript() asserted due to EFI_NOT_FOUND.
> 
> Setting PcdAcpiS3Enable at InitializeXenPlatform() "fixes" the crash
> reported by my colleague. The other possible direction is to replace
> QemuFwCfgS3Enabled() with PcdAcpiS3Enable. I'm not sure which one is
> the right fix.

QemuFwCfgS3Enabled() should always return false as we don't enable
QEMU's fwcfg interface in most case when running a Xen guest. So I don't
expect "PcdAcpiS3Enable" to ever been set via this patch.

Now, maybe we want to set PcdAcpiS3Enable unconditionally but I don't
know if S3 support is going to work as expected with OVMF under Xen, I
never look at that.

What kind of guest are you trying to fix? When does the crash happen?

Thanks,

-- 
Anthony PERARD

  parent reply	other threads:[~2021-07-19 10:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08  4:05 [RFC PATCH] OvmfPkg/OvmfXen: set PcdAcpiS3Enable at initialization Gary Lin
2021-07-19  7:34 ` Ard Biesheuvel
2021-07-19 10:11 ` Anthony PERARD [this message]
2021-07-19 16:07 ` Anthony PERARD
2021-07-19 16:48   ` Ard Biesheuvel
2021-07-20  6:52   ` Gary Lin
     [not found]   ` <16936D3065173CA9.5055@groups.io>
2021-07-21  6:56     ` [edk2-devel] " Gary Lin
2021-07-27 10:57       ` Anthony PERARD

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=YPVP6ZV4qlv/Gt8N@perard \
    --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