Re: [Qemu-devel] [PULL 04/41] virtio: convert to use DMA api

2017-01-19 Thread Paolo Bonzini
On 18/01/2017 20:10, Michael S. Tsirkin wrote: >> Coverity reports that ARRAY_SIZE(elem->out_sg) (and all the others too) >> is wrong because elem->out_sg is a pointer. >> >> However, the check is not in the right place and the max_size argument >> of virtqueue_map_iovec can be removed. The chec

Re: [Qemu-devel] [PULL 04/41] virtio: convert to use DMA api

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 12:59:03PM +0100, Paolo Bonzini wrote: > > > On 10/01/2017 06:39, Michael S. Tsirkin wrote: > > -void virtqueue_map(VirtQueueElement *elem) > > +void virtqueue_map(VirtIODevice *vdev, VirtQueueElement *elem) > > { > > -virtqueue_map_iovec(elem->in_sg, elem->in_addr, &

Re: [Qemu-devel] [PULL 04/41] virtio: convert to use DMA api

2017-01-18 Thread Paolo Bonzini
On 10/01/2017 06:39, Michael S. Tsirkin wrote: > -void virtqueue_map(VirtQueueElement *elem) > +void virtqueue_map(VirtIODevice *vdev, VirtQueueElement *elem) > { > -virtqueue_map_iovec(elem->in_sg, elem->in_addr, &elem->in_num, > -VIRTQUEUE_MAX_SIZE, 1); > -virtq