mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	avi@redhat.com, jan.kiszka@siemens.com
Subject: Re: [PATCH v2 1/2] kvm: unmap pages from the iommu when slots are removed
Date: Wed, 11 Apr 2012 23:03:57 -0300	[thread overview]
Message-ID: <20120412020357.GB3037@amt.cnet> (raw)
In-Reply-To: <20120411155149.13227.85904.stgit@bling.home>

On Wed, Apr 11, 2012 at 09:51:49AM -0600, Alex Williamson wrote:
> We've been adding new mappings, but not destroying old mappings.
> This can lead to a page leak as pages are pinned using
> get_user_pages, but only unpinned with put_page if they still
> exist in the memslots list on vm shutdown.  A memslot that is
> destroyed while an iommu domain is enabled for the guest will
> therefore result in an elevated page reference count that is
> never cleared.
> 
> Additionally, without this fix, the iommu is only programmed
> with the first translation for a gpa.  This can result in
> peer-to-peer errors if a mapping is destroyed and replaced by a
> new mapping at the same gpa as the iommu will still be pointing
> to the original, pinned memory address.
> 
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>

Applied, thanks.


  reply	other threads:[~2012-04-12  4:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11 15:51 [PATCH v2 0/2] kvm: iommu unmap fixes Alex Williamson
2012-04-11 15:51 ` [PATCH v2 1/2] kvm: unmap pages from the iommu when slots are removed Alex Williamson
2012-04-12  2:03   ` Marcelo Tosatti [this message]
2012-04-11 15:51 ` [PATCH v2 2/2] kvm: unpin guest and free iommu domain after deassign last device Alex Williamson
2012-04-11 15:59 ` [PATCH v2 0/2] kvm: iommu unmap fixes Greg KH
2012-04-11 16:17   ` Alex Williamson

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=20120412020357.GB3037@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=avi@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®