On Tue, Apr 28, 2009 at 08:51:08PM +0300, Avi Kivity wrote: > Michael S. Tsirkin wrote: >> This does not work for MSIX - in linux, you must map all MSI-X entries >> to interrupt vectors upfront. >> > > What? that's very inflexible. > > Can you point me at the code? See pci_enable_msix in include/linux/pci.h >> So what I see is transports providing something like: >> >> struct virtio_interrupt_mapping { >> int virtqueue; >> int interrupt; >> }; >> >> map_vqs_to_interrupt(dev, struct virtio_interrupt_mapping *, int nvirtqueues); >> unmap_vqs(dev); >> > > Isn't that the same thing? Please explain the flow. So to map vq 0 to vector 0, vq 1 to vector 1 and vq 2 to vector 2 the driver would do: struct virtio_interrupt_mapping mapping[3] = { {0, 0}, {1, 1}, {2, 2} }; vec = map_vqs_to_interrupt(dev, mapping, 3); if (vec) { error handling } and then find_vq as usual. -- MST -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html