diff options
author | Jon Derrick <jonathan.derrick@intel.com> | 2020-05-27 10:56:16 -0600 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2020-05-29 15:11:43 +0200 |
commit | 4fda230ecddc2573ed88632e98b69b0b9b68c0ad (patch) | |
tree | e882df93536b335b23736637dd8ec1d2012e5d90 /include | |
parent | 8038bdb8553313ad53bfcffcf8294dd0ab44618f (diff) | |
download | linux-stable-4fda230ecddc2573ed88632e98b69b0b9b68c0ad.tar.gz linux-stable-4fda230ecddc2573ed88632e98b69b0b9b68c0ad.tar.bz2 linux-stable-4fda230ecddc2573ed88632e98b69b0b9b68c0ad.zip |
iommu/vt-d: Allocate domain info for real DMA sub-devices
Sub-devices of a real DMA device might exist on a separate segment than
the real DMA device and its IOMMU. These devices should still have a
valid device_domain_info, but the current dma alias model won't
allocate info for the subdevice.
This patch adds a segment member to struct device_domain_info and uses
the sub-device's BDF so that these sub-devices won't alias to other
devices.
Fixes: 2b0140c69637e ("iommu/vt-d: Use pci_real_dma_dev() for mapping")
Cc: stable@vger.kernel.org # v5.6+
Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20200527165617.297470-3-jonathan.derrick@intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/intel-iommu.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h index 21633cee6331..4100bd224f5c 100644 --- a/include/linux/intel-iommu.h +++ b/include/linux/intel-iommu.h @@ -609,6 +609,7 @@ struct device_domain_info { struct list_head auxiliary_domains; /* auxiliary domains * attached to this device */ + u32 segment; /* PCI segment number */ u8 bus; /* PCI bus number */ u8 devfn; /* PCI devfn number */ u16 pfsid; /* SRIOV physical function source ID */ |