Re: [PATCH] vmd: Stop overriding dma_map_ops
From: Keith Busch
Date: Tue Aug 27 2019 - 17:58:11 EST
On Tue, Aug 27, 2019 at 11:24:05AM -0700, Derrick, Jonathan wrote:
> On Mon, 2019-08-26 at 17:06 +0200, Christoph Hellwig wrote:
> > With a little tweak to the intel-iommu code we should be able to work
> > around the VMD mess for the requester IDs without having to create giant
> > amounts of boilerplate DMA ops wrapping code. The other advantage of
> > this scheme is that we can respect the real DMA masks for the actual
> > devices, and I bet it will only be a matter of time until we'll see the
> > first DMA challeneged NVMe devices.
> >
> > The only downside is that we can't offer vmd as a module given that
> > intel-iommu calls into it. But the driver only has about 700 lines
> > of code, so this should not be a major issue.
> If we're going to remove its ability to be a module, and given its
> small size, could we make this default =y?
>
> Otherwise we risk breaking platforms which have it enabled with OSVs
> who miss enabling it
Can we keep this as a module if we stick the remapping struct device
in pci_sysdata instead of going through the vmd driver to get it?
Otherwise, very happy to see this dma wrapping go away.