From patchwork Thu Feb 17 09:13:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 83436 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 763AFB70FF for ; Thu, 17 Feb 2011 20:57:38 +1100 (EST) Received: from localhost ([127.0.0.1]:42866 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pq0cB-0006rA-NS for incoming@patchwork.ozlabs.org; Thu, 17 Feb 2011 04:57:35 -0500 Received: from [140.186.70.92] (port=43427 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pq0ag-0006B4-CM for qemu-devel@nongnu.org; Thu, 17 Feb 2011 04:56:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pq0af-0001Vf-8z for qemu-devel@nongnu.org; Thu, 17 Feb 2011 04:56:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52215) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pq0ae-0001VW-Rr for qemu-devel@nongnu.org; Thu, 17 Feb 2011 04:56:01 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1H9ttCq015696 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 17 Feb 2011 04:55:58 -0500 Received: from localhost (ovpn-113-81.phx2.redhat.com [10.3.113.81]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p1H9Dhpu021302; Thu, 17 Feb 2011 04:13:45 -0500 From: Amit Shah To: qemu list Date: Thu, 17 Feb 2011 14:43:24 +0530 Message-Id: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Amit Shah Subject: [Qemu-devel] [PATCH] 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 3911b09..d7fdaee 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),