Re: [Qemu-devel] [PATCH 02/10] virtio: move allocation to virtqueue_pop/vring_pop

2016-02-01 Thread Cornelia Huck
On Sun, 31 Jan 2016 11:28:58 +0100 Paolo Bonzini wrote: > The return code of virtqueue_pop/vring_pop is unused except to check for > errors or 0. We can thus easily move allocation inside the functions > and just return a pointer to the VirtQueueElement. > > The advantage is that we will be abl

[Qemu-devel] [PATCH 02/10] virtio: move allocation to virtqueue_pop/vring_pop

2016-01-31 Thread Paolo Bonzini
The return code of virtqueue_pop/vring_pop is unused except to check for errors or 0. We can thus easily move allocation inside the functions and just return a pointer to the VirtQueueElement. The advantage is that we will be able to allocate only the space that is needed for the actual size of t

Re: [Qemu-devel] [PATCH 02/10] virtio: move allocation to virtqueue_pop/vring_pop

2016-01-19 Thread Paolo Bonzini
On 19/01/2016 13:22, Cornelia Huck wrote: > > The patch is pretty large, but changes to each device are testable > > more or less independently. Splitting it would mostly add churn. > > Would it help to add a no-frills virtqueue_pop() version that simply > allocates the base VirtQueueElement an

Re: [Qemu-devel] [PATCH 02/10] virtio: move allocation to virtqueue_pop/vring_pop

2016-01-19 Thread Cornelia Huck
On Fri, 15 Jan 2016 13:41:50 +0100 Paolo Bonzini wrote: > The return code of virtqueue_pop/vring_pop is unused except to check for > errors or 0. We can thus easily move allocation inside the functions > and just return a pointer to the VirtQueueElement. Like this change. > > The advantage is

[Qemu-devel] [PATCH 02/10] virtio: move allocation to virtqueue_pop/vring_pop

2016-01-15 Thread Paolo Bonzini
The return code of virtqueue_pop/vring_pop is unused except to check for errors or 0. We can thus easily move allocation inside the functions and just return a pointer to the VirtQueueElement. The advantage is that we will be able to allocate only the space that is needed for the actual size of t