From: Joerg Roedel <joro@8bytes.org>
To: Robin Murphy <robin.murphy@arm.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
ashok.raj@intel.com, leedom@chelsio.com, Harsh@chelsio.com,
herbert@gondor.apana.org.au, iommu@lists.linux-foundation.org,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling
Date: Fri, 6 Oct 2017 16:43:09 +0200 [thread overview]
Message-ID: <20171006144309.GA30803@8bytes.org> (raw)
In-Reply-To: <db8c70d7-5978-20e8-d29a-91a4312f97dd@arm.com>
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 API implementations are in a position to make any kind
> of assumption; nearly all of them just shut up and handle sg->length
> bytes from sg_phys(sg) without questioning the caller, and I reckon
> that's exactly what they should be doing.
I agree with that, it is not explicitly forbidden to have an
sg->offset > PAGE_SIZE and most IOMMU drivers handle this case.
So this is a problem I'd like to see resolved in the VT-d driver too. If
nobody comes up with a correct fix soon I'll apply this one and rip out
the large-page support from __domain_mapping() to make it work.
Speaking of __domain_mapping(), this function is a big unmaintainable
mess which should be split and rewritten. A clean and maintainable
rewrite can alse re-add the large-page support.
Regards,
Joerg
next prev parent reply other threads:[~2017-10-06 14:43 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-28 14:14 [PATCH] iommu/vt-d: Fix scatterlist offset handling Robin Murphy
2017-09-28 16:17 ` Casey Leedom
2017-09-28 13:29 ` Raj, Ashok
2017-09-28 16:59 ` Robin Murphy
2017-09-28 15:43 ` Raj, Ashok
2017-10-03 19:36 ` Raj, Ashok
2017-09-29 8:14 ` Harsh Jain
2017-09-29 16:18 ` Casey Leedom
[not found] ` <e2c92d3a-3d5d-a0eb-7d5f-a9453e48cfd5@chelsio.com>
2017-10-03 22:22 ` Casey Leedom
2017-10-03 12:55 ` David Woodhouse
2017-10-03 18:05 ` Robin Murphy
2017-10-03 22:16 ` David Woodhouse
2017-10-04 11:18 ` Robin Murphy
2017-10-06 14:43 ` Joerg Roedel [this message]
2017-10-06 12:54 ` Raj, Ashok
2017-11-06 18:47 ` Jacob Pan
2017-11-15 23:54 ` Jacob Pan
2017-11-16 21:32 ` Alex Williamson
2017-11-16 21:09 ` Raj, Ashok
2017-11-17 16:18 ` Alex Williamson
2017-11-17 15:48 ` Raj, Ashok
2017-11-17 17:44 ` Casey Leedom
2017-11-17 18:09 ` Jacob Pan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171006144309.GA30803@8bytes.org \
--to=joro@8bytes.org \
--cc=Harsh@chelsio.com \
--cc=ashok.raj@intel.com \
--cc=dwmw2@infradead.org \
--cc=herbert@gondor.apana.org.au \
--cc=iommu@lists.linux-foundation.org \
--cc=leedom@chelsio.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox