All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] xen-mapcache: don't unmap locked entry during mapcache invalidation
@ 2012-03-15 16:18 ` Julien Grall
  0 siblings, 0 replies; 18+ messages in thread
From: Julien Grall @ 2012-03-15 16:18 UTC (permalink / raw)
  To: qemu-devel@nongnu.org; +Cc: xen-devel@lists.xensource.com, Stefano Stabellini

When an IOREQ_TYPE_INVALIDATE is sent to QEMU, it invalidates all entry
of the map cache even if it's locked.

QEMU is not able to know that entry was invalidated, so when an IO
access is requested a segfault occured.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
---
  xen-mapcache.c |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/xen-mapcache.c b/xen-mapcache.c
index 585b559..6e7e5ab 100644
--- a/xen-mapcache.c
+++ b/xen-mapcache.c
@@ -370,6 +370,9 @@ void xen_invalidate_map_cache(void)
              continue;
          }
+	if (entry->lock > 0)
+	    continue;
+
          if (munmap(entry->vaddr_base, entry->size) != 0) {
              perror("unmap fails");
              exit(-1);
-- 
Julien Grall

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2012-03-15 17:46 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-15 16:18 [Qemu-devel] [PATCH] xen-mapcache: don't unmap locked entry during mapcache invalidation Julien Grall
2012-03-15 16:18 ` Julien Grall
2012-03-15 17:14 ` [Qemu-devel] " Stefano Stabellini
2012-03-15 17:14   ` Stefano Stabellini
2012-03-15 17:10   ` [Qemu-devel] " Andres Lagar-Cavilla
2012-03-15 17:10     ` Andres Lagar-Cavilla
2012-03-15 17:10   ` [Qemu-devel] " Olaf Hering
2012-03-15 17:10     ` Olaf Hering
2012-03-15 17:33     ` [Qemu-devel] " Stefano Stabellini
2012-03-15 17:33       ` Stefano Stabellini
2012-03-15 17:30   ` [Qemu-devel] [Xen-devel] " Tim Deegan
2012-03-15 17:30     ` Tim Deegan
2012-03-15 17:32     ` [Qemu-devel] " Andres Lagar-Cavilla
2012-03-15 17:32       ` Andres Lagar-Cavilla
2012-03-15 17:37       ` [Qemu-devel] " Tim Deegan
2012-03-15 17:37         ` Tim Deegan
2012-03-15 17:46     ` [Qemu-devel] " Stefano Stabellini
2012-03-15 17:46       ` Stefano Stabellini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.