From: David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
To: Alex Williamson
<alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org"
<iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
cantuc-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org
Subject: Re: [RFC PATCH] iommu/vt-d: Clean up and fix page table clear/free behaviour
Date: Mon, 17 Mar 2014 16:23:12 +0000 [thread overview]
Message-ID: <1395073392.4588.51.camel@i7.infradead.org> (raw)
In-Reply-To: <1395070209.8201.8.camel-85EaTFmN5p//9pzu0YdTqQ@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 702 bytes --]
On Mon, 2014-03-17 at 09:30 -0600, Alex Williamson wrote:
>
> I think you've likely already figured out, but it should be stated in
> this thread, yes interfaces do rely on the insane "tell me if you
> unmapped more than I asked for" API.
I'm going to decouple this patch from that question by adding a simple
hack at the start of iommu_unmap() to look at the page tables and see
the size of page that happens to be mapped, then increase the size
parameter accordingly. Then assume sanity from that point onwards.
That's basically the same as my other suggestion of augmenting
iommu_iova_to_phys() to return the size information, but as a private
implementation detail.
--
dwmw2
[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5745 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2014-03-17 16:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-06 16:57 [RFC PATCH] iommu/vt-d: Clean up and fix page table clear/free behaviour David Woodhouse
[not found] ` <1394125043.9994.13.camel-W2I5cNIroUsVm/YvaOjsyQ@public.gmane.org>
2014-03-17 15:30 ` Alex Williamson
[not found] ` <1395070209.8201.8.camel-85EaTFmN5p//9pzu0YdTqQ@public.gmane.org>
2014-03-17 16:23 ` David Woodhouse [this message]
[not found] ` <1395073392.4588.51.camel-W2I5cNIroUsVm/YvaOjsyQ@public.gmane.org>
2014-03-20 12:00 ` [PATCH 1/4] iommu/vt-d: Clean up size handling for intel_iommu_unmap() David Woodhouse
2014-03-20 12:00 ` [PATCH 2/4] iommu/vt-d: Clean up and fix page table clear/free behaviour David Woodhouse
2014-03-20 12:00 ` [PATCH 3/4] iommu/vt-d: Honour intel_iommu=sp_off for non-VMM domains David Woodhouse
2014-03-20 12:00 ` [PATCH 4/4] iommu/vt-d: Be less pessimistic about domain coherency where possible David Woodhouse
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=1395073392.4588.51.camel@i7.infradead.org \
--to=dwmw2-wegcikhe2lqwvfeawa7xhq@public.gmane.org \
--cc=alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=cantuc-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).