From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHa4c-0001Pm-Ir for qemu-devel@nongnu.org; Mon, 07 Dec 2009 04:40:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHa4X-0001OK-Ob for qemu-devel@nongnu.org; Mon, 07 Dec 2009 04:40:06 -0500 Received: from [199.232.76.173] (port=37426 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHa4X-0001Nz-0E for qemu-devel@nongnu.org; Mon, 07 Dec 2009 04:40:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52088) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHa4W-0001b6-I8 for qemu-devel@nongnu.org; Mon, 07 Dec 2009 04:40:00 -0500 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nB79dxe6003339 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 7 Dec 2009 04:39:59 -0500 Date: Mon, 7 Dec 2009 11:37:17 +0200 From: "Michael S. Tsirkin" Message-ID: <20091207093716.GA31370@redhat.com> References: <1259137008-9669-1-git-send-email-kraxel@redhat.com> <1259137008-9669-2-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1259137008-9669-2-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] Re: [PATCH 2/2] virtio: enable msi-x for console+balloon List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org Sorry, I missed this the first time this was posted, and I see this in staging now. Gerd, could you please explain the motivation for this patch? I assumed console/baloon interrupts are not performance critical, so would we not be better off using a shared interrupt for these, reserving MSI vectors for where performance matters? On Wed, Nov 25, 2009 at 09:16:48AM +0100, Gerd Hoffmann wrote: > Enable MSI-X for virtio-console-pci and virtio-balloon-pci. > Add entries to the compatibility machine types so MSI-X will > be disabled for pc-0.10 and pc-0.11. > > Signed-off-by: Gerd Hoffmann > --- > hw/pc.c | 16 ++++++++++++++++ > hw/virtio-pci.c | 11 +++++++++++ > 2 files changed, 27 insertions(+), 0 deletions(-) > > diff --git a/hw/pc.c b/hw/pc.c > index fdaa52c..cb78923 100644 > --- a/hw/pc.c > +++ b/hw/pc.c > @@ -1297,6 +1297,14 @@ static QEMUMachine pc_machine_v0_11 = { > .driver = "virtio-blk-pci", > .property = "vectors", > .value = stringify(0), > + },{ > + .driver = "virtio-balloon-pci", > + .property = "vectors", > + .value = stringify(0), > + },{ > + .driver = "virtio-console-pci", > + .property = "vectors", > + .value = stringify(0), > }, > { /* end of list */ } > } > @@ -1324,6 +1332,14 @@ static QEMUMachine pc_machine_v0_10 = { > .driver = "virtio-blk-pci", > .property = "vectors", > .value = stringify(0), > + },{ > + .driver = "virtio-balloon-pci", > + .property = "vectors", > + .value = stringify(0), > + },{ > + .driver = "virtio-console-pci", > + .property = "vectors", > + .value = stringify(0), > }, > { /* end of list */ } > }, > diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c > index aebcf9d..cb8ab21 100644 > --- a/hw/virtio-pci.c > +++ b/hw/virtio-pci.c > @@ -483,10 +483,13 @@ static int virtio_console_init_pci(PCIDevice *pci_dev) > if (!vdev) { > return -1; > } > + vdev->nvectors = proxy->nvectors; > virtio_init_pci(proxy, vdev, > PCI_VENDOR_ID_REDHAT_QUMRANET, > PCI_DEVICE_ID_VIRTIO_CONSOLE, > proxy->class_code, 0x00); > + /* make the actual value visible */ > + proxy->nvectors = vdev->nvectors; > return 0; > } > > @@ -531,11 +534,14 @@ static int virtio_balloon_init_pci(PCIDevice *pci_dev) > VirtIODevice *vdev; > > vdev = virtio_balloon_init(&pci_dev->qdev); > + vdev->nvectors = proxy->nvectors; > virtio_init_pci(proxy, vdev, > PCI_VENDOR_ID_REDHAT_QUMRANET, > PCI_DEVICE_ID_VIRTIO_BALLOON, > PCI_CLASS_MEMORY_RAM, > 0x00); > + /* make the actual value visible */ > + proxy->nvectors = vdev->nvectors; > return 0; > } > > @@ -569,6 +575,7 @@ static PCIDeviceInfo virtio_info[] = { > .init = virtio_console_init_pci, > .exit = virtio_exit_pci, > .qdev.props = (Property[]) { > + DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2), > DEFINE_PROP_HEX32("class", VirtIOPCIProxy, class_code, 0), > DEFINE_PROP_END_OF_LIST(), > }, > @@ -579,6 +586,10 @@ static PCIDeviceInfo virtio_info[] = { > .init = virtio_balloon_init_pci, > .exit = virtio_exit_pci, > .qdev.reset = virtio_pci_reset, > + .qdev.props = (Property[]) { > + DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 3), > + DEFINE_PROP_END_OF_LIST(), > + }, > },{ > /* end of list */ > } > -- > 1.6.2.5 > >