Re: [PATCH v5 19/19] iommu/dma: Add support for mapping MSIs

2016-08-31 Thread Auger Eric
Hi Robin, On 26/08/2016 03:17, Robin Murphy wrote: > Hi Eric, > > On Fri, 26 Aug 2016 00:25:34 +0200 > Auger Eric wrote: > >> Hi Robin, >> >> On 23/08/2016 21:05, Robin Murphy wrote: >>> When an MSI doorbell is located downstream of an IOMMU, attaching >>> devices to a

Re: [PATCH v5 19/19] iommu/dma: Add support for mapping MSIs

2016-08-25 Thread Auger Eric
Hi Robin, On 23/08/2016 21:05, Robin Murphy wrote: > When an MSI doorbell is located downstream of an IOMMU, attaching > devices to a DMA ops domain and switching on translation leads to a rude > shock when their attempt to write to the physical address returned by > the irqchip driver faults (or

Re: [PATCH v5 19/19] iommu/dma: Add support for mapping MSIs

2016-08-24 Thread Robin Murphy
On 24/08/16 09:16, Thomas Gleixner wrote: > On Tue, 23 Aug 2016, Robin Murphy wrote: >> +cookie = domain->iova_cookie; >> +iovad = >iovad; >> + >> +spin_lock(>msi_lock); >> +list_for_each_entry(msi_page, >msi_page_list, list) >> +if (msi_page->phys_hi == msg->address_hi

Re: [PATCH v5 19/19] iommu/dma: Add support for mapping MSIs

2016-08-24 Thread Thomas Gleixner
On Tue, 23 Aug 2016, Robin Murphy wrote: > + cookie = domain->iova_cookie; > + iovad = >iovad; > + > + spin_lock(>msi_lock); > + list_for_each_entry(msi_page, >msi_page_list, list) > + if (msi_page->phys_hi == msg->address_hi && > + msi_page->phys_lo -

[PATCH v5 19/19] iommu/dma: Add support for mapping MSIs

2016-08-23 Thread Robin Murphy
When an MSI doorbell is located downstream of an IOMMU, attaching devices to a DMA ops domain and switching on translation leads to a rude shock when their attempt to write to the physical address returned by the irqchip driver faults (or worse, writes into some already-mapped buffer) and no