Re: [PATCH] Set bit 1 in disabled processor's _STA

Gleb Natapov
2009-05-18T05:53:59Z

On Mon, May 18, 2009 at 08:44:54AM +0300, Avi Kivity wrote:
> Gleb Natapov wrote:
>> On Sun, May 17, 2009 at 11:07:31PM +0300, Avi Kivity wrote:
>>
>>> Gleb Natapov wrote:
>>>
>>>> Theoretically we can provide different values for different OSes, but
>>>> this is just a guess work since there is no any documentation how CPU
>>>> hot-plug should work on x86.
>>>>
>>> ACPI in fact supports this, but I hope we don't have to do that.
>>>
>>>
>> ACPI way is what I am talking about. Implement _OS object.
>>
>
> /*
> * The story of _OSI(Linux)
> *
> * From pre-history through Linux-2.6.22,
> * Linux responded TRUE upon a BIOS OSI(Linux) query.
> *
> * Unfortunately, reference BIOS writers got wind of this
> * and put OSI(Linux) in their example code, quickly exposing
> * this string as ill-conceived and opening the door to
> * an un-bounded number of BIOS incompatibilities.
> *
> * For example, OSI(Linux) was used on resume to re-POST a
> * video card on one system, because Linux at that time
> * could not do a speedy restore in its native driver.
> * But then upon gaining quick native restore capability,
> * Linux has no way to tell the BIOS to skip the time-consuming
> * POST -- putting Linux at a permanent performance disadvantage.
> * On another system, the BIOS writer used OSI(Linux)
> * to infer native OS support for IPMI! On other systems,
> * OSI(Linux) simply got in the way of Linux claiming to
> * be compatible with other operating systems, exposing
> * BIOS issues such as skipped device initialization.
> *
> * So "Linux" turned out to be a really poor chose of
> * OSI string, and from Linux-2.6.23 onward we respond FALSE.
> *
> * BIOS writers should NOT query _OSI(Linux) on future systems.
> * Linux will complain on the console when it sees it, and return FALSE.
> * To get Linux to return TRUE for your system will require
> * a kernel source update to add a DMI entry,
> * or boot with "acpi_osi=Linux"
> */
>
> // Looks like no real content in this message?
>
Now I recall something on LKML about this. Well, in this case Linux
shouldn't have used ACPI to invent its own way to do cpu hot-plug.
Interesting whether _OSI(Windows) will evaluate to TRUE on Linux.

--
Gleb.