From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=37386 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGVoU-0000GG-RX for qemu-devel@nongnu.org; Thu, 11 Nov 2010 06:59:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PGVoR-0000Te-86 for qemu-devel@nongnu.org; Thu, 11 Nov 2010 06:59:34 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55686) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PGVoQ-0000TK-Vt for qemu-devel@nongnu.org; Thu, 11 Nov 2010 06:59:31 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oABBxTel009710 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 11 Nov 2010 06:59:29 -0500 From: Gerd Hoffmann Date: Thu, 11 Nov 2010 12:59:26 +0100 Message-Id: <1289476766-18070-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1289476766-18070-1-git-send-email-kraxel@redhat.com> References: <1289476766-18070-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 2/2] virtfs: enable MSI-X List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann This patch enables MSI-X for virtfs-9p-pci. It also adds a compat property to pc-0.13 which turns it of there to stay compatible to 0.13-stable. Signed-off-by: Gerd Hoffmann --- hw/pc_piix.c | 8 ++++++++ hw/virtio-pci.c | 5 ++++- 2 files changed, 12 insertions(+), 1 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index af01cfb..e9752db 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -226,6 +226,14 @@ static QEMUMachine pc_machine_v0_13 = { .desc = "Standard PC", .init = pc_init_pci, .max_cpus = 255, + .compat_props = (GlobalProperty[]) { + { + .driver = "virtio-9p-pci", + .property = "vectors", + .value = stringify(0), + }, + { /* end of list */ } + }, }; static QEMUMachine pc_machine_v0_12 = { diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index 729917d..3610d7e 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -684,12 +684,14 @@ static int virtio_9p_init_pci(PCIDevice *pci_dev) VirtIODevice *vdev; vdev = virtio_9p_init(&pci_dev->qdev, &proxy->fsconf); + vdev->nvectors = proxy->nvectors; virtio_init_pci(proxy, vdev, PCI_VENDOR_ID_REDHAT_QUMRANET, 0x1009, 0x2, 0x00); - + /* make the actual value visible */ + proxy->nvectors = vdev->nvectors; return 0; } #endif @@ -758,6 +760,7 @@ static PCIDeviceInfo virtio_info[] = { .qdev.size = sizeof(VirtIOPCIProxy), .init = virtio_9p_init_pci, .qdev.props = (Property[]) { + DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2), DEFINE_VIRTIO_COMMON_FEATURES(VirtIOPCIProxy, host_features), DEFINE_PROP_STRING("mount_tag", VirtIOPCIProxy, fsconf.tag), DEFINE_PROP_STRING("fsdev", VirtIOPCIProxy, fsconf.fsdev_id), -- 1.7.1