WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] GNTTABOP_unmap_grant_ref

To: "Mark Williamson" <mark.williamson@xxxxxxxxxxxx>
Subject: [Xen-devel] GNTTABOP_unmap_grant_ref
From: "King, Steven R" <steven.r.king@xxxxxxxxx>
Date: Tue, 24 Jan 2006 15:28:55 -0800
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 24 Jan 2006 23:38:03 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcYhPfGLCH3j7ysiQQW7hoTYe3R0Tw==
Thread-topic: GNTTABOP_unmap_grant_ref
Mark & All,
 
Short version:
If a domU driver provides an application with a mapping to a shared
page, where in the driver should the corresponding
GNTTABOP_unmap_grant_ref call reside to avoid a domain crash?
 
Long version:
I'm trying fix my code running in a domU to avoid Xen calling
domain_crash() in mm.c line 615.  This occurs when a domain "implicitly
unmaps a granted PTE".  The somewhat abridged version of events:

1) Remote domU shares a page
2) app in local domU calls mmap()
3) driver mmap code calls GNTTAB_map_grant_ref() and returns the mapping
to the app
4) app accesses the shared page without problem
5) app is done, calls munmap()
6) Xen kills the domain in mm.c line 615.
  
I have not yet found a way to make the GNTTABOP_unmap_grant_ref() call
in time to avoid the crash.  The driver release() function is too late
and there's no hook in struct file_operations to handle unmap
explicitly.  Mark Williamson's blktap driver is calling
GNTTAB_unmap_grant_ref, but it's unclear to me if the same unmap()'ing
problem exists there too.
 
Any help is much appreciated.
-steve

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>