qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: pugs@ieee.org
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] vfio: Allow sub-ranges to be unmapped
Date: Tue, 24 May 2011 22:10:31 -0600	[thread overview]
Message-ID: <1306296631.3100.115.camel@x201> (raw)
In-Reply-To: <20110510172903.9289.99964.stgit@s20.home>

On Tue, 2011-05-10 at 12:06 -0600, Alex Williamson wrote:
> We're currently very strict in requiring that DMA unmaps are done
> using the exact same regions as used for the original mapping.
> In a VM environment, we may want to change sub-areas of a previous
> mapping without tearing down the entire region.  This might also
> also us to support ballooning or memory hotplug in a guest making
> use of a vfio device.
> 
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> ---
> 
> Tom,
> 
> I'm a little confused why we have the list of mapped areas attached
> to the listener.  If we want to support multiple devices sharing the same
> uiommu, don't we instead need to create a separate object hosting this
> list with reference counting so multiple vdevs can point to it?  I would
> expect that's where the locked_page accounting would be moved to as well.
> There also seems to be support that each vdev could have multiple
> listeners, each with their own list of dma mapped areas, but we can
> only have one udomain per vdev, which just further confuses me.  Can you
> hlp me out?  Thanks,
> 
> Alex
> 
> Note the change of npage to unsigned long below is just to avoid needing
> to cast it every time we do a << PAGE_SHIFT to avoid overflow.

Self NAK on this last change, it breaks locked page accounting since we
rely on a sign bit there.  I'll try just using a macro instead to avoid
excessive casting.  The follow-up uiommu sharing patch is dependent on
this, so I'll respin both.  Thanks,

Alex

      reply	other threads:[~2011-05-25  4:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-10 18:06 [Qemu-devel] [PATCH] vfio: Allow sub-ranges to be unmapped Alex Williamson
2011-05-25  4:10 ` Alex Williamson [this message]

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=1306296631.3100.115.camel@x201 \
    --to=alex.williamson@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=pugs@ieee.org \
    --cc=qemu-devel@nongnu.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).