[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 04/12] dataplane: add virtqueue vring code
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH v6 04/12] dataplane: add virtqueue vring code |
Date: |
Wed, 12 Dec 2012 18:32:55 +0200 |
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
- Re: [Qemu-devel] [PATCH v6 03/12] dataplane: add host memory mapping code, (continued)
- Re: [Qemu-devel] [PATCH v6 03/12] dataplane: add host memory mapping code, Stefan Hajnoczi, 2012/12/12
- Re: [Qemu-devel] [PATCH v6 03/12] dataplane: add host memory mapping code, Michael S. Tsirkin, 2012/12/12
- Re: [Qemu-devel] [PATCH v6 03/12] dataplane: add host memory mapping code, Stefan Hajnoczi, 2012/12/14
- Re: [Qemu-devel] [PATCH v6 03/12] dataplane: add host memory mapping code, Michael S. Tsirkin, 2012/12/16
- Re: [Qemu-devel] [PATCH v6 03/12] dataplane: add host memory mapping code, Stefan Hajnoczi, 2012/12/17
[Qemu-devel] [PATCH v6 05/12] dataplane: add event loop, Stefan Hajnoczi, 2012/12/10
[Qemu-devel] [PATCH v6 07/12] iov: add iov_discard_front/back() to remove data, Stefan Hajnoczi, 2012/12/10
[Qemu-devel] [PATCH v6 04/12] dataplane: add virtqueue vring code, Stefan Hajnoczi, 2012/12/10
[Qemu-devel] [PATCH v6 06/12] dataplane: add Linux AIO request queue, Stefan Hajnoczi, 2012/12/10
[Qemu-devel] [PATCH v6 12/12] virtio-blk: add x-data-plane=on|off performance feature, Stefan Hajnoczi, 2012/12/10
Re: [Qemu-devel] [PATCH v6 00/12] virtio: virtio-blk data plane, Stefan Hajnoczi, 2012/12/10
[Qemu-devel] [PATCH v6 02/12] configure: add CONFIG_VIRTIO_BLK_DATA_PLANE, Stefan Hajnoczi, 2012/12/10
[Qemu-devel] [PATCH v6 08/12] test-iov: add iov_discard_front/back() testcases, Stefan Hajnoczi, 2012/12/10
[Qemu-devel] [PATCH v6 11/12] dataplane: add virtio-blk data plane code, Stefan Hajnoczi, 2012/12/10