From patchwork Thu Mar 10 06:09:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 86192 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 9E9CEB6EED for ; Thu, 10 Mar 2011 17:18:34 +1100 (EST) Received: from localhost ([127.0.0.1]:49539 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxZCg-0006Fy-EU for incoming@patchwork.ozlabs.org; Thu, 10 Mar 2011 01:18:30 -0500 Received: from [140.186.70.92] (port=41232 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxZ43-0003b3-6J for qemu-devel@nongnu.org; Thu, 10 Mar 2011 01:09:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxZ42-0007cD-9n for qemu-devel@nongnu.org; Thu, 10 Mar 2011 01:09:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxZ41-0007c1-Vn for qemu-devel@nongnu.org; Thu, 10 Mar 2011 01:09:34 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2A69W1M030411 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 10 Mar 2011 01:09:32 -0500 Received: from localhost (dhcp193-58.pnq.redhat.com [10.65.193.58]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p2A69VUL029435; Thu, 10 Mar 2011 01:09:32 -0500 From: Amit Shah To: Anthony Liguori Date: Thu, 10 Mar 2011 11:39:17 +0530 Message-Id: <8da38c9cc5b5159dca014253fa79004898fa7a63.1299737220.git.amit.shah@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Amit Shah , qemu list Subject: [Qemu-devel] [PULL (resend, rebase) 3/5] virtio-serial: Enable ioeventfd 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 Enable ioeventfd for virtio-serial devices by default. Commit 25db9ebe15125deb32958c6df74996f745edf1f9 lists the benefits of using ioeventfd. Copying a file from guest to host over a virtio-serial channel didn't show much difference in time or io_exit rate. Signed-off-by: Amit Shah --- hw/virtio-pci.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index 952b5d2..ef65590 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -789,6 +789,7 @@ static int virtio_serial_exit_pci(PCIDevice *pci_dev) { VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev); + virtio_pci_stop_ioeventfd(proxy); virtio_serial_exit(proxy->vdev); return virtio_exit_pci(pci_dev); } @@ -898,6 +899,8 @@ static PCIDeviceInfo virtio_info[] = { .init = virtio_serial_init_pci, .exit = virtio_serial_exit_pci, .qdev.props = (Property[]) { + DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags, + VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, DEV_NVECTORS_UNSPECIFIED), DEFINE_PROP_HEX32("class", VirtIOPCIProxy, class_code, 0),