]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/{vt-d,amd}: Remove multifunction assumption around grouping
authorAlex Williamson <alex.williamson@redhat.com>
Thu, 30 May 2013 18:39:18 +0000 (12:39 -0600)
committerJoerg Roedel <joro@8bytes.org>
Thu, 20 Jun 2013 15:21:09 +0000 (17:21 +0200)
commitba6d49b81bfaccef46d2eaecf572fb9d7e68274c
treed8e9c610c217a4cb0370cd572e60a0f09c8f181e
parentdc741e8f7320b621037fae504bc822acfdae2370
iommu/{vt-d,amd}: Remove multifunction assumption around grouping

If a device is multifunction and does not have ACS enabled then we
assume that the entire package lacks ACS and use function 0 as the
base of the group.  The PCIe spec however states that components are
permitted to implement ACS on some, none, or all of their applicable
functions.  It's therefore conceivable that function 0 may be fully
independent and support ACS while other functions do not.  Instead
use the lowest function of the slot that does not have ACS enabled
as the base of the group.  This may be the current device, which is
intentional.  So long as we use a consistent algorithm, all the
non-ACS functions will be grouped together and ACS functions will
get separate groups.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
drivers/iommu/amd_iommu.c
drivers/iommu/intel-iommu.c