On Tue, Mar 23, 2010 at 09:45:08PM +0530, Amit Shah wrote: > On (Tue) Mar 23 2010 [17:51:26], Michael S. Tsirkin wrote: > > On Mon, Mar 22, 2010 at 10:48:02AM +0530, Amit Shah wrote: > > > On (Sat) Mar 20 2010 [09:40:50], Avi Kivity wrote: > > > > On 03/19/2010 01:58 PM, Amit Shah wrote: > > > >> + > > > >> + offset = 0; > > > >> + for (i = 0; i< elem.out_num; i++) { > > > >> + memcpy(buf + offset, elem.out_sg[i].iov_base, > > > >> + elem.out_sg[i].iov_len); > > > >> + offset += elem.out_sg[i].iov_len; > > > >> + } > > > >> + len = cur_len; > > > >> + > > > >> + handle_control_message(vser, buf, len); > > > >> + virtqueue_push(vq,&elem, len); > > > >> + } > > > >> + if (len) { > > > >> + qemu_free(buf); > > > >> } > > > >> virtio_notify(vdev, vq); > > > >> } > > > > > > > > Isn't there some virtio function to linearize requests? > > > > > > I don't see one. > > > > virtio-net has iov_fill. Reuse it? > > Hm, yeah. Any ideas on how to share it? Put it in some common file? > > Just copying it seems good for now.. > > Amit Add iov.c -- MST _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/virtualization