From: Anthony Liguori <aliguori@us.ibm.com>
To: Hollis Blanchard <hollisb@us.ibm.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
kvm-ppc <kvm-ppc@vger.kernel.org>, kvm <kvm@vger.kernel.org>
Subject: Re: large page size virtio issues
Date: Wed, 05 Nov 2008 14:08:18 -0600 [thread overview]
Message-ID: <4911FD32.9050301@us.ibm.com> (raw)
In-Reply-To: <1225914634.26835.102.camel@localhost.localdomain>
Hollis Blanchard wrote:
> Actually there's an additional complication: PAGE_SIZE is entrenched in
> the layout of the ring structure itself (large "struct vring" comment in
> include/linux/virtio_ring.h). Callers of vring_size() demonstrate this
> problem.
>
> I believe the vring is split across two pages so that it could be
> directly mapped by two untrusted guests: the producer would have RW
> access to the descriptors and the "available" fields, while the consumer
> would have only RO access. I don't think this is yet implemented; is it
> still planned?
>
Rusty experimented with it but I don't think anyone has done anything
seriously with it.
> It looks like vring_size() et al were carefully written to allow
> arbitrary page sizes, so for now I'll assume that a struct vring that is
> contained completely within a single guest mapping is OK and work up a
> patch.
>
It was written that way so that vring_size() could be used in userspace
where there isn't a PAGE_SIZE defined. Rusty just passes in
getpagesize() in the lguest userspace.
Pure evil if you ask me :-)
> It's worth noting that the PFN_SHIFT question (in the other thread) is a
> separate issue. I could have PFN_SHIFT=10 but define VRING_PAGE_SIZE=4K
> for internal alignment. I'm a little nervous about making PPC the only
> arch with VRING_PAGE_SIZE=1K, since that might affect my vring layout in
> "unusual" ways if it expands beyond 1K but stays inside 4K.
>
This is starting to get a little hairy. Maybe 64k guest pages is asking
for trouble? Are you sure other things aren't breaking all over the
place with these patches in place?
Regards,
Anthony Liguori
next prev parent reply other threads:[~2008-11-05 20:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1225836860.15410.32.camel@localhost.localdomain>
[not found] ` <200811052316.47127.rusty@rustcorp.com.au>
[not found] ` <4911A87A.4010209@us.ibm.com>
[not found] ` <4911A87A.4010209-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-11-05 16:32 ` large page size virtio issues Hollis Blanchard
[not found] ` <1225902738.26835.51.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-11-05 17:25 ` Anthony Liguori
2008-11-05 17:31 ` Hollis Blanchard
[not found] ` <1225906304.26835.75.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-11-05 17:33 ` Anthony Liguori
2008-11-05 17:46 ` Hollis Blanchard
[not found] ` <200811052316.47127.rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
2008-11-05 19:50 ` Hollis Blanchard
2008-11-05 20:08 ` Anthony Liguori [this message]
[not found] ` <4911FD32.9050301-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-11-05 20:29 ` Hollis Blanchard
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=4911FD32.9050301@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=hollisb@us.ibm.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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