From: Rusty Russell <rusty@rustcorp.com.au>
To: Mark McLoughlin <markmc@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Avi Kivity <avi@qumranet.com>,
kvm@vger.kernel.org
Subject: Re: [PATCH 1/5] vring: Replace mmap() interface with ioctl()
Date: Sat, 14 Jun 2008 19:02:53 +1000 [thread overview]
Message-ID: <200806141902.54119.rusty@rustcorp.com.au> (raw)
In-Reply-To: <1213365481-23460-2-git-send-email-markmc@redhat.com>
On Friday 13 June 2008 23:57:57 Mark McLoughlin wrote:
> /dev/vring's mmap() interface is a strange creature. It
> serves as a way for userland to supply the address of the
> already allocated ring descriptors, but causes those pages
> to be re-maped as a natural side effect of the mmap()
>
> This is not an issue for lguest because it does the mmap()
> before even starting the guest. However, in the case of kvm,
> the guest allocates the ring and informs the host of its
> addresss. If we then mmap() it, we cause it to be remapped
> to new pages which the vring driver will then use.
Yeah, ugly, huh? I didn't like it either, but my ioctl aversion forced me to
consider mmap. Then my aversion to rewriting the mmap code lead me to
this "simply replace the user pages" hack :)
Fix the couple of minor issues reported here and I'll happily apply it.
BTW, including base and limit makes sense. I didn't do this to start since
Avi doesn't want to guarentee kvm's guest mapping linear (of course he's only
doing this so he can fix it later).
Cheers,
Rusty.
next prev parent reply other threads:[~2008-06-14 9:03 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-13 13:57 [PATCH 0/0][RFC] KVM use of vringfd Mark McLoughlin
2008-06-13 13:57 ` [PATCH 1/5] vring: Replace mmap() interface with ioctl() Mark McLoughlin
2008-06-13 13:57 ` [PATCH 2/5] lguest: Use VRINGSETINFO ioctl() instead of mmap() Mark McLoughlin
2008-06-13 13:57 ` [PATCH 3/5] kvm: qemu: Publish last_avail index in the ring Mark McLoughlin
2008-06-13 13:58 ` [PATCH 4/5] kvm: qemu: Use vringfd to eliminate copies Mark McLoughlin
2008-06-13 13:58 ` [PATCH 5/5] kvm: qemu: Add support for partial csums and GSO Mark McLoughlin
2008-06-14 23:28 ` [PATCH 4/5] kvm: qemu: Use vringfd to eliminate copies Anthony Liguori
2008-06-16 2:10 ` Rusty Russell
2008-06-16 14:02 ` Anthony Liguori
2008-06-16 14:58 ` Avi Kivity
2008-06-18 5:43 ` Rusty Russell
2008-06-18 14:01 ` Avi Kivity
2008-06-17 14:08 ` Mark McLoughlin
2008-06-17 14:54 ` Anthony Liguori
2008-06-17 15:45 ` Mark McLoughlin
2008-06-13 14:09 ` [PATCH 1/5] vring: Replace mmap() interface with ioctl() Avi Kivity
2008-06-17 12:19 ` Mark McLoughlin
2008-06-18 14:05 ` Avi Kivity
2008-06-14 9:02 ` Rusty Russell [this message]
2008-06-14 14:20 ` Avi Kivity
2008-06-14 23:23 ` Anthony Liguori
2008-06-15 15:24 ` Avi Kivity
2008-06-15 19:13 ` Anthony Liguori
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=200806141902.54119.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=aliguori@us.ibm.com \
--cc=avi@qumranet.com \
--cc=kvm@vger.kernel.org \
--cc=markmc@redhat.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