Re: [Qemu-devel] [PATCH v6 04/12] dataplane: add virtqueue vring code

2012-12-12 Thread Michael S. Tsirkin
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, > >

Re: [Qemu-devel] [PATCH v6 04/12] dataplane: add virtqueue vring code

2012-12-12 Thread Stefan Hajnoczi
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);

Re: [Qemu-devel] [PATCH v6 04/12] dataplane: add virtqueue vring code

2012-12-11 Thread Michael S. Tsirkin
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 in

[Qemu-devel] [PATCH v6 04/12] dataplane: add virtqueue vring code

2012-12-10 Thread Stefan Hajnoczi
The virtio-blk-data-plane cannot access memory using the usual QEMU functions since it executes outside the global mutex and the memory APIs are this time are not thread-safe. This patch introduces a virtqueue module based on the kernel's vhost vring code. The trick is that we map guest memory ah