From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56037) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4IBd-0004yI-Ck for qemu-devel@nongnu.org; Wed, 22 Aug 2012 17:10:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4IBY-0001vV-Nb for qemu-devel@nongnu.org; Wed, 22 Aug 2012 17:10:01 -0400 Received: from mail-we0-f173.google.com ([74.125.82.173]:54740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4IBY-0001vE-Fw for qemu-devel@nongnu.org; Wed, 22 Aug 2012 17:09:56 -0400 Received: by weyz53 with SMTP id z53so20440wey.4 for ; Wed, 22 Aug 2012 14:09:55 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 22 Aug 2012 23:09:47 +0200 Message-Id: <1345669787-23075-2-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH for 1.2] ivshmem: fix memory_region_del_eventfd assertion failure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, Cam Macdonnell We do not register ioeventfds unless the IVSHMEM_IOEVENTFD feature is set. The same feature must be checked before releasing the eventfds. Regression introduced by commit 563027c (ivshmem: use EventNotifier and memory API, 2012-07-05). Reported-by: Cam Macdonnell Tested-by: Cam Macdonnell Signed-off-by: Paolo Bonzini --- hw/ivshmem.c | 4 ++++ 1 file modificato, 4 inserzioni(+) diff --git a/hw/ivshmem.c b/hw/ivshmem.c index b4d65a6..47f2a16 100644 --- a/hw/ivshmem.c +++ b/hw/ivshmem.c @@ -366,6 +366,10 @@ static void close_guest_eventfds(IVShmemState *s, int posn) { int i, guest_curr_max; + if (!ivshmem_has_feature(s, IVSHMEM_IOEVENTFD)) { + return; + } + guest_curr_max = s->peers[posn].nb_eventfds; memory_region_transaction_begin(); -- 1.7.11.2