From: Gleb Natapov <gleb@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: seabios@seabios.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.
Date: Sun, 20 May 2012 15:59:36 +0300 [thread overview]
Message-ID: <20120520125936.GM10209@redhat.com> (raw)
In-Reply-To: <4FB8E7C6.5090000@redhat.com>
On Sun, May 20, 2012 at 03:47:02PM +0300, Avi Kivity wrote:
> On 05/20/2012 03:36 PM, Gleb Natapov wrote:
> > On Sun, May 20, 2012 at 03:30:50PM +0300, Avi Kivity wrote:
> > > On 05/20/2012 03:15 PM, Gleb Natapov wrote:
> > > > On Sun, May 20, 2012 at 02:44:51PM +0300, Avi Kivity wrote:
> > > > > On 05/20/2012 12:03 PM, Gleb Natapov wrote:
> > > > > > QEMU may want to disable guest's S3/S4 support and it wants to distinguish
> > > > > > between regular powerdown and S4 powerdown. To support that new fw_cfg
> > > > > > option was added that passes supported system states and what value should
> > > > > > guest use to enter each state. States are passed in 6 byte array. Each
> > > > > > byte represents one system state. If byte at offset X has its MSB set
> > > > > > it means that system state X is supported and to enter it guest should
> > > > > > use the value from lowest 7 bits. Patch also detects old QEMU and uses
> > > > > > values that work in backwards compatible way there.
> > > > > >
> > > > >
> > > > >
> > > > > Do we actually have to patch the DSDT? Or can _S3 etc be made into
> > > > > functions instead? (and talk to the bios, or even to fwcfg directly?)
> > > > >
> > > > We better not talk to fwcfg after OSPM is started since this is firmware
> > > > confing interface.
> > >
> > > Why not? The OS isn't going to talk to it, so we can have a driver in ACPI.
> > >
> > The OS is going to talk to it since the OS is the one who interprets
> > AML.
>
> I meant, not directly. So the driver in ACPI has exclusive access.
>
What's the difference?
> > We may want to disable fwcfg after OS bootup at all in the feature.
> > Who knows what kind of sensitive information we may want to pass by it
> > in the feature? May be something TPM related?
>
> fwcfg is for passing information to the guest. If you want to hide
> something from the guest, just don't put it in fwcfg.
>
Where to put it if we want to pass it to a firmware, but not an OS.
That was the point of fwcfg. If you want to pass something to a guest OS
use virtio-serial.
> > And I do not see any advantage
> > of using fwcfg from AML.
>
> It's an alternative to patching AML. Sure it takes some effort to write
> the driver, but afterwards we can modify the guest behaviour more
> easily. One possible client is -M old, so you can revert to previous
> behaviour depending on fwcfg data.
-M old is easy to support with the current patch. You just set new
properties to compatibility values. The code is written with this in
mind. And this is not an alternative to patching AML as I am trying to
explain to you below. You can eliminate patching of s4 value, but that's
it, you still need to patch out _S3/_S4 names.
>
> (we don't need a driver in AML to avoid patching, we can have AML talk
> to the bios and the bios drive fwcfg; but I think we'll find uses for a
> driver).
I am not sure what you mean. AML can't talk to the bios. It can read
values that bios put somewhere. I do not see advantage of this method
and it requires patching still.
>
> >
> > > > Regardless, presence of _S3 name or method is all
> > > > that needed for OS enabling S3 option. If _S3 is defined as a method it
> > > > has to return Package() otherwise iasl refuses to compile it.
> > >
> > > Can't we Return (Package (...) { ... }) or equivalent?
> > >
> > We can, how does it help?
> >
>
> The contents of the package can be determined at runtime.
>
And? _S3 name should not exists at all in order to disable S3, not return
something different.
--
Gleb.
next prev parent reply other threads:[~2012-05-20 12:59 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-20 9:03 [Qemu-devel] [PATCH 1/3] Fix aml_name_string() to recognize block name modifiers Gleb Natapov
2012-05-20 9:03 ` [Qemu-devel] [PATCH 2/3] Add ACPI_EXTRACT_PKG_START macro parsing Gleb Natapov
2012-05-20 9:03 ` [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it Gleb Natapov
2012-05-20 11:44 ` Avi Kivity
2012-05-20 12:15 ` Gleb Natapov
2012-05-20 12:30 ` Avi Kivity
2012-05-20 12:36 ` Gleb Natapov
2012-05-20 12:47 ` Avi Kivity
2012-05-20 12:59 ` Gleb Natapov [this message]
2012-05-20 13:39 ` Avi Kivity
2012-05-20 13:57 ` Gleb Natapov
2012-05-20 14:34 ` Avi Kivity
2012-05-20 14:43 ` Gleb Natapov
2012-05-20 14:46 ` Avi Kivity
2012-05-20 15:15 ` Gleb Natapov
2012-05-20 16:16 ` Kevin O'Connor
2012-05-20 16:25 ` Avi Kivity
2012-05-20 16:39 ` Kevin O'Connor
2012-05-20 16:49 ` Gleb Natapov
2012-05-20 16:11 ` Kevin O'Connor
2012-05-20 10:32 ` [Qemu-devel] [SeaBIOS] [PATCH 1/3] Fix aml_name_string() to recognize block name modifiers Alon Levy
2012-05-20 11:13 ` Gleb Natapov
2012-05-23 1:23 ` [Qemu-devel] " Kevin O'Connor
2012-06-20 13:08 ` Gleb Natapov
2012-06-22 1:06 ` Kevin O'Connor
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-all 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=20120520125936.GM10209@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=seabios@seabios.org \
/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;
as well as URLs for NNTP newsgroup(s).