From: Christian Borntraeger Subject: Re: [PATCH RFC 0/8] virtio: add guest MSI-X support Date: Mon, 27 Apr 2009 18:59:52 +0200 Message-ID: <200904271859.53190.borntraeger@de.ibm.com> References: <20090427123136.GA1152@redhat.com> <49F5CA08.6060003@redhat.com> <20090427153936.GA2276@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Rusty Russell , virtualization@lists.linux-foundation.org, Anthony Liguori , kvm@vger.kernel.org To: "Michael S. Tsirkin" Return-path: Received: from mtagate7.de.ibm.com ([195.212.29.156]:61560 "EHLO mtagate7.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756348AbZD0RAa (ORCPT ); Mon, 27 Apr 2009 13:00:30 -0400 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate7.de.ibm.com (8.14.3/8.13.8) with ESMTP id n3RGxsiH032610 for ; Mon, 27 Apr 2009 16:59:54 GMT Received: from d12av04.megacenter.de.ibm.com (d12av04.megacenter.de.ibm.com [9.149.165.229]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n3RGxsRm676048 for ; Mon, 27 Apr 2009 18:59:54 +0200 Received: from d12av04.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av04.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n3RGxspk010651 for ; Mon, 27 Apr 2009 18:59:54 +0200 In-Reply-To: <20090427153936.GA2276@redhat.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: Am Monday 27 April 2009 17:39:36 schrieb Michael S. Tsirkin: > So we'll probably need to rename request_vqs to request_vectors, > but we probably still need the driver to pass the number of > vectors it wants to the transport. Right? This might be a stupid idea, but would something like the following be sufficient for you? Index: linux-2.6/drivers/net/virtio_net.c =================================================================== --- linux-2.6.orig/drivers/net/virtio_net.c +++ linux-2.6/drivers/net/virtio_net.c @@ -1021,6 +1021,7 @@ static unsigned int features[] = { static struct virtio_driver virtio_net = { .feature_table = features, .feature_table_size = ARRAY_SIZE(features), + .num_vq_max = 3, .driver.name = KBUILD_MODNAME, .driver.owner = THIS_MODULE, .id_table = id_table, Index: linux-2.6/include/linux/virtio.h =================================================================== --- linux-2.6.orig/include/linux/virtio.h +++ linux-2.6/include/linux/virtio.h @@ -110,6 +110,7 @@ struct virtio_driver { const struct virtio_device_id *id_table; const unsigned int *feature_table; unsigned int feature_table_size; + unsigned int num_vq_max; int (*probe)(struct virtio_device *dev); void (*remove)(struct virtio_device *dev); void (*config_changed)(struct virtio_device *dev);