]> xenbits.xen.org Git - xenclient/ioemu-pq.git/commitdiff
Passthrough the register 0xa0 on the host bridge.
authorJean Guyader <jean.guyader@eu.citrix.com>
Mon, 7 Sep 2009 13:35:10 +0000 (14:35 +0100)
committerJean Guyader <jean.guyader@eu.citrix.com>
Mon, 7 Sep 2009 13:35:10 +0000 (14:35 +0100)
It looks like the intel graphic driver for windows XP
except this value to be set.
It should be harmless for vista.

This patch makes winxp run as a PVM.

master/vga-passthrough

index d2adba9f84a17df59b1bedc843d29433b4f1eff0..91fe35716558b9e98d44666afe739cb2a03925f7 100644 (file)
@@ -1,5 +1,5 @@
 diff --git a/hw/pass-through.c b/hw/pass-through.c
-index 6a53137..3420e95 100644
+index 51a39db..10904c9 100644
 --- a/hw/pass-through.c
 +++ b/hw/pass-through.c
 @@ -90,6 +90,8 @@
@@ -88,7 +88,7 @@ index 6a53137..3420e95 100644
  }
  
  static uint8_t find_cap_offset(struct pci_dev *pci_dev, uint8_t cap)
-@@ -4084,3 +4130,41 @@ err:
+@@ -4113,3 +4159,41 @@ err:
      return status;
  }
  
@@ -145,7 +145,7 @@ index a503e80..1752e8d 100644
  #endif /* __PASSTHROUGH_H__ */
  
 diff --git a/hw/pci.c b/hw/pci.c
-index d7c516e..b2f4d43 100644
+index d7c516e..ec8b0c4 100644
 --- a/hw/pci.c
 +++ b/hw/pci.c
 @@ -28,11 +28,14 @@
@@ -163,7 +163,7 @@ index d7c516e..b2f4d43 100644
  struct PCIBus {
      int bus_num;
      int devfn_min;
-@@ -611,7 +614,30 @@ uint32_t pci_data_read(void *opaque, uint32_t addr, int len)
+@@ -611,7 +614,32 @@ uint32_t pci_data_read(void *opaque, uint32_t addr, int len)
          goto the_end;
      }
      config_addr = addr & 0xff;
@@ -186,6 +186,8 @@ index d7c516e..b2f4d43 100644
 +          else if (len == 4)
 +              val = pt_pci_host_read_long(0, 0, 0, 0x00);
 +      }
++        if (config_addr == 0xa0 && len == 2)
++              val = pt_pci_host_read_word(0, 0, 0, 0xa0);
 +    }
 +    else if (vga_passthrough && pci_dev->devfn == 0x10 && // intel graphic card
 +          config_addr == 0xfc) // OpRegion address
@@ -196,7 +198,7 @@ index d7c516e..b2f4d43 100644
      printf("pci_config_read: %s: addr=%02x val=%08x len=%d\n",
             pci_dev->name, config_addr, val, len);
 diff --git a/vl.c b/vl.c
-index b273c75..e519705 100644
+index cdbe2a3..6d79072 100644
 --- a/vl.c
 +++ b/vl.c
 @@ -233,6 +233,7 @@ CharDriverState *virtcon_hds[MAX_VIRTIO_CONSOLES];
@@ -207,7 +209,7 @@ index b273c75..e519705 100644
  #endif
  int usb_enabled = 0;
  int smp_cpus = 1;
-@@ -4275,6 +4276,7 @@ enum {
+@@ -4287,6 +4288,7 @@ enum {
      QEMU_OPTION_domainname,
      QEMU_OPTION_acpi,
      QEMU_OPTION_vcpus,
@@ -215,7 +217,7 @@ index b273c75..e519705 100644
  
      /* Debug/Expert options: */
      QEMU_OPTION_serial,
-@@ -4448,6 +4450,7 @@ static const QEMUOption qemu_options[] = {
+@@ -4460,6 +4462,7 @@ static const QEMUOption qemu_options[] = {
      { "pciemulation", HAS_ARG, QEMU_OPTION_pci_emulation },
      { "vncunused", 0, QEMU_OPTION_vncunused },
      { "vcpus", HAS_ARG, QEMU_OPTION_vcpus },
@@ -223,7 +225,7 @@ index b273c75..e519705 100644
  #if defined(CONFIG_XEN) && !defined(CONFIG_DM)
      { "xen-domid", HAS_ARG, QEMU_OPTION_xen_domid },
      { "xen-create", 0, QEMU_OPTION_xen_create },
-@@ -5281,6 +5284,9 @@ int main(int argc, char **argv, char **envp)
+@@ -5293,6 +5296,9 @@ int main(int argc, char **argv, char **envp)
              case QEMU_OPTION_disable_opengl:
                  opengl_enabled = 0;
                  break;