Re: [PATCH 1/1] iommu/vt-d: use DMA domain for real DMA devices and subdevices

2020-04-18 Thread Joerg Roedel
On Mon, Apr 13, 2020 at 10:48:55AM +0800, Lu Baolu wrote: > I have sync'ed with Joerg. This patch set will be replaced with Joerg's > proposal due to a race concern between domain switching and driver > binding. I will rebase all vt-d patches in this set on top of Joerg's > change. Okay, but is th

Re: [PATCH 1/1] iommu/vt-d: use DMA domain for real DMA devices and subdevices

2020-04-13 Thread Derrick, Jonathan
On Sun, 2020-04-12 at 11:50 +0800, Daniel Drake wrote: > Hi Jon, > > Thanks for picking this up. Apologies for my absence here - I wasn't > able to work on this recently, but I'm back again now. > > On Fri, Apr 10, 2020 at 3:32 AM Jon Derrick > wrote: > > This becomes problematic if the real DM

Re: [PATCH 1/1] iommu/vt-d: use DMA domain for real DMA devices and subdevices

2020-04-13 Thread Derrick, Jonathan
On Mon, 2020-04-13 at 10:48 +0800, Lu Baolu wrote: > Hi Daniel, > > On 2020/4/13 10:25, Daniel Drake wrote: > > On Fri, Apr 10, 2020 at 9:22 AM Lu Baolu wrote: > > > This is caused by the fragile private domain implementation. We are in > > > process of removing it by enhancing the iommu subsyste

Re: [PATCH 1/1] iommu/vt-d: use DMA domain for real DMA devices and subdevices

2020-04-12 Thread Lu Baolu
Hi Daniel, On 2020/4/13 10:25, Daniel Drake wrote: On Fri, Apr 10, 2020 at 9:22 AM Lu Baolu wrote: This is caused by the fragile private domain implementation. We are in process of removing it by enhancing the iommu subsystem with per-group default domain. https://www.spinics.net/lists/iommu/

Re: [PATCH 1/1] iommu/vt-d: use DMA domain for real DMA devices and subdevices

2020-04-12 Thread Daniel Drake
On Fri, Apr 10, 2020 at 9:22 AM Lu Baolu wrote: > This is caused by the fragile private domain implementation. We are in > process of removing it by enhancing the iommu subsystem with per-group > default domain. > > https://www.spinics.net/lists/iommu/msg42976.html > > So ultimately VMD subdevices

Re: [PATCH 1/1] iommu/vt-d: use DMA domain for real DMA devices and subdevices

2020-04-12 Thread Christoph Hellwig
On Sun, Apr 12, 2020 at 11:50:09AM +0800, Daniel Drake wrote: > > different addressing capabilities and some require translation. Instead we > > can > > put the real DMA dev and any subdevices on the DMA domain. This change > > assigns > > subdevices to the DMA domain, and moves the real DMA devi

Re: [PATCH 1/1] iommu/vt-d: use DMA domain for real DMA devices and subdevices

2020-04-11 Thread Daniel Drake
Hi Jon, Thanks for picking this up. Apologies for my absence here - I wasn't able to work on this recently, but I'm back again now. On Fri, Apr 10, 2020 at 3:32 AM Jon Derrick wrote: > This becomes problematic if the real DMA device and the subdevices have > different addressing capabilities and

Re: [PATCH 1/1] iommu/vt-d: use DMA domain for real DMA devices and subdevices

2020-04-09 Thread Lu Baolu
Hi, On 2020/4/10 3:17, Jon Derrick wrote: The PCI devices handled by intel-iommu may have a DMA requester on another bus, such as VMD subdevices needing to use the VMD endpoint. The real DMA device is now used for the DMA mapping, but one case was missed earlier: if the VMD device (and hence su

[PATCH 1/1] iommu/vt-d: use DMA domain for real DMA devices and subdevices

2020-04-09 Thread Jon Derrick
The PCI devices handled by intel-iommu may have a DMA requester on another bus, such as VMD subdevices needing to use the VMD endpoint. The real DMA device is now used for the DMA mapping, but one case was missed earlier: if the VMD device (and hence subdevices too) are under IOMMU_DOMAIN_IDENTITY