Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-13 Thread Michael S. Tsirkin
On Wed, May 13, 2009 at 10:47:08AM +0930, Rusty Russell wrote: On Wed, 13 May 2009 01:03:30 am Michael S. Tsirkin wrote: On Wed, May 13, 2009 at 12:00:02AM +0930, Rusty Russell wrote and perhaps consider varargs for the callbacks (or would that be too horrible at the implementation

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-13 Thread Avi Kivity
Michael S. Tsirkin wrote: On Wed, May 13, 2009 at 10:47:08AM +0930, Rusty Russell wrote: On Wed, 13 May 2009 01:03:30 am Michael S. Tsirkin wrote: On Wed, May 13, 2009 at 12:00:02AM +0930, Rusty Russell wrote and perhaps consider varargs for the callbacks (or would that be too

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-13 Thread Rusty Russell
On Wed, 13 May 2009 04:48:34 pm Michael S. Tsirkin wrote: Let's just add a helper function for the single vq case? static inline struct virtqueue *virtio_find_vq(struct virtio_devide *vdev, vq_callback_t *c, const char *n) virtio_find_single_vq()

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-12 Thread Christian Borntraeger
Am Tuesday 12 May 2009 00:19:32 schrieb Michael S. Tsirkin: This replaces find_vq/del_vq with find_vqs/del_vqs virtio operations, and updates all drivers. This is needed for MSI support, because MSI needs to know the total number of vectors upfront. [...] diff --git

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-12 Thread Rusty Russell
On Sun, 10 May 2009 04:55:38 pm Michael S. Tsirkin wrote: On Sun, May 10, 2009 at 01:37:06PM +0930, Rusty Russell wrote: Yes, and in fact a rough look at your patch reveals that we don't actually need del_vq: now we track them, we can just do that as part of vdev destruction, right? Let's

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-12 Thread Rusty Russell
On Tue, 12 May 2009 07:49:32 am Michael S. Tsirkin wrote: This replaces find_vq/del_vq with find_vqs/del_vqs virtio operations, and updates all drivers. This is needed for MSI support, because MSI needs to know the total number of vectors upfront. Sorry, is this not on top of my virtio_device

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-12 Thread Michael S. Tsirkin
On Wed, May 13, 2009 at 12:00:02AM +0930, Rusty Russell wrote: On Tue, 12 May 2009 07:49:32 am Michael S. Tsirkin wrote: This replaces find_vq/del_vq with find_vqs/del_vqs virtio operations, and updates all drivers. This is needed for MSI support, because MSI needs to know the total number

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-12 Thread Rusty Russell
On Wed, 13 May 2009 01:03:30 am Michael S. Tsirkin wrote: On Wed, May 13, 2009 at 12:00:02AM +0930, Rusty Russell wrote and perhaps consider varargs for the callbacks (or would that be too horrible at the implementation end?) Thanks, Rusty. Ugh ... I think it will be. And AFAIK gcc

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-10 Thread Michael S. Tsirkin
On Sun, May 10, 2009 at 01:37:06PM +0930, Rusty Russell wrote: Yes, and in fact a rough look at your patch reveals that we don't actually need del_vq: now we track them, we can just do that as part of vdev destruction, right? Let's assume that a driver encounters an error in probe after it

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-10 Thread Christian Borntraeger
Am Sunday 10 May 2009 06:07:06 schrieb Rusty Russell: Yes, and in fact a rough look at your patch reveals that we don't actually need del_vq: now we track them, we can just do that as part of vdev destruction, right? Some of my students are working on a test module for virtio. Its a driver

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-09 Thread Rusty Russell
On Fri, 8 May 2009 10:18:22 pm Michael S. Tsirkin wrote: On Fri, May 08, 2009 at 04:37:06PM +0930, Rusty Russell wrote: On Thu, 7 May 2009 11:40:39 pm Michael S. Tsirkin wrote: This replaces find_vq/del_vq with find_vqs/del_vqs virtio operations, and updates all drivers. This is needed

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-08 Thread Rusty Russell
On Thu, 7 May 2009 11:40:39 pm Michael S. Tsirkin wrote: This replaces find_vq/del_vq with find_vqs/del_vqs virtio operations, and updates all drivers. This is needed for MSI support, because MSI needs to know the total number of vectors upfront. Hmm, I have a similar need for a dev to vq

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-08 Thread Michael S. Tsirkin
On Fri, May 08, 2009 at 04:37:06PM +0930, Rusty Russell wrote: On Thu, 7 May 2009 11:40:39 pm Michael S. Tsirkin wrote: This replaces find_vq/del_vq with find_vqs/del_vqs virtio operations, and updates all drivers. This is needed for MSI support, because MSI needs to know the total number