ivshmem: wrap ivshmem_del_eventfd loops with transaction
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
diff --git a/hw/ivshmem.c b/hw/ivshmem.c
index 3cdbea2..19e164a 100644
--- a/hw/ivshmem.c
+++ b/hw/ivshmem.c
@@ -369,8 +369,12 @@
guest_curr_max = s->peers[posn].nb_eventfds;
+ memory_region_transaction_begin();
for (i = 0; i < guest_curr_max; i++) {
ivshmem_del_eventfd(s, posn, i);
+ }
+ memory_region_transaction_commit();
+ for (i = 0; i < guest_curr_max; i++) {
event_notifier_cleanup(&s->peers[posn].eventfds[i]);
}