diff options
author | Julien Grall <julien.grall@citrix.com> | 2012-04-13 17:33:02 +0000 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2012-04-13 17:35:06 +0000 |
commit | 852a7cec90f12516eb335bb29ed1398c2f0b7c2c (patch) | |
tree | ed7d924bbea5d8d5e8eec78fa039141f56fcc971 | |
parent | 09ab48ee6c7ec082f56f85e234b066ed4fd874e2 (diff) |
xen-mapcache: don't unmap locked entry during mapcache invalidation
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>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
-rw-r--r-- | xen-mapcache.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xen-mapcache.c b/xen-mapcache.c index 75ac313f28..59ba085b62 100644 --- a/xen-mapcache.c +++ b/xen-mapcache.c @@ -387,6 +387,9 @@ void xen_invalidate_map_cache(void) if (entry->vaddr_base == NULL) { continue; } + if (entry->lock > 0) { + continue; + } if (munmap(entry->vaddr_base, entry->size) != 0) { perror("unmap fails"); |