From: "Michael S. Tsirkin" <mst@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org, Blue Swirl <blauwirbel@gmail.com>,
khoa@us.ibm.com, Paolo Bonzini <pbonzini@redhat.com>,
Asias He <asias@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v6 04/12] dataplane: add virtqueue vring code
Date: Wed, 12 Dec 2012 18:32:55 +0200 [thread overview]
Message-ID: <20121212163255.GC17446@redhat.com> (raw)
In-Reply-To: <20121212155547.GC16956@stefanha-thinkpad.redhat.com>
On Wed, Dec 12, 2012 at 04:55:47PM +0100, Stefan Hajnoczi wrote:
> On Tue, Dec 11, 2012 at 04:18:20PM +0200, Michael S. Tsirkin wrote:
> > On Mon, Dec 10, 2012 at 02:09:37PM +0100, Stefan Hajnoczi wrote:
> > > + iov->iov_base = hostmem_lookup(&vring->hostmem, desc.addr, desc.len,
> > > + desc.flags & VRING_DESC_F_WRITE);
> > > + if (!iov->iov_base) {
> > > + error_report("Failed to map indirect descriptor"
> > > + "addr %#" PRIx64 " len %u",
> > > + (uint64_t)desc.addr, desc.len);
> > > + vring->broken = true;
> > > + return -EFAULT;
> > > + }
> > > + iov->iov_len = desc.len;
> > > + iov++;
> >
> > Hmm, this assumes a descriptor can not cross a memory
> > region boundary. Is this really guaranteed?
> > vhost does not make such assumptions.
>
> Just responded in the other subthread.
>
> hw/virtio.c doesn't split across memory region boundaries. This suggest
> we don't hit this in practice. If it does we'll print the error and
> disable the device until virtio reset.
>
> I can add it to my TODO list. hw/virtio.c also uses exit(1) for
> guest-triggerable errors at runtime and I'd like it to do something like
> vring->broken above.
>
> IMO it's not worth trying to perfect these things here. The next step
> after this series should be looking at thread-safe memory API so that we
> can use hw/virtio.c and improve it for all users.
>
> Stefan
OK
next prev parent reply other threads:[~2012-12-12 16:30 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-10 13:09 [Qemu-devel] [PATCH v6 00/12] virtio: virtio-blk data plane Stefan Hajnoczi
2012-12-10 13:09 ` [Qemu-devel] [PATCH v6 01/12] raw-posix: add raw_get_aio_fd() for virtio-blk-data-plane Stefan Hajnoczi
2012-12-10 13:09 ` [Qemu-devel] [PATCH v6 02/12] configure: add CONFIG_VIRTIO_BLK_DATA_PLANE Stefan Hajnoczi
2012-12-10 13:09 ` [Qemu-devel] [PATCH v6 03/12] dataplane: add host memory mapping code Stefan Hajnoczi
2012-12-11 14:13 ` Michael S. Tsirkin
2012-12-11 15:27 ` Stefan Hajnoczi
2012-12-11 15:42 ` Michael S. Tsirkin
2012-12-11 16:32 ` Anthony Liguori
2012-12-11 18:09 ` Michael S. Tsirkin
2012-12-12 15:34 ` Stefan Hajnoczi
2012-12-12 15:49 ` Michael S. Tsirkin
2012-12-14 11:45 ` Stefan Hajnoczi
2012-12-16 16:11 ` Michael S. Tsirkin
2012-12-17 9:09 ` Stefan Hajnoczi
2012-12-10 13:09 ` [Qemu-devel] [PATCH v6 04/12] dataplane: add virtqueue vring code Stefan Hajnoczi
2012-12-11 14:18 ` Michael S. Tsirkin
2012-12-12 15:55 ` Stefan Hajnoczi
2012-12-12 16:32 ` Michael S. Tsirkin [this message]
2012-12-10 13:09 ` [Qemu-devel] [PATCH v6 05/12] dataplane: add event loop Stefan Hajnoczi
2012-12-10 13:09 ` [Qemu-devel] [PATCH v6 06/12] dataplane: add Linux AIO request queue Stefan Hajnoczi
2012-12-10 13:09 ` [Qemu-devel] [PATCH v6 07/12] iov: add iov_discard_front/back() to remove data Stefan Hajnoczi
2012-12-10 13:09 ` [Qemu-devel] [PATCH v6 08/12] test-iov: add iov_discard_front/back() testcases Stefan Hajnoczi
2012-12-10 13:09 ` [Qemu-devel] [PATCH v6 09/12] iov: add qemu_iovec_concat_iov() Stefan Hajnoczi
2012-12-10 13:09 ` [Qemu-devel] [PATCH v6 10/12] virtio-blk: restore VirtIOBlkConf->config_wce flag Stefan Hajnoczi
2012-12-10 13:09 ` [Qemu-devel] [PATCH v6 11/12] dataplane: add virtio-blk data plane code Stefan Hajnoczi
2012-12-10 13:09 ` [Qemu-devel] [PATCH v6 12/12] virtio-blk: add x-data-plane=on|off performance feature Stefan Hajnoczi
2012-12-16 16:08 ` Michael S. Tsirkin
2012-12-18 14:57 ` Stefan Hajnoczi
2012-12-18 15:22 ` Michael S. Tsirkin
2012-12-18 15:22 ` Michael S. Tsirkin
2012-12-20 4:04 ` Rusty Russell
2012-12-20 4:04 ` Rusty Russell
2012-12-10 13:13 ` [Qemu-devel] [PATCH v6 00/12] virtio: virtio-blk data plane Stefan Hajnoczi
2012-12-11 8:53 ` Stefan Hajnoczi
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=20121212163255.GC17446@redhat.com \
--to=mst@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=asias@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=khoa@us.ibm.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@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 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.