[SeaBIOS] [PATCH] don't expose pvpanic device in the UI

Hu Tao hutao at cn.fujitsu.com
Fri Aug 9 11:02:08 CEST 2013


On Fri, Aug 09, 2013 at 04:02:24PM +0800, Hu Tao wrote:
> On Mon, Aug 05, 2013 at 09:26:32AM -0400, Paolo Bonzini wrote:
> > > > > > This patch is a workaround to not show pvpanic in UI to avoid the
> > > > > > problem in Windows.
> > > > 
> > > > It's not a workaround, it is a proper bugfix.
> > > > 
> > > > What versions of Windows did you test it on?  Did it hide the New
> > > > Hardware wizard properly (I think it appears only on XP/2003)?
> > > 
> > > Windows XP. I didn't see hardware wizard, maybe it is because I tested
> > > the same VM before and XP remembered the device and wasn't boring to
> > > prompt again.
> > > 
> > > Tested in a freshly installed Windows XP, the device is hidden but
> > > the hardware wizard is shown.
> > 
> > Then unfortunately this patch alone is useless. :(
> > 
> > What would work is treat this as a 2000/XP bug and use _OSI to probe
> > for Vista/2008 or later ("Windows 2006" and "Windows 2006.1", says
> > drivers/acpi/acpica/utosi.c).  Perhaps on top of this one.
> 
> Tested on Windows Server 2008, Windows Server 2008 R2 and Windows Server
> 2012. On Windows Server 2008, the New Hardware Wizward still shows up.
> On the latter two, the New Hardware Wizward doesn't show up.
> So we should test for "Windows 2009" and later? How can I know from
> which version of Windows the New Hardware Wizward is fixed? I searched
> on google but couldn't find a related page.

The patch for test is:

>From 8fe044e39d6de0e1999e48cf4e2e371beec3b861 Mon Sep 17 00:00:00 2001
From: Hu Tao <hutao at cn.fujitsu.com>
Date: Fri, 9 Aug 2013 16:23:54 +0800
Subject: [PATCH] pvpanic: disable pvpanic for some Windows versions

Signed-off-by: Hu Tao <hutao at cn.fujitsu.com>
---
 src/acpi-dsdt.dsl | 19 +++++++++++++++++++
 src/ssdt-misc.dsl |  4 ++++
 2 files changed, 23 insertions(+)

diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl
index 158f6b4..e6cede7 100644
--- a/src/acpi-dsdt.dsl
+++ b/src/acpi-dsdt.dsl
@@ -340,4 +340,23 @@ DefinitionBlock (
         Method(_L0F) {
         }
     }
+
+    Scope(\_SB) {
+        Name (TOOS, 0x00)
+        Method (_INI, 0, NotSerialized)
+        {
+            If (\_OSI ("Windows 2006"))
+            {
+                Store (0x01, TOOS)
+            }
+            ElseIf (\_OSI ("Windows 2000"))
+            {
+                Store (0x00, TOOS)
+            }
+            Else
+            {
+                Store (0x01, TOOS)
+            }
+        }
+    }
 }
diff --git a/src/ssdt-misc.dsl b/src/ssdt-misc.dsl
index 19a2058..62b13a2 100644
--- a/src/ssdt-misc.dsl
+++ b/src/ssdt-misc.dsl
@@ -58,6 +58,7 @@ DefinitionBlock ("ssdt-misc.aml", "SSDT", 0x01, "BXPC", "BXSSDTSUSP", 0x1)
 
     External(\_SB.PCI0, DeviceObj)
     External(\_SB.PCI0.ISA, DeviceObj)
+    External(\_SB.TOOS, IntObj)
 
     Scope(\_SB.PCI0.ISA) {
         Device(PEVT) {
@@ -71,6 +72,9 @@ DefinitionBlock ("ssdt-misc.aml", "SSDT", 0x01, "BXPC", "BXSSDTSUSP", 0x1)
             }
 
             Method(_STA, 0, NotSerialized) {
+                If (LEqual(TOOS, Zero)) {
+                    Return (0x00)
+                }
                 Store(PEST, Local0)
                 If (LEqual(Local0, Zero)) {
                     Return (0x00)
-- 
1.8.1.4




More information about the SeaBIOS mailing list