On Mon, Aug 05, 2013 at 06:04:04PM +0200, Paolo Bonzini wrote:
On 07/31/2013 08:14 AM, Igor Mammedov wrote:
" Windows operating systems return 0xFFFFFFFF if the argument to the _OSI method specifies an earlier version of Windows. For example, Windows 7 returns 0xFFFFFFFF for both “Windows 2009” (Windows 7) and “Windows 2006” (Windows Vista®)."
This would imply that all moder windows versions return 0xFFFFFFFF in response to querying Windows 2001.
To see what a modern Linux supports, see drivers/acpi/acpica/utosi.c
Looks like the result of this patch is to always disable the 64 bit window?
Yep, patch is not valid.
Did you look further into this? It would be useful for pvpanic as well.
From my quick research, it looks like "Windows 2006" || "Windows 2006.1" || "Linux" would work, but I have not tested it.
Paolo
This doesn't work in that it matches linux. I'm looking into fixing this, yes.
ATM it looks like we should test "Windows 2000" || "Windows 2001" || "Windows 2001 SP1" || "Windows 2001.1 SP1"
&& !( "Windows 2006" || "Windows 2006.1" || "Windows 2006 SP1" || "Windows 2006 SP2" || "Windows 2009" || "Windows 2012" || "Linux" || "FreeBSD" ) && _OS == "Microsoft Windows NT" && _REV == 0x1
This should match XP and 2003 as tightly as possible. Please note "Linux" is there just in case, modern Linux OSPM does not identify itself as "Linux". Same for "FreeBSD".
However, any query of _OSI can change OSPM behaviour in unpredictable ways. So this is a risky change, and far from reliable.
For these reasons, in my opinion it's best to avoid relying on _OSI as a sole way to identify the OS, and allow management interface as a fallback. In particular, this applies to the pvpanic device - _OSI hacks without an override in management has a good chance to backfire.