]> git.proxmox.com Git - mirror_qemu.git/commitdiff
ivshmem: fix memory_region_del_eventfd assertion failure
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 22 Aug 2012 21:09:47 +0000 (23:09 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 24 Aug 2012 01:19:59 +0000 (20:19 -0500)
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 <cam@cs.ualberta.ca>
Tested-by: Cam Macdonnell <cam@cs.ualberta.ca>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/ivshmem.c

index b4d65a6db5b29d246f8a51aa582e4816db2bf41a..47f2a16833b07efa7bd1bdacedb9c6ea72646bb3 100644 (file)
@@ -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();