[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [qemu-upstream-unstable] xen-mapcache: don't unmap locked entry during mapcache invalidation



commit a74b7770924e3825e2d64b85fbf2f927419e513f
Author: Julien Grall <julien.grall@xxxxxxxxxx>
Date:   Fri Apr 13 17:33:02 2012 +0000

    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@xxxxxxxxxx>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 xen-mapcache.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/xen-mapcache.c b/xen-mapcache.c
index eade816..16b7a86 100644
--- a/xen-mapcache.c
+++ b/xen-mapcache.c
@@ -385,6 +385,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");
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.