From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NfvVD-0007Uc-15 for qemu-devel@nongnu.org; Fri, 12 Feb 2010 08:24:11 -0500 Received: from [199.232.76.173] (port=53549 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfvVC-0007UK-NG for qemu-devel@nongnu.org; Fri, 12 Feb 2010 08:24:10 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NfvVB-0005LW-I1 for qemu-devel@nongnu.org; Fri, 12 Feb 2010 08:24:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:25192) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NfvV4-0005KY-MW for qemu-devel@nongnu.org; Fri, 12 Feb 2010 08:24:09 -0500 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o1CDNp6W017030 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 12 Feb 2010 08:23:51 -0500 From: Amit Shah Date: Fri, 12 Feb 2010 18:52:38 +0530 Message-Id: <1265980958-28265-1-git-send-email-amit.shah@redhat.com> Subject: [Qemu-devel] [PATCH] virtio-serial: pci: Allow MSI to be disabled List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Amit Shah , "Michael S. Tsirkin" Michael noted we don't allow disabling of MSI for the virtio-serial-pci device. Fix that. Signed-off-by: Amit Shah CC: "Michael S. Tsirkin" --- hw/virtio-pci.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index f3373ae..bcd40f7 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -500,8 +500,8 @@ static int virtio_serial_init_pci(PCIDevice *pci_dev) if (!vdev) { return -1; } - vdev->nvectors = proxy->nvectors ? proxy->nvectors - : proxy->max_virtserial_ports + 1; + vdev->nvectors = proxy->nvectors == -1 ? proxy->max_virtserial_ports + 1 + : proxy->nvectors; virtio_init_pci(proxy, vdev, PCI_VENDOR_ID_REDHAT_QUMRANET, PCI_DEVICE_ID_VIRTIO_CONSOLE, @@ -585,7 +585,7 @@ static PCIDeviceInfo virtio_info[] = { .init = virtio_serial_init_pci, .exit = virtio_exit_pci, .qdev.props = (Property[]) { - DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 0), + DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, -1), DEFINE_PROP_HEX32("class", VirtIOPCIProxy, class_code, 0), DEFINE_VIRTIO_COMMON_FEATURES(VirtIOPCIProxy, host_features), DEFINE_PROP_UINT32("max_ports", VirtIOPCIProxy, max_virtserial_ports, -- 1.6.2.5