]> xenbits.xen.org Git - xenclient/ioemu.git/commitdiff
Graphic pass-through: Force the register 0xfc (opregion address) to be 0.
authorJean Guyader <jean.guyader@eu.citrix.com>
Fri, 27 Mar 2009 10:46:03 +0000 (10:46 +0000)
committerJean Guyader <jean.guyader@eu.citrix.com>
Fri, 27 Mar 2009 10:46:03 +0000 (10:46 +0000)
hw/pci.c

index 89c17acab7a4754d4d0cb5a1eb043ff77786cd88..69fcb2e0fe645f24e95d8b9afde1a56e3c5e536c 100644 (file)
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -493,11 +493,14 @@ uint32_t pci_data_read(void *opaque, uint32_t addr, int len)
                val = pt_pci_host_read_long(0, 0, 0, 0x00);
        }
     }
+    else if (vga_passthrough && pci_dev->devfn == 0x10 && // intel graphic card
+           config_addr == 0xfc) // OpRegion address
+       val = 0; // force to fall back to SMI mode
     else
         val = pci_dev->config_read(pci_dev, config_addr, len);
 #if defined(DEBUG_PCI)
-    printf("pci_config_read: %s: addr=%02x val=%08x len=%d\n",
-           pci_dev->name, config_addr, val, len);
+    printf("pci_config_read: %s(0x%x): addr=%02x val=%08x len=%d\n",
+           pci_dev->name, pci_dev->devfn, config_addr, val, len);
 #endif
  the_end:
 #if defined(DEBUG_PCI) && 0