diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2011-10-21 15:56:24 -0400 |
---|---|---|
committer | Hiroshi DOYU <hdoyu@nvidia.com> | 2012-01-23 11:11:38 +0200 |
commit | 207e42f7c160d4ba3e93385fb0ccfe8d6b798069 (patch) | |
tree | 68a9d6aeb094cf5640781f82d467cd7c5d2bc2e5 /drivers/iommu/intel-iommu.c | |
parent | feba22d51d38598182191c36bdf9fc2f2ebbe481 (diff) |
iommu: Add option to group multi-function devices
The option iommu=group_mf indicates the that the iommu driver should
expose all functions of a multi-function PCI device as the same
iommu_device_group. This is useful for disallowing individual functions
being exposed as independent devices to userspace as there are often
hidden dependencies. Virtual functions are not affected by this option.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'drivers/iommu/intel-iommu.c')
-rw-r--r-- | drivers/iommu/intel-iommu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index f78f455ae8aa..e918f72da6a8 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -4115,6 +4115,9 @@ static int intel_iommu_device_group(struct device *dev, unsigned int *groupid) } } + if (!pdev->is_virtfn && iommu_group_mf) + id.pci.devfn = PCI_DEVFN(PCI_SLOT(id.pci.devfn), 0); + *groupid = id.group; return 0; |