On Thu, Aug 11, 2011 at 12:47 PM, Sasha Levin <levinsasha...@gmail.com> wrote: > The device uses the virtio preferred method of working with MSI-X by > creating one vector for configuration and one vector for each vq in the > device. > > Signed-off-by: Sasha Levin <levinsasha...@gmail.com> > --- > tools/kvm/virtio/net.c | 56 ++++++++++++++++++++++++++++++++++++++++++++--- > 1 files changed, 52 insertions(+), 4 deletions(-) > > diff --git a/tools/kvm/virtio/net.c b/tools/kvm/virtio/net.c > index e865b7f..e9fe45d 100644 > --- a/tools/kvm/virtio/net.c > +++ b/tools/kvm/virtio/net.c > @@ -60,6 +60,9 @@ struct net_dev { > u8 isr; > u16 queue_selector; > u16 base_addr; > + u32 vq_vector[VIRTIO_NET_NUM_QUEUES]; > + u32 gsis[VIRTIO_NET_NUM_QUEUES]; > + u32 msix_io_block; > > pthread_t io_rx_thread; > pthread_mutex_t io_rx_lock; > @@ -125,7 +128,8 @@ static void *virtio_net_rx_thread(void *p) > virt_queue__set_used_elem(vq, head, len); > > /* We should interrupt guest right now, otherwise > latency is huge. */ > - virt_queue__trigger_irq(vq, pci_header.irq_line, > &ndev.isr, kvm); > + kvm__irq_line(kvm, ndev.gsis[VIRTIO_NET_RX_QUEUE], > VIRTIO_IRQ_HIGH); > + kvm__irq_line(kvm, ndev.gsis[VIRTIO_NET_RX_QUEUE], > VIRTIO_IRQ_LOW);
We should probably make a helper function for this HIGH/LOW pair. kvm__irq_trigger or something? -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html