Re: [PATCH 04/13] pci: New pci_dma_quirk()

From: Alex Williamson
Date: Thu May 17 2012 - 11:22:25 EST


On Thu, 2012-05-17 at 15:19 +0800, Anonymous wrote:
> Alex,
>
> On Sat, May 12, 2012 at 6:55 AM, Alex Williamson
> <alex.williamson@xxxxxxxxxx> wrote:
> > Integrating IOMMU groups more closely into the driver core allows
> > us to more easily work around DMA quirks. The Ricoh multifunction
> > controller is a favorite example of devices that are currently
> > incompatible with IOMMU isolation as all the functions use the
> > requestor ID of function 0 for DMA. Passing this device into
> > pci_dma_quirk returns the PCI device to use for DMA. The IOMMU
> > driver can then construct an IOMMU group including both devices.
> >
>
> Please give some thought to the Marvell SATA controller quirk as well.
>
> Instead of multiple visible functions using the same requester ID of
> function 0, the Marvell device only makes function 0 visible, but uses
> the requestor ID of function 1 as well during DMA.
>
> See https://bugzilla.redhat.com/show_bug.cgi?id=757166

Wow. That one isn't quite as easy to deal with since there's no
existing device in the kernel to point to. This comment might be on the
right track:

https://bugzilla.kernel.org/show_bug.cgi?id=42679#c11

Perhaps David Woodhouse can comment on support for phantom functions.
If we had infrastructure for that it might be easy for the quirk to
update the pci_dev struct, inserting a new phantom function. Otherwise
we'd need to create a new device in the kernel for it. Thanks,

Alex


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/