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

[Xen-devel] 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


 


Rackspace

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