From: Rusty Russell <rusty@rustcorp.com.au>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: virtualization@lists.linux-foundation.org
Subject: Re: [PATCH 1/6] virtio_host: host-side implementation of virtio rings.
Date: Tue, 22 Jan 2013 17:27:10 +1030 [thread overview]
Message-ID: <877gn5hfi1.fsf@rustcorp.com.au> (raw)
In-Reply-To: <87k3r6uotw.fsf@rustcorp.com.au>
Rusty Russell <rusty@rustcorp.com.au> writes:
> "Michael S. Tsirkin" <mst@redhat.com> writes:
>> On Mon, Jan 21, 2013 at 10:22:03PM +1030, Rusty Russell wrote:
>>> Rusty Russell <rusty@rustcorp.com.au> writes:
>>> > "Michael S. Tsirkin" <mst@redhat.com> writes:
>>> >>> + iov->iov[iov->i].iov_base = (__force __user void *)addr;
>>> >>> + iov->iov[iov->i].iov_len = desc.len;
>>> >>
>>> >> The following comment from the previous version still applies:
>>> >> > This looks like it won't do the right thing if desc.len spans multiple
>>> >> > ranges. I don't know if this happens in practice but this is something
>>> >> > vhost supports ATM.
>>> >> in otgher words, we might need to split a single desc to multiple
>>> >> iov entries.
>>> >
>>> > Ah, separate offsets for consecutive ranges, right. I'd prefer to say
>>> > "don't do that", but qemu is rarely sane. I'll fix it.
>>>
>>> Actually, you make the same assumption for vhost, with your use of
>>> getuser and putuser for accessing the ring.
>>
>> There's no requirement that ring is mapped directly into guest
>> memory. If a ring is not contigious qemu can allocate
>> it's own virtuall contigious rings and copy data back and forth.
>
> True, but it's the guest which allocates the ring. If QEMU sets up a
> guest with a offset-discontiguous mapping, vhost would be unreliable
> today.
My mistake: the ring addresses handed through the ioctl already
translated, so you can't specify such a thing.
I struck this when I tried to clean it up: this is an asymmetry between
the toplevel descriptor table and any indirect ones.
Cheers,
Rusty.
next prev parent reply other threads:[~2013-01-22 6:57 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-17 10:29 [PATCH 1/6] virtio_host: host-side implementation of virtio rings Rusty Russell
2013-01-17 10:29 ` [PATCH 2/6] tools/virtio: fix compile Rusty Russell
2013-01-17 10:29 ` [PATCH 3/6] tools/virtio: separate headers more Rusty Russell
2013-01-17 10:29 ` [PATCH 4/6] tools/virtio: add vring_test Rusty Russell
2013-01-22 8:25 ` Asias He
2013-01-22 23:03 ` Rusty Russell
2013-01-23 1:40 ` Asias He
2013-01-24 2:22 ` Rusty Russell
2013-01-17 10:29 ` [PATCH 5/6] vringh: separate callback for notification Rusty Russell
2013-01-17 10:29 ` [PATCH 6/6] tools/virtio: adapt for API changes Rusty Russell
2013-01-17 11:23 ` [PATCH 1/6] virtio_host: host-side implementation of virtio rings Michael S. Tsirkin
2013-01-17 11:49 ` Sjur Brændeland
2013-01-17 12:08 ` Michael S. Tsirkin
2013-01-21 2:36 ` Rusty Russell
2013-01-22 14:54 ` Sjur Brændeland
2013-01-21 2:34 ` Rusty Russell
2013-01-21 9:41 ` Michael S. Tsirkin
2013-01-21 11:52 ` Rusty Russell
2013-01-21 12:24 ` Michael S. Tsirkin
2013-01-21 12:40 ` Michael S. Tsirkin
2013-01-21 22:57 ` Rusty Russell
2013-01-22 6:57 ` Rusty Russell [this message]
2013-01-22 7:13 ` Rusty Russell
2013-01-22 8:12 ` Asias He
2013-01-23 1:56 ` Rusty Russell
2013-02-04 20:29 ` Sjur Brændeland
2013-02-04 21:44 ` Rusty Russell
2013-02-12 18:58 ` Sjur Brændeland
2013-02-13 10:25 ` Rusty Russell
2013-02-14 14:54 ` Sjur Brændeland
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=877gn5hfi1.fsf@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=mst@redhat.com \
--cc=virtualization@lists.linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.