Re: [PATCH v1 4/9] iommu/vt-d: Add bounce buffer API for domain map/unmap

2019-03-12 Thread Lu Baolu
Hi again, On 3/13/19 10:04 AM, Lu Baolu wrote: Hi, On 3/13/19 12:38 AM, Christoph Hellwig wrote: On Tue, Mar 12, 2019 at 02:00:00PM +0800, Lu Baolu wrote: This adds the APIs for bounce buffer specified domain map() and unmap(). The start and end partial pages will be mapped with bounce buffer

Re: [PATCH v1 4/9] iommu/vt-d: Add bounce buffer API for domain map/unmap

2019-03-12 Thread Lu Baolu
Hi, On 3/13/19 12:38 AM, Christoph Hellwig wrote: On Tue, Mar 12, 2019 at 02:00:00PM +0800, Lu Baolu wrote: This adds the APIs for bounce buffer specified domain map() and unmap(). The start and end partial pages will be mapped with bounce buffered pages instead. This will enhance the security

Re: [PATCH 02/13] driver core: Remove the link if there is no driver with AUTO flag

2019-03-12 Thread Evan Green
On Tue, Mar 12, 2019 at 7:21 AM Matthias Brugger wrote: > > > > On 05/03/2019 20:03, Evan Green wrote: > > On Wed, Feb 27, 2019 at 6:33 AM Yong Wu wrote: > >> > >> On Mon, 2019-02-25 at 15:53 -0800, Evan Green wrote: > >>> On Mon, Dec 31, 2018 at 8:52 PM Yong Wu wrote: > > DL_FLAG_AUTO

Re: [PATCH v2 07/12] NTB: Introduce functions to calculate multi-port resource index

2019-03-12 Thread Logan Gunthorpe
On 2019-03-12 2:42 p.m., Serge Semin wrote: > If you don't want to add a large semantic and infrastructure change at > this point, then it would be better to leave NTB port API the way it is > now, and use logical port indexes in the ntb_peer_resource_idx() method. > You'd also need to use this

Re: [PATCH v2 07/12] NTB: Introduce functions to calculate multi-port resource index

2019-03-12 Thread Serge Semin
On Wed, Mar 06, 2019 at 04:22:33PM -0700, Logan Gunthorpe wrote: > > On 2019-03-06 3:45 p.m., Serge Semin wrote: > [Snip] > > Pretty sure everything above is just agreement... > > > So your current approach is inbound MW-centralized, while mine is developed > > around the outbound MWs. > > I do

Re: [PATCH v1 4/9] iommu/vt-d: Add bounce buffer API for domain map/unmap

2019-03-12 Thread Christoph Hellwig
On Tue, Mar 12, 2019 at 02:00:00PM +0800, Lu Baolu wrote: > This adds the APIs for bounce buffer specified domain > map() and unmap(). The start and end partial pages will > be mapped with bounce buffered pages instead. This will > enhance the security of DMA buffer by isolating the DMA > attacks f

Re: [PATCH] iommu/amd: fix sg->dma_address for sg->offset bigger than PAGE_SIZE

2019-03-12 Thread Alexander Duyck
On Tue, 2019-03-12 at 08:08 +0100, Stanislaw Gruszka wrote: > On Mon, Mar 11, 2019 at 08:47:44AM -0700, Alexander Duyck wrote: > > > drivers/iommu/amd_iommu.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c

Re: [PATCH 02/13] driver core: Remove the link if there is no driver with AUTO flag

2019-03-12 Thread Matthias Brugger
On 05/03/2019 20:03, Evan Green wrote: > On Wed, Feb 27, 2019 at 6:33 AM Yong Wu wrote: >> >> On Mon, 2019-02-25 at 15:53 -0800, Evan Green wrote: >>> On Mon, Dec 31, 2018 at 8:52 PM Yong Wu wrote: DL_FLAG_AUTOREMOVE_CONSUMER/SUPPLIER means "Remove the link automatically on cons

Re: MT76x2U crashes XHCI driver on AMD Ryzen system

2019-03-12 Thread Stanislaw Gruszka
On Mon, Mar 11, 2019 at 09:43:19AM +0100, Stanislaw Gruszka wrote: > > > However after fixing that mt76usb still did not work. To make things > > > work we had to change rx frag size from 2048 to PAGE_SIZE and change > > > virt_to_head_page() to virt_to_page() when setting SG's. > > > > > I think I

Re: [PATCH] iommu/amd: fix sg->dma_address for sg->offset bigger than PAGE_SIZE

2019-03-12 Thread Stanislaw Gruszka
On Mon, Mar 11, 2019 at 08:47:44AM -0700, Alexander Duyck wrote: > > drivers/iommu/amd_iommu.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c > > index 6b0760dafb3e..949621f33624 100644 > > --- a/drivers/iommu/a