From: Ian Jackson Date: Fri, 29 May 2009 11:14:23 +0000 (+0100) Subject: Disable PCI IO space multiplex for stubdom X-Git-Tag: xen-4.0.0-rc1~75 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=c92fc8e49f18ef403c8f4be256cedad17992212b;p=qemu-xen-4.0-testing.git Disable PCI IO space multiplex for stubdom 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 --- diff --git a/hw/pass-through.c b/hw/pass-through.c index bd3388a0..314213a5 100644 --- a/hw/pass-through.c +++ b/hw/pass-through.c @@ -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; }