Linux IOMMU Development
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
To: Christian Zander
	<christian-dt00mrq0sMmU+1/U8MakDg@public.gmane.org>,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Cc: Jinpu Wang <jinpu.wang-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
Subject: Re: [PATCH] iommu/vt-d: fix range computation when making room for large pages
Date: Tue, 13 Oct 2015 20:37:58 +0100	[thread overview]
Message-ID: <1444765078.125804.36.camel@infradead.org> (raw)
In-Reply-To: <20150610164145.GA7583-S8cdEeysnC83VuCnIjKjaZqQE7yCjDx5@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 1617 bytes --]

On Wed, 2015-06-10 at 09:41 -0700, Christian Zander wrote:
> In preparation for the installation of a large page, any small page
> tables that may still exist in the target IOV address range are
> removed.  However, if a scatter/gather list entry is large enough to
> fit more than one large page, the address space for those secondary
> large pages is not cleared of conflicting small page tables.
> 
> This can cause legitimate mapping requests to fail with errors of the
> form below, potentially followed by a series of IOMMU faults:
> 
> ERROR: DMA PTE for vPFN 0xfde00 already set (to 7f83a4003 not 7e9e00083)
> 
> In this example, a 4MB scatter/gather list entry resulted in the
> successful installation of a large page @ vPFN 0xfdc00, followed by
> a failed attempt to install another large page @ vPFN 0xfde00, due to
> the presence of a pointer to a small page table @ 0x7f83a4000.
> 
> To address this problem, compute the number of large pages that fit
> into a given scatter/gather list entry, and use it to derive the
> last vPFN covered by the large page(s).
> 
> Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Signed-off-by: Christian Zander <christian-dt00mrq0sMmU+1/U8MakDg@public.gmane.org>

Thanks; the fix looks correct. I've pushed it with minor cosmetic fixes
to my tree, and will send it on to Linus in a few days assuming nothing
explodes (which of course it shouldn't).

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org                              Intel Corporation


[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5691 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  parent reply	other threads:[~2015-10-13 19:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-10 16:41 [PATCH] iommu/vt-d: fix range computation when making room for large pages Christian Zander
     [not found] ` <20150610164145.GA7583-S8cdEeysnC83VuCnIjKjaZqQE7yCjDx5@public.gmane.org>
2015-10-13 19:37   ` David Woodhouse [this message]
     [not found]     ` <1444765078.125804.36.camel-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2015-10-13 20:27       ` Christian Zander

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=1444765078.125804.36.camel@infradead.org \
    --to=dwmw2-wegcikhe2lqwvfeawa7xhq@public.gmane.org \
    --cc=christian-dt00mrq0sMmU+1/U8MakDg@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=jinpu.wang-EIkl63zCoXaH+58JC4qpiA@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