* per-device dma_map_ops for intel-iommu?
@ 2019-04-09 13:59 ` Christoph Hellwig
0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2019-04-09 13:59 UTC (permalink / raw)
To: David Woodhouse, Joerg Roedel; +Cc: iommu, linux-kernel
Hi David and Joerg,
do you remember a good reason why intel-iommu is not using per-device
dma_map_ops like the AMD iommu or the various ARM iommus?
Right now intel-iommu.c contains a half-asses reimplementation of the
dma direct code for the iommu_no_mapping() case, and it would seem
much nicer to just fall back to that case and not even call into
intel-iommu in that case.
^ permalink raw reply [flat|nested] 7+ messages in thread
* per-device dma_map_ops for intel-iommu?
@ 2019-04-09 13:59 ` Christoph Hellwig
0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2019-04-09 13:59 UTC (permalink / raw)
To: David Woodhouse, Joerg Roedel; +Cc: iommu, linux-kernel
Hi David and Joerg,
do you remember a good reason why intel-iommu is not using per-device
dma_map_ops like the AMD iommu or the various ARM iommus?
Right now intel-iommu.c contains a half-asses reimplementation of the
dma direct code for the iommu_no_mapping() case, and it would seem
much nicer to just fall back to that case and not even call into
intel-iommu in that case.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: per-device dma_map_ops for intel-iommu?
@ 2019-04-09 14:03 ` David Woodhouse
0 siblings, 0 replies; 7+ messages in thread
From: David Woodhouse @ 2019-04-09 14:03 UTC (permalink / raw)
To: Christoph Hellwig, Joerg Roedel
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1.1: Type: text/plain, Size: 780 bytes --]
On Tue, 2019-04-09 at 15:59 +0200, Christoph Hellwig wrote:
> Hi David and Joerg,
>
> do you remember a good reason why intel-iommu is not using per-device
> dma_map_ops like the AMD iommu or the various ARM iommus?
>
> Right now intel-iommu.c contains a half-asses reimplementation of the
> dma direct code for the iommu_no_mapping() case, and it would seem
> much nicer to just fall back to that case and not even call into
> intel-iommu in that case.
Other than the complexities about passthrough mode and various "oh shit
we forgot to actually test that iommu+gfx actually works before
shipping hardware" type of quirks that bypass the IOMMU for certain
devices — and retpolines, which I think you already dealt with — no, no
good reason that I recall.
[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5174 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: per-device dma_map_ops for intel-iommu?
@ 2019-04-09 14:03 ` David Woodhouse
0 siblings, 0 replies; 7+ messages in thread
From: David Woodhouse @ 2019-04-09 14:03 UTC (permalink / raw)
To: Christoph Hellwig, Joerg Roedel; +Cc: iommu, linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 780 bytes --]
On Tue, 2019-04-09 at 15:59 +0200, Christoph Hellwig wrote:
> Hi David and Joerg,
>
> do you remember a good reason why intel-iommu is not using per-device
> dma_map_ops like the AMD iommu or the various ARM iommus?
>
> Right now intel-iommu.c contains a half-asses reimplementation of the
> dma direct code for the iommu_no_mapping() case, and it would seem
> much nicer to just fall back to that case and not even call into
> intel-iommu in that case.
Other than the complexities about passthrough mode and various "oh shit
we forgot to actually test that iommu+gfx actually works before
shipping hardware" type of quirks that bypass the IOMMU for certain
devices — and retpolines, which I think you already dealt with — no, no
good reason that I recall.
[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5174 bytes --]
[-- Attachment #2: Type: text/plain, Size: 156 bytes --]
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: per-device dma_map_ops for intel-iommu?
@ 2019-04-09 14:03 ` David Woodhouse
0 siblings, 0 replies; 7+ messages in thread
From: David Woodhouse @ 2019-04-09 14:03 UTC (permalink / raw)
To: Christoph Hellwig, Joerg Roedel; +Cc: iommu, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 780 bytes --]
On Tue, 2019-04-09 at 15:59 +0200, Christoph Hellwig wrote:
> Hi David and Joerg,
>
> do you remember a good reason why intel-iommu is not using per-device
> dma_map_ops like the AMD iommu or the various ARM iommus?
>
> Right now intel-iommu.c contains a half-asses reimplementation of the
> dma direct code for the iommu_no_mapping() case, and it would seem
> much nicer to just fall back to that case and not even call into
> intel-iommu in that case.
Other than the complexities about passthrough mode and various "oh shit
we forgot to actually test that iommu+gfx actually works before
shipping hardware" type of quirks that bypass the IOMMU for certain
devices — and retpolines, which I think you already dealt with — no, no
good reason that I recall.
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5174 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: per-device dma_map_ops for intel-iommu?
@ 2019-04-11 13:57 ` Joerg Roedel
0 siblings, 0 replies; 7+ messages in thread
From: Joerg Roedel @ 2019-04-11 13:57 UTC (permalink / raw)
To: David Woodhouse; +Cc: Christoph Hellwig, iommu, linux-kernel
On Tue, Apr 09, 2019 at 05:03:52PM +0300, David Woodhouse wrote:
> On Tue, 2019-04-09 at 15:59 +0200, Christoph Hellwig wrote:
> > Hi David and Joerg,
> >
> > do you remember a good reason why intel-iommu is not using per-device
> > dma_map_ops like the AMD iommu or the various ARM iommus?
> >
> > Right now intel-iommu.c contains a half-asses reimplementation of the
> > dma direct code for the iommu_no_mapping() case, and it would seem
> > much nicer to just fall back to that case and not even call into
> > intel-iommu in that case.
>
> Other than the complexities about passthrough mode and various "oh shit
> we forgot to actually test that iommu+gfx actually works before
> shipping hardware" type of quirks that bypass the IOMMU for certain
> devices — and retpolines, which I think you already dealt with — no, no
> good reason that I recall.
Same here, I looked into this in the past as well, but I can't recall
any reason this was left in place.
Joerg
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: per-device dma_map_ops for intel-iommu?
@ 2019-04-11 13:57 ` Joerg Roedel
0 siblings, 0 replies; 7+ messages in thread
From: Joerg Roedel @ 2019-04-11 13:57 UTC (permalink / raw)
To: David Woodhouse; +Cc: iommu, Christoph Hellwig, linux-kernel
On Tue, Apr 09, 2019 at 05:03:52PM +0300, David Woodhouse wrote:
> On Tue, 2019-04-09 at 15:59 +0200, Christoph Hellwig wrote:
> > Hi David and Joerg,
> >
> > do you remember a good reason why intel-iommu is not using per-device
> > dma_map_ops like the AMD iommu or the various ARM iommus?
> >
> > Right now intel-iommu.c contains a half-asses reimplementation of the
> > dma direct code for the iommu_no_mapping() case, and it would seem
> > much nicer to just fall back to that case and not even call into
> > intel-iommu in that case.
>
> Other than the complexities about passthrough mode and various "oh shit
> we forgot to actually test that iommu+gfx actually works before
> shipping hardware" type of quirks that bypass the IOMMU for certain
> devices — and retpolines, which I think you already dealt with — no, no
> good reason that I recall.
Same here, I looked into this in the past as well, but I can't recall
any reason this was left in place.
Joerg
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-04-11 13:58 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-09 13:59 per-device dma_map_ops for intel-iommu? Christoph Hellwig
2019-04-09 13:59 ` Christoph Hellwig
[not found] ` <20190409135924.GA11431-jcswGhMUV9g@public.gmane.org>
2019-04-09 14:03 ` David Woodhouse
2019-04-09 14:03 ` David Woodhouse
2019-04-09 14:03 ` David Woodhouse
2019-04-11 13:57 ` Joerg Roedel
2019-04-11 13:57 ` Joerg Roedel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.