]> xenbits.xensource.com Git - xenclient/ioemu.git/commitdiff
Pass through the device ID and the vendor ID of the host bridge.
authorJean Guyader <jean.guyader@eu.citrix.com>
Thu, 19 Mar 2009 15:28:48 +0000 (15:28 +0000)
committerJean Guyader <jean.guyader@eu.citrix.com>
Thu, 19 Mar 2009 15:28:48 +0000 (15:28 +0000)
For a linux guest it needs to be the same as on the host otherwise
you have no /dev/agpart.

hw/pci.c

index b5c517cdf3ce76720970170636d8a0c187a3122d..89c17acab7a4754d4d0cb5a1eb043ff77786cd88 100644 (file)
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -476,14 +476,22 @@ uint32_t pci_data_read(void *opaque, uint32_t addr, int len)
 
     if (vga_passthrough && pci_dev->devfn == 0x00) //Host Bridge
     {
-        val = 0;
+       val = pci_dev->config_read(pci_dev, config_addr, len);
 
         if (config_addr == 0x52) // GMCH
             val = pt_pci_host_read_word(0, 0, 0, 0x52);
-/*        if (config_addr == 0xa0) // Top Memory addrress
-            val = pt_pci_host_read_byte(0, 0, 0, 0xa0);*/
         if (config_addr == 0x02) // Device ID
-            val = pt_pci_host_read_byte(0, 0, 0, 0x02);
+       {
+           if (len == 2)
+               val = pt_pci_host_read_word(0, 0, 0, 0x02);
+       }
+       if (config_addr == 0x0)
+       {
+           if (len == 2)
+               val = pt_pci_host_read_word(0, 0, 0, 0x00);
+           else if (len == 4)
+               val = pt_pci_host_read_long(0, 0, 0, 0x00);
+       }
     }
     else
         val = pci_dev->config_read(pci_dev, config_addr, len);