diff options
author | Frank Blaschka <frank.blaschka@de.ibm.com> | 2014-11-07 17:52:22 +0100 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2014-11-07 17:52:22 +0100 |
commit | 1d53a3a7d3b886bcc60b90e41693b82a791c25ba (patch) | |
tree | 0c3ccdb3b8b5c769b458b185b2eb209468e8667e /drivers/vfio/pci/vfio_pci.c | |
parent | Linux 3.18-rc3 (diff) | |
download | linux-1d53a3a7d3b886bcc60b90e41693b82a791c25ba.tar.xz linux-1d53a3a7d3b886bcc60b90e41693b82a791c25ba.zip |
vfio: make vfio run on s390
add Kconfig switch to hide INTx
add Kconfig switch to let vfio announce PCI BARs are not mapable
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/pci/vfio_pci.c')
-rw-r--r-- | drivers/vfio/pci/vfio_pci.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c index 9558da3f06a0..255201f22126 100644 --- a/drivers/vfio/pci/vfio_pci.c +++ b/drivers/vfio/pci/vfio_pci.c @@ -215,7 +215,7 @@ static int vfio_pci_get_irq_count(struct vfio_pci_device *vdev, int irq_type) if (irq_type == VFIO_PCI_INTX_IRQ_INDEX) { u8 pin; pci_read_config_byte(vdev->pdev, PCI_INTERRUPT_PIN, &pin); - if (pin) + if (IS_ENABLED(CONFIG_VFIO_PCI_INTX) && pin) return 1; } else if (irq_type == VFIO_PCI_MSI_IRQ_INDEX) { @@ -406,7 +406,8 @@ static long vfio_pci_ioctl(void *device_data, info.flags = VFIO_REGION_INFO_FLAG_READ | VFIO_REGION_INFO_FLAG_WRITE; - if (pci_resource_flags(pdev, info.index) & + if (IS_ENABLED(CONFIG_VFIO_PCI_MMAP) && + pci_resource_flags(pdev, info.index) & IORESOURCE_MEM && info.size >= PAGE_SIZE) info.flags |= VFIO_REGION_INFO_FLAG_MMAP; break; |