WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] Re: [PATCH] ioemu-remote: ACPI S3 state wake up

To: "Ke, Liping" <liping.ke@xxxxxxxxx>, "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>, "Xu, Jiajun" <jiajun.xu@xxxxxxxxx>, "Yu, Ke" <ke.yu@xxxxxxxxx>
Subject: RE: [Xen-devel] Re: [PATCH] ioemu-remote: ACPI S3 state wake up
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Wed, 30 Jul 2008 11:09:14 +0800
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Delivery-date: Tue, 29 Jul 2008 20:09:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <391BF3CDD2DC0848B40ACB72FA97AD5903C39C18@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C4B4AEDA.24C29%keir.fraser@xxxxxxxxxxxxx><C4B4F1C8.24CD1%keir.fraser@xxxxxxxxxxxxx> <391BF3CDD2DC0848B40ACB72FA97AD5903C39C18@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcjtiySUYunlvFl+Ed224QAX8io7RQDrpIywAAnQm5kAASQQ2gAJ+Sq0ABf+wmAAAIGEoA==
Thread-topic: [Xen-devel] Re: [PATCH] ioemu-remote: ACPI S3 state wake up
Liping, it's not guest BIOS to choose which instead should simply
follow ACPI spec, i.e, if OSPM fills value in x_firmware field, then 
guest BIOS picks that value as wakeup vector in a flat protect mode.
Else, if OSPM fills value in legacy firmware field, guest BIOS then
resumes to given address in real mode.

It's the OSPM to decide which field to be used, according to whether
its wakeup vector is developed as real mode code. Then it's not 'us'
to decide. :-)

Commodity OSes are all using real mode wakeup vector by far. But
there's a known bug in Linux kernel where, whether to use x_firmware
field is incorrectly counted by its initial value. Normally BIOS will fill
zero in that field which avoids Linux to use xfirmware field. If guest
BIOS incorrectly puts some value in that field, guest Linux will choose
xfirmware field although it only has real mode wakeup vector. But
this is a guest bug.

Thanks,
Kevin


>From: Ke, Liping
>Sent: 2008年7月30日 10:51
>
>Hi, Keir
>
>Sure. I am looking on it:)
>Just got someinfo, according to the ACPI spec, when we are 
>using x_firmware_waking_vector, we should wake up from protect 
>mode. Since we now resume back from real mode, so we'd better 
>use firmware_waking_vector.
>
>Thanks a lot!
>Criping
>
>
>-----Original Message-----
>From: Keir Fraser [mailto:keir.fraser@xxxxxxxxxxxxx] 
>Sent: 2008年7月29日 23:12
>To: Ke, Liping; Xu, Jiajun
>Cc: xen-devel; Ian Jackson
>Subject: Re: [Xen-devel] Re: [PATCH] ioemu-remote: ACPI S3 
>state wake up
>
>I fixed these issues as of changeset 18166. However S3 resume 
>is still not
>working for me. Perhaps it's something to do with the new ioemu-remote
>repository? Anyway, I'll hand it back to you to dig into further. ;-)
>
>Oh, also our handling of x_firmware_waking_vector appears not 
>good. If the
>OSPM specifies that vector, are we not supposed to wake it in 
>flat protected
>mode?
>
> -- Keir
>
>On 29/7/08 11:26, "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx> wrote:
>
>> I can reproduce the issue. It's two things: firstly certain 
>ACPI tables do
>> need to be writable (e.g., firmware_waking_vector). 
>Secondly, when the BIOS
>> re-POSTs it is writing to itself, which we allow on initial 
>boot but not on
>> warm reset. That needs fixing. I'll take a look at doing so.
>> 
>>  -- Keir
>> 
>> On 29/7/08 10:53, "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx> wrote:
>> 
>>> Hi,
>>> 
>>> I didn't actually test cs18120, so I'm not certain that I 
>removed all writes
>>> to write-protected ROM regions. If such writes are 
>happening then the logging
>>> at line 1510 in xen/arch/x86/hvm/hvm.c should be printed to 
>the Xen console.
>>> You may need a debug build of Xen to see them, or add 
>guest_loglvl=all as a
>>> Xen boot parameter.
>>> 
>>> The EBDA is simply a RAM area for the BIOS to stash 
>important private (and in
>>> some cases public) data. Usually it is located just below the VGA
>>> framebuffer,
>>> at around 0x9fc00. Certain parts of it have a well-defined 
>format; other
>>> parts
>>> are completely private to the BIOS. For our purposes all we 
>care about is
>>> that
>>> we do not write-protect it, and we just stash an extra 
>8-bit variable within
>>> it to indicate if this is a warm return from S3.
>>> 
>>>  -- Keir
>>> 
>>> On 29/7/08 10:47, "Ke, Liping" <liping.ke@xxxxxxxxx> wrote:
>>> 
>>>> Hi, Selander and Jean
>>>> 
>>>> Jiajun is reporting similar (on cs18132) error in latest cs.
>>>> I found when keeping cs18120, revert 18027, everything is just ok.
>>>> So cs18120 itself works fine, yet if cs18027 set 
>ro-attributes, problem
>>>> still
>>>> exist.
>>>> 
>>>> Just did some debugging, from ITP, one cpu is in 
>default_idle loop, other
>>>> one
>>>> is for-ever running in x86_emulate/memcpy/__hvm_copy, etc. 
>So I think this
>>>> might be the same problem Guyader meet before?
>>>> 
>>>> I am not familiar about EBDA, could somebody help me to 
>have a look?
>>>> 
>>>> Thanks& Regards,
>>>> Criping
>>>> 
>>>> -----Original Message-----
>>>> From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>>> [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf 
>Of Keir Fraser
>>>> Sent: 2008年7月24日 20:45
>>>> To: Jean Guyader; Trolle Selander
>>>> Cc: xen-devel; Ian Jackson
>>>> Subject: Re: [Xen-devel] Re: [PATCH] ioemu-remote: ACPI S3 
>state wake up
>>>> 
>>>> On 24/7/08 13:12, "Jean Guyader" 
><jean.guyader@xxxxxxxxxxxxx> wrote:
>>>> 
>>>>> Jean Guyader wrote:
>>>>>> I already tried to reduce the rw area, and just keep 
>0xe0 -> 0xef. But
>>>>>> obviously it doesn't work the device model needs to 
>write on this frame
>>>>>> 0xf1. I still don't figure out why.
>>>>> 
>>>>> The rombios write on this page because of this flags 
>s3_resume_flag
>>>>> (rombios.c:98883). I don't know if it's a good reason to set the
>>>>> rombios as rw. However it's bad to set the first 2 pages 
>of the rombios
>>>>> as rw just because of that.
>>>>> Any suggestions ?
>>>> 
>>>> In that case the changes to ioemu-remote should be 
>reverted. The correct fix
>>>> is to move the S3 resume flag into the EBDA. I have 
>committed this fix as
>>>> xen-unstable.hg:18120.
>>>> 
>>>>  -- Keir
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Xen-devel mailing list
>>>> Xen-devel@xxxxxxxxxxxxxxxxxxx
>>>> http://lists.xensource.com/xen-devel
>> 
>> 
>> 
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@xxxxxxxxxxxxxxxxxxx
>> http://lists.xensource.com/xen-devel
>
>
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@xxxxxxxxxxxxxxxxxxx
>http://lists.xensource.com/xen-devel
>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>