From patchwork Thu Nov 11 11:59:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 70798 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 33DF6B7134 for ; Thu, 11 Nov 2010 23:01:41 +1100 (EST) Received: from localhost ([127.0.0.1]:46617 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGVqU-0000py-Ay for incoming@patchwork.ozlabs.org; Thu, 11 Nov 2010 07:01:38 -0500 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 Received: from rincewind.home.kraxel.org (vpn1-5-144.ams2.redhat.com [10.36.5.144]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id oABBxRHc027015; Thu, 11 Nov 2010 06:59:28 -0500 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id F0CC245169; Thu, 11 Nov 2010 12:59:26 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org 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> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 2/2] virtfs: enable MSI-X X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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),