Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-11-17 Thread Jacob Pan
On Fri, 17 Nov 2017 17:44:57 + Casey Leedom wrote: > | From: Raj, Ashok > | Sent: Friday, November 17, 2017 7:48 AM > | > | Reported by: Harsh > | Reviewed by: Ashok Raj > | Tested by: Jacob Pan

Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-11-17 Thread Casey Leedom
| From: Raj, Ashok | Sent: Friday, November 17, 2017 7:48 AM | | Reported by: Harsh | Reviewed by: Ashok Raj | Tested by: Jacob Pan Thanks everyone! I've updated our internal bug on this issue and noted

Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-11-17 Thread Raj, Ashok
Hi Alex On Fri, Nov 17, 2017 at 09:18:14AM -0700, Alex Williamson wrote: > On Thu, 16 Nov 2017 13:09:33 -0800 > "Raj, Ashok" wrote: > > > > > > > What do we do about this? I certainly can't rip out large page support > > > and put a stable tag on the patch. I'm not

Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-11-17 Thread Alex Williamson
On Thu, 16 Nov 2017 13:09:33 -0800 "Raj, Ashok" wrote: > Hi Alex > > On Thu, Nov 16, 2017 at 02:32:44PM -0700, Alex Williamson wrote: > > On Wed, 15 Nov 2017 15:54:56 -0800 > > Jacob Pan wrote: > > > > > Hi Alex and all, > > > > > > Just

Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-11-16 Thread Raj, Ashok
Hi Alex On Thu, Nov 16, 2017 at 02:32:44PM -0700, Alex Williamson wrote: > On Wed, 15 Nov 2017 15:54:56 -0800 > Jacob Pan wrote: > > > Hi Alex and all, > > > > Just wondering if you could merge Robin's patch for the next rc. From > > all our testing, this seems

Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-11-16 Thread Alex Williamson
On Wed, 15 Nov 2017 15:54:56 -0800 Jacob Pan wrote: > Hi Alex and all, > > Just wondering if you could merge Robin's patch for the next rc. From > all our testing, this seems to be a solid fix and should be included in > the stable releases as well. Hi Jacob,

Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-11-15 Thread Jacob Pan
Hi Alex and all, Just wondering if you could merge Robin's patch for the next rc. From all our testing, this seems to be a solid fix and should be included in the stable releases as well. Thanks, Jacob On Mon, 6 Nov 2017 10:47:09 -0800 Jacob Pan wrote: > On

Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-11-06 Thread Jacob Pan
On Fri, 6 Oct 2017 16:43:09 +0200 Joerg Roedel wrote: > On Tue, Oct 03, 2017 at 07:05:17PM +0100, Robin Murphy wrote: > > Now, there are indeed plenty of drivers and subsystems which do > > work on lists of explicitly single pages - anything doing some > > variant of "addr =

Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-10-06 Thread Raj, Ashok
On Fri, Oct 06, 2017 at 04:43:09PM +0200, Joerg Roedel wrote: > On Tue, Oct 03, 2017 at 07:05:17PM +0100, Robin Murphy wrote: > > Now, there are indeed plenty of drivers and subsystems which do work on > > lists of explicitly single pages - anything doing some variant of > > "addr =

Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-10-06 Thread Joerg Roedel
On Tue, Oct 03, 2017 at 07:05:17PM +0100, Robin Murphy wrote: > Now, there are indeed plenty of drivers and subsystems which do work on > lists of explicitly single pages - anything doing some variant of > "addr = kmap_atomic(sg_page(sg)) + sg->offset;" is easy to spot - but I > don't think DMA

Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-10-03 Thread Casey Leedom
| From: Harsh Jain | Sent: Tuesday, October 3, 2017 5:22 AM | | Hi Robin/Ashok, | | Find attached trace of DMA write error. I had a look on trace but didn't | find anything suspicious. | | Let me know if you need more trace. As a reminder, Harsh and Atul will be waking up in a

Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-10-03 Thread David Woodhouse
On Tue, 2017-10-03 at 19:05 +0100, Robin Murphy wrote: > > Now, there are indeed plenty of drivers and subsystems which do work on > lists of explicitly single pages - anything doing some variant of > "addr = kmap_atomic(sg_page(sg)) + sg->offset;" is easy to spot - but I > don't think DMA API

Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-10-03 Thread Robin Murphy
On 03/10/17 13:55, David Woodhouse wrote: > On Thu, 2017-09-28 at 15:14 +0100, Robin Murphy wrote: >> The intel-iommu DMA ops fail to correctly handle scatterlists where >> sg->offset is greater than PAGE_SIZE - the IOVA allocation is computed >> appropriately based on the page-aligned portion of

Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-10-03 Thread David Woodhouse
On Thu, 2017-09-28 at 15:14 +0100, Robin Murphy wrote: > The intel-iommu DMA ops fail to correctly handle scatterlists where > sg->offset is greater than PAGE_SIZE - the IOVA allocation is computed > appropriately based on the page-aligned portion of the offset, but the > mapping is set up

Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-09-29 Thread Casey Leedom
| From: Harsh Jain | Sent: Friday, September 29, 2017 1:14:45 AM | | Robin, | | I tried running patch on our test setup. | | With "intel_iommu=on" : I can see single occurrence of DMAR Write failure | on perf traffic with 10 thread. | | [ 749.616480] perf: interrupt

Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-09-29 Thread Harsh Jain
Robin, I tried running patch on our test setup. With "intel_iommu=on" : I can see single occurrence of DMAR Write failure on perf traffic with 10 thread.     [  749.616480] perf: interrupt took too long (3203 > 3202), lowering kernel.perf_event_max_sample_rate to 62000 [  852.500671] DMAR:

Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-09-28 Thread Raj, Ashok
Hi Robin thanks.. i have no idea.. i see all the other patches from you :-) my email has decided to play games with me i suppose :-) On Thu, Sep 28, 2017 at 05:59:11PM +0100, Robin Murphy wrote: > I hope our email server hasn't got blacklisted again... Said patch is > the top of this very thread

Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-09-28 Thread Raj, Ashok
Hi Casey On Thu, Sep 28, 2017 at 04:17:59PM +, Casey Leedom wrote: > Thanks Robin. Harsh can certainly test your latest patch as soon as he's > back in the office tomorrow morning India time. If your patch works and is > accepted, it sounds like the commit would be important enough to

Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-09-28 Thread Casey Leedom
Thanks Robin. Harsh can certainly test your latest patch as soon as he's back in the office tomorrow morning India time. If your patch works and is accepted, it sounds like the commit would be important enough to consider backporting into various Long-Term Support releases and the affected

[PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-09-28 Thread Robin Murphy
The intel-iommu DMA ops fail to correctly handle scatterlists where sg->offset is greater than PAGE_SIZE - the IOVA allocation is computed appropriately based on the page-aligned portion of the offset, but the mapping is set up relative to sg->page, which means it fails to actually cover the whole