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

2009-05-13 Thread Christian Borntraeger
Am Wednesday 13 May 2009 21:08:58 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. [...] > --- a/drivers/s390/kvm/kvm_virt

Re: [PATCHv5 3/3] virtio_pci: optional MSI-X support

2009-05-13 Thread Anthony Liguori
Michael S. Tsirkin wrote: > This implements optional MSI-X support in virtio_pci. > MSI-X is used whenever the host supports at least 2 MSI-X > vectors: 1 for configuration changes and 1 for virtqueues. > Per-virtqueue vectors are allocated if enough vectors > available. > > Signed-off-by: Michael

[PATCHv5 3/3] virtio_pci: optional MSI-X support

2009-05-13 Thread Michael S. Tsirkin
This implements optional MSI-X support in virtio_pci. MSI-X is used whenever the host supports at least 2 MSI-X vectors: 1 for configuration changes and 1 for virtqueues. Per-virtqueue vectors are allocated if enough vectors available. Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_

[PATCHv5 2/3] virtio_pci: split up vp_interrupt

2009-05-13 Thread Michael S. Tsirkin
This reorganizes virtio-pci code in vp_interrupt slightly, so that it's easier to add per-vq MSI support on top. Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_pci.c | 53 +++--- 1 files changed, 34 insertions(+), 19 deletions(-) diff --git a/d

[PATCHv5 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-13 Thread 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. Signed-off-by: Michael S. Tsirkin --- drivers/block/virtio_blk.c |6 ++-- drivers/char/hw_ran

[PATCHv5 0/3] virtio: MSI-X support

2009-05-13 Thread Michael S. Tsirkin
Here's the latest draft of virtio patches. This is on top of Rusty's recent virtqueue list + name patch. Michael S. Tsirkin (3): virtio: find_vqs/del_vqs virtio operations virtio_pci: split up vp_interrupt virtio_pci: optional MSI-X support drivers/block/virtio_blk.c |6 +- dr

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-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

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 > > > impleme

Re: [PATCH RFC 0/2] qemu-kvm: MSI-X support

2009-05-13 Thread Avi Kivity
Michael S. Tsirkin wrote: > It seems that if I just call apic_deliver_irq each time > I want to send MSI, things will work. > > However, large part of the msix code is managing IRQs versus kernel, > and I'm not sure it's a wise investment of effort to rip it all out. So > IMHO, what's missing is AP