Re: [Qemu-devel] [PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout

2014-12-03 Thread Cornelia Huck
On Wed, 3 Dec 2014 13:19:17 +0200 "Michael S. Tsirkin" wrote: > On Wed, Dec 03, 2014 at 12:14:10PM +0100, Cornelia Huck wrote: > > On Wed, 3 Dec 2014 12:52:51 +0200 > > "Michael S. Tsirkin" wrote: > > > > > On Wed, Dec 03, 2014 at 10:50:04AM +0100, Cornelia Huck wrote: > > > > @@ -748,6 +756,1

Re: [Qemu-devel] [PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout

2014-12-03 Thread Michael S. Tsirkin
On Wed, Dec 03, 2014 at 12:14:10PM +0100, Cornelia Huck wrote: > On Wed, 3 Dec 2014 12:52:51 +0200 > "Michael S. Tsirkin" wrote: > > > On Wed, Dec 03, 2014 at 10:50:04AM +0100, Cornelia Huck wrote: > > > > diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c > > > index 43b7e02..1e2a72

Re: [Qemu-devel] [PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout

2014-12-03 Thread Cornelia Huck
On Wed, 3 Dec 2014 12:52:51 +0200 "Michael S. Tsirkin" wrote: > On Wed, Dec 03, 2014 at 10:50:04AM +0100, Cornelia Huck wrote: > > diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c > > index 43b7e02..1e2a720 100644 > > --- a/hw/virtio/virtio-mmio.c > > +++ b/hw/virtio/virtio-mmio.c

Re: [Qemu-devel] [PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout

2014-12-03 Thread Michael S. Tsirkin
On Wed, Dec 03, 2014 at 10:50:04AM +0100, Cornelia Huck wrote: > On Wed, 3 Dec 2014 10:27:36 +0100 > Cornelia Huck wrote: > > > On Tue, 2 Dec 2014 21:03:45 +0200 > > "Michael S. Tsirkin" wrote: > > > > > On Tue, Dec 02, 2014 at 04:41:36PM +0100, Cornelia Huck wrote: > > > > void virtio_queue_s

Re: [Qemu-devel] [PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout

2014-12-03 Thread Cornelia Huck
On Wed, 3 Dec 2014 10:27:36 +0100 Cornelia Huck wrote: > On Tue, 2 Dec 2014 21:03:45 +0200 > "Michael S. Tsirkin" wrote: > > > On Tue, Dec 02, 2014 at 04:41:36PM +0100, Cornelia Huck wrote: > > > void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) > > > { > > > +/* > > > + *

Re: [Qemu-devel] [PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout

2014-12-03 Thread Cornelia Huck
On Tue, 2 Dec 2014 21:03:45 +0200 "Michael S. Tsirkin" wrote: > On Tue, Dec 02, 2014 at 04:41:36PM +0100, Cornelia Huck wrote: > > void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) > > { > > +/* > > + * For virtio-1 devices, the number of buffers may only be > > + * upda

Re: [Qemu-devel] [PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout

2014-12-02 Thread Michael S. Tsirkin
On Tue, Dec 02, 2014 at 04:41:36PM +0100, Cornelia Huck wrote: > void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) > { > +/* > + * For virtio-1 devices, the number of buffers may only be > + * updated if the ring addresses have not yet been set up. Where does it say that?

Re: [Qemu-devel] [PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout

2014-12-02 Thread Cornelia Huck
On Tue, 2 Dec 2014 15:54:44 +0100 Cornelia Huck wrote: > On Tue, 2 Dec 2014 16:46:28 +0200 > "Michael S. Tsirkin" wrote: > > pa == -1ULL tricks look quite ugly. > > Can't we set desc/avail/used unconditionally, and drop > > the pa value? > > And have virtio_queue_get_addr() return desc? Let me

Re: [Qemu-devel] [PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout

2014-12-02 Thread Cornelia Huck
On Tue, 2 Dec 2014 16:46:28 +0200 "Michael S. Tsirkin" wrote: > On Tue, Dec 02, 2014 at 02:00:15PM +0100, Cornelia Huck wrote: > > For virtio-1 devices, we allow a more complex queue layout that doesn't > > require descriptor table and rings on a physically-contigous memory area: > > add virtio_q

Re: [Qemu-devel] [PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout

2014-12-02 Thread Michael S. Tsirkin
On Tue, Dec 02, 2014 at 02:00:15PM +0100, Cornelia Huck wrote: > For virtio-1 devices, we allow a more complex queue layout that doesn't > require descriptor table and rings on a physically-contigous memory area: > add virtio_queue_set_rings() to allow transports to set this up. > > Signed-off-by:

[Qemu-devel] [PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout

2014-12-02 Thread Cornelia Huck
For virtio-1 devices, we allow a more complex queue layout that doesn't require descriptor table and rings on a physically-contigous memory area: add virtio_queue_set_rings() to allow transports to set this up. Signed-off-by: Cornelia Huck --- hw/virtio/virtio.c | 16