From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40619 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q1erb-00054h-RW for qemu-devel@nongnu.org; Mon, 21 Mar 2011 09:09:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q1era-0007P7-7M for qemu-devel@nongnu.org; Mon, 21 Mar 2011 09:09:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49368) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q1erZ-0007Oi-RY for qemu-devel@nongnu.org; Mon, 21 Mar 2011 09:09:38 -0400 From: Amit Shah Date: Mon, 21 Mar 2011 18:39:18 +0530 Message-Id: <32059220d02cf8e779bbaf9966d12501c32e2076.1300712809.git.amit.shah@redhat.com> In-Reply-To: References: In-Reply-To: References: Subject: [Qemu-devel] [PATCH 3/7] virtio-serial: Enable ioeventfd List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Amit Shah , qemu list 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), -- 1.7.4