]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
ivshmem: remove redundant ioeventfd configuration
authorCam Macdonell <cam@cs.ualberta.ca>
Mon, 27 Aug 2012 18:12:19 +0000 (12:12 -0600)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 30 Aug 2012 19:54:16 +0000 (14:54 -0500)
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 <cam@cs.ualberta.ca>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 7e7de876ae9bdb1b994dee148c6dc009ce94c48e)

Conflicts:

hw/ivshmem.c

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/ivshmem.c

index 36005618bc9e87abd3a8d6187c5a8a5f04bc8ae2..e20c688bd05781f3f32cda33072c49a5eebd153f 100644 (file)
@@ -367,22 +367,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++) {
-            memory_region_add_eventfd(&s->ivshmem_mmio,
-                                      DOORBELL,
-                                      4,
-                                      true,
-                                      (i << 16) | j,
-                                      s->peers[i].eventfds[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) {
@@ -689,10 +673,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);