From patchwork Mon Aug 27 18:12:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cam Macdonell X-Patchwork-Id: 180258 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D95FA2C010E for ; Tue, 28 Aug 2012 04:12:55 +1000 (EST) Received: from localhost ([::1]:54710 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T63nx-00037N-Rp for incoming@patchwork.ozlabs.org; Mon, 27 Aug 2012 14:12:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T63nr-00037I-DW for qemu-devel@nongnu.org; Mon, 27 Aug 2012 14:12:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T63nq-00012H-Eh for qemu-devel@nongnu.org; Mon, 27 Aug 2012 14:12:47 -0400 Received: from smtp.srv.ualberta.ca ([129.128.5.19]:55352 helo=mail1.srv.ualberta.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T63nq-00010o-7Q for qemu-devel@nongnu.org; Mon, 27 Aug 2012 14:12:46 -0400 Received: from localhost.localdomain (vimy.cs.ualberta.ca [129.128.22.59]) (authenticated bits=0) by mail1.srv.ualberta.ca (8.14.3/8.14.3) with ESMTP id q7RICJ5P014344 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 27 Aug 2012 12:12:34 -0600 (MDT) From: Cam Macdonell To: qemu-devel@nongnu.org Date: Mon, 27 Aug 2012 12:12:19 -0600 Message-Id: <1346091139-21729-1-git-send-email-cam@cs.ualberta.ca> X-Mailer: git-send-email 1.6.2.5 X-detected-operating-system: by eggs.gnu.org: OpenBSD 3.0-3.9 X-Received-From: 129.128.5.19 Cc: Cam Macdonell Subject: [Qemu-devel] [PATCH for-1.2] ivshmem: remove redundant ioeventfd configuration X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org setup_ioeventfds() is unnecessary and actually causes a segfault when used ioeventfd=on is used on the command-line. Since ioeventfds are handled within the memory API, it can be removed. Signed-off-by: Cam Macdonell --- hw/ivshmem.c | 15 --------------- 1 files changed, 0 insertions(+), 15 deletions(-) diff --git a/hw/ivshmem.c b/hw/ivshmem.c index 068e1f3..d0fe5a2 100644 --- a/hw/ivshmem.c +++ b/hw/ivshmem.c @@ -387,17 +387,6 @@ static void close_guest_eventfds(IVShmemState *s, int posn) s->peers[posn].nb_eventfds = 0; } -static void setup_ioeventfds(IVShmemState *s) { - - int i, j; - - for (i = 0; i <= s->max_peer; i++) { - for (j = 0; j < s->peers[i].nb_eventfds; j++) { - ivshmem_add_eventfd(s, i, j); - } - } -} - /* this function increase the dynamic storage need to store data about other * guests */ static void increase_dynamic_storage(IVShmemState *s, int new_min_size) { @@ -678,10 +667,6 @@ static int pci_ivshmem_init(PCIDevice *dev) memory_region_init_io(&s->ivshmem_mmio, &ivshmem_mmio_ops, s, "ivshmem-mmio", IVSHMEM_REG_BAR_SIZE); - if (ivshmem_has_feature(s, IVSHMEM_IOEVENTFD)) { - setup_ioeventfds(s); - } - /* region for registers*/ pci_register_bar(&s->dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->ivshmem_mmio);