Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1741776
| From | "Raj, Ashok" <ashok.raj@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling |
| Date | 2017-09-28 20:40 +0200 |
| Message-ID | <uuLT4-42q-21@gated-at.bofh.it> (permalink) |
| References | <uuHPs-1Bi-3@gated-at.bofh.it> <uuJHA-2JP-9@gated-at.bofh.it> <uuJRf-2NO-5@gated-at.bofh.it> <uuKkh-2Zx-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 we're replying on[1] - you were definitely
> on cc :(
(sg->dma_address + sg->dma_len) ----+
sg->dma_address ---------+ |
iov_pfn------+ | |
| | |
v v v
iova: a b c d e f
|--------|--------|--------|--------|--------|
<...calculated....>
[_____mapped______]
pfn: 0 1 2 3 4 5
|--------|--------|--------|--------|--------|
^ ^ ^
| | |
sg->page ----+ | |
sg->offset --------------+ |
(sg->offset + sg->length) ----------+
The picture seems right. Looking at the code i'm not sure if i understand
it correctly.
pgoff = sg->offset & ~PAGE_MASK;
this gets the offset past the start of page.
sg->dma_address = ((dma_addr_t)iov_pfn << VTD_PAGE_SHIFT) + pgoff;
this would set dma_address at b+off instead of starting at c+off correct?
>
> Robin
>
> [1]:https://lists.linuxfoundation.org/pipermail/iommu/2017-September/024371.html
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] iommu/vt-d: Fix scatterlist offset handling Robin Murphy <robin.murphy@arm.com> - 2017-09-28 16:20 +0200
Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling Casey Leedom <leedom@chelsio.com> - 2017-09-28 18:20 +0200
Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling "Raj, Ashok" <ashok.raj@intel.com> - 2017-09-28 18:30 +0200
Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling Robin Murphy <robin.murphy@arm.com> - 2017-09-28 19:00 +0200
Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling "Raj, Ashok" <ashok.raj@intel.com> - 2017-09-28 20:40 +0200
Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling Harsh Jain <Harsh@chelsio.com> - 2017-09-29 10:20 +0200
Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling Casey Leedom <leedom@chelsio.com> - 2017-09-29 18:20 +0200
csiph-web