mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
VFIO updates for v3.19-rc1
- s390 support (Frank Blaschka) - Enable iommu-type1 for ARM SMMU (Will Deacon) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJUka+sAAoJECObm247sIsiiy0P/iqrQpv94Z7rUKRlV3K8YtJj 8Oi5fLLnT2by9v5mS+KMElnQ5gLU/C5B/QGLMNrF2uQl8lguWSXJw37r7MkbIkpN RDLx1NhetLqbJ4CYLjyv/Jx3vl+Wr/2nNWRVIS5ajBmMjEgKVLvjYs4SaXELc3a8 a3YzcGW10BrVFlCJgUYqYIFGS1BmKjf7fbD5YBocj8tPv6NAlCiNNYYr+0pzW8Lf GTi39JlZ2t06hDq33eiUkrySWNjrIBn4g4PfAl7HBAscsZKS1w18MD1qVw4UXXa2 15+CBbsHU7ZLVo6G7vuZeJNCX9tdQ0WIZWQzHstQa914l86WYImTJ2tyH7Rn0ZcQ 3Mu9fzef9JgjkI56ol2zDwuOs+qttOYaLWjhhHiW4jkIxdnljnesIFlvmM3XeDGz 3Zowg09HzE3K+dt8265jVKkcNJbPLzspLvF27nPMudZNHBozcoPE0jKxU7QC3eMT Ij36+puQq+jccUic3Np6rxk5tzTHEat1a7w3IUwXCCUP5P5QW+kuuIjbd4hqQkHn VDRjnT6MWC3GguUCXR5VyO0zezpI20pTbWwE8u2qwnE349m0Eq/vxytj2lCLYLPR Jjtdduf1/Ppam7tATd3PwTu6KljY3dJiUUikyOc1J0KmkgkSMw+BtR6G7qytyW4q /fhClcsaNtxSheVh0N+b =1L2V -----END PGP SIGNATURE----- Merge tag 'vfio-v3.19-rc1' of git://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - s390 support (Frank Blaschka) - Enable iommu-type1 for ARM SMMU (Will Deacon) * tag 'vfio-v3.19-rc1' of git://github.com/awilliam/linux-vfio: drivers/vfio: allow type-1 IOMMU instantiation on top of an ARM SMMU vfio: make vfio run on s390
This commit is contained in:
commit
cc669743a3
@ -16,7 +16,7 @@ config VFIO_SPAPR_EEH
|
||||
menuconfig VFIO
|
||||
tristate "VFIO Non-Privileged userspace driver framework"
|
||||
depends on IOMMU_API
|
||||
select VFIO_IOMMU_TYPE1 if X86
|
||||
select VFIO_IOMMU_TYPE1 if (X86 || S390 || ARM_SMMU)
|
||||
select VFIO_IOMMU_SPAPR_TCE if (PPC_POWERNV || PPC_PSERIES)
|
||||
select VFIO_SPAPR_EEH if (PPC_POWERNV || PPC_PSERIES)
|
||||
select ANON_INODES
|
||||
|
@ -16,3 +16,11 @@ config VFIO_PCI_VGA
|
||||
BIOS and generic video drivers.
|
||||
|
||||
If you don't know what to do here, say N.
|
||||
|
||||
config VFIO_PCI_MMAP
|
||||
depends on VFIO_PCI
|
||||
def_bool y if !S390
|
||||
|
||||
config VFIO_PCI_INTX
|
||||
depends on VFIO_PCI
|
||||
def_bool y if !S390
|
||||
|
@ -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;
|
||||
|
@ -609,6 +609,10 @@ static int __init init_pci_cap_basic_perm(struct perm_bits *perm)
|
||||
|
||||
/* Sometimes used by sw, just virtualize */
|
||||
p_setb(perm, PCI_INTERRUPT_LINE, (u8)ALL_VIRT, (u8)ALL_WRITE);
|
||||
|
||||
/* Virtualize interrupt pin to allow hiding INTx */
|
||||
p_setb(perm, PCI_INTERRUPT_PIN, (u8)ALL_VIRT, (u8)NO_WRITE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1445,6 +1449,9 @@ int vfio_config_init(struct vfio_pci_device *vdev)
|
||||
*(__le16 *)&vconfig[PCI_DEVICE_ID] = cpu_to_le16(pdev->device);
|
||||
}
|
||||
|
||||
if (!IS_ENABLED(CONFIG_VFIO_PCI_INTX))
|
||||
vconfig[PCI_INTERRUPT_PIN] = 0;
|
||||
|
||||
ret = vfio_cap_init(vdev);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user