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-ia64-devel

RE: [Xen-ia64-devel] RE: _OSI(Linux) == false

To: "Alex Williamson" <alex.williamson@xxxxxx>
Subject: RE: [Xen-ia64-devel] RE: _OSI(Linux) == false
From: "Xu, Anthony" <anthony.xu@xxxxxxxxx>
Date: Sat, 18 Aug 2007 15:15:35 +0800
Cc: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sat, 18 Aug 2007 00:15:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1187353848.6802.391.camel@bling>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1187131463.6802.314.camel@bling> <51CFAB8CB6883745AE7B93B3E084EBE2FA5FC8@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <1187353848.6802.391.camel@bling>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcfgyoC/6BxjmbF6R5uSQftwj2m4vwAm0Vtg
Thread-topic: [Xen-ia64-devel] RE: _OSI(Linux) == false
Alex,

Just talked with ACPI export, he said because the path for linux is not fully 
tested, and they have been using windows path, the _OSI(linux) will return 
false.

In this situation, we can't tell guest OS depending on _OSI.
And he said, currently there is no other method to get Os type.

In this situation,
Can you fall back to our old method?

Windows is using 8K preferred page size in region 7.
Linux is using 16M preferred page size in region 7.

I think these will change rarely, so we can depend on this.

Another difference is,
Windows enable VHPT in region 7,
While linux disable VHPT in region 7,
I think these will also change rarely.

I think both these methods work if we don't need to support other OS.

What's your opinion?

Thanks,
Anthony


>-----Original Message-----
>From: Alex Williamson [mailto:alex.williamson@xxxxxx]
>Sent: 2007年8月17日 20:31
>To: Xu, Anthony
>Cc: xen-ia64-devel
>Subject: Re: [Xen-ia64-devel] RE: _OSI(Linux) == false
>
>On Fri, 2007-08-17 at 14:13 +0800, Xu, Anthony wrote:
>> >
>> >   This changeset was just brought to my attention:
>> >
>> >http://www.kernel.org/hg/linux-2.6/rev/7f6bc8a8fb19
>> >
>> >In short, newer upstream kernels will return True for _OSI(Windows) and
>> >False for _OSI(Linux).  This will cause Linux VT-i domains to get
>> >incorrectly identified as Windows guests and do bad things with region
>> 4
>> >& 5 mapping.
>>
>> Does linux call _OSI(Windows)?
>> If not, it will not impact XEN.
>
>   We added platform optimizations based on the following assumption:
>
>        On Tue, 2007-05-08 at 10:55 +0800, Xu, Anthony wrote:
>>         Run linux,
>>         Both __OSI(linux) and __OSI(windows) return true.
>>
>>         Run windows,
>>         __OSI(linux) return false,
>>         __OSI(windows) return true.
>>
>>         So if guest FW checks linux first then checks windows.
>>         Guest FW can tell which OS is running on top of it.
>>         Then Guest FW can tell XEN which OS is running.
>
>We can no longer identify Linux vs Windows in this manner unless we can
>make Linux return True for _OSI(linux) when it's running on Xen.  Is
>this not the way the code works?  I see the calls to _OSI in the _INI
>method of the PCI0 device in the DSDT:
>
>
>147            If (CondRefOf(_OSI, Local0))
>148            {
>149                    //Compare linux first. Because \_OSI("Windows 2001") 
>still
>150                    //return true while linux running on guest
>151                    If (\_OSI("Linux"))
>152                    {
>153                            Store(0xB2, OST)
>154                    }
>155                    ElseIf (\_OSI("Windows 2001.1"))
>156                    {
>157                            Store(0xB1, OST)
>158                    }
>159                    Else
>160                    {
>161                            Store(0xB0, OST)
>162                    }
>163
>164                    Store(0xB0, OST)
>165            }
>
>Thanks,
>
>       Alex
>
>--
>Alex Williamson                             HP Open Source & Linux Org.

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