]> xenbits.xensource.com Git - qemu-xen-4.4-testing.git/commitdiff
Disable PCI IO space multiplex for stubdom
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 29 May 2009 11:14:23 +0000 (12:14 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 29 May 2009 11:14:23 +0000 (12:14 +0100)
Changeset c675fef021550faeafa60577abd18347a172f220 breaks the stubdom
build.  The ioctl machinery used is not available in stubdom, so let
us disable this feature in stubdom and return matters to the previous
state if CONFIG_STUBDOM.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
hw/pass-through.c

index bd3388a07ff1750768fbc94d77b24ca9626bef6c..314213a50cc6241528873015e8fe883803f761b0 100644 (file)
@@ -1054,6 +1054,8 @@ static void pt_iomem_map(PCIDevice *d, int i, uint32_t e_phys, uint32_t e_size,
     }
 }
 
+#ifndef CONFIG_STUBDOM
+
 #define PCI_IOMUL_DEV_PATH      "/dev/xen/pci_iomul"
 static void pt_iomul_init(struct pt_dev *assigned_device,
                           uint8_t r_bus, uint8_t r_dev, uint8_t r_func)
@@ -1218,6 +1220,20 @@ static void pt_iomul_ioport_map(struct pt_dev *assigned_device,
     }
 }
 
+#else /* CONFIG_STUBDOM */
+
+static void pt_iomul_init(struct pt_dev *assigned_device,
+                          uint8_t r_bus, uint8_t r_dev, uint8_t r_func) {
+    fprintf(stderr, "warning: pt_iomul not supported in stubdom"
+           " %02x:%02x.%x\n", r_bus,r_dev,r_func);
+}
+static void pt_iomul_ioport_map(struct pt_dev *assigned_device,
+                                uint32_t old_ebase, uint32_t e_phys,
+                               uint32_t e_size, int first_map) { abort(); }
+static void pt_iomul_free(struct pt_dev *assigned_device) { }
+
+#endif /* !CONFIG_STUBDOM */
+
 /* Being called each time a pio region has been updated */
 static void pt_ioport_map(PCIDevice *d, int i,
                           uint32_t e_phys, uint32_t e_size, int type)
@@ -3222,12 +3238,14 @@ static int pt_cmd_reg_write(struct pt_dev *ptdev,
     pt_bar_mapping(ptdev, wr_value & PCI_COMMAND_IO,
                           wr_value & PCI_COMMAND_MEMORY);
 
+#ifndef CONFIG_STUBDOM
     if ( pt_is_iomul(ptdev) )
     {
         *value &= ~PCI_COMMAND_IO;
         if (ioctl(ptdev->fd, PCI_IOMUL_DISABLE_IO))
             PT_LOG("error: %s: %s\n", __func__, strerror(errno));
     }
+#endif
     return 0;
 }