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

RE: [Xen-devel] GNTTABOP_unmap_grant_ref

To: "Muli Ben-Yehuda" <mulix@xxxxxxxxx>, "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] GNTTABOP_unmap_grant_ref
From: "King, Steven R" <steven.r.king@xxxxxxxxx>
Date: Tue, 24 Jan 2006 17:33:08 -0800
Delivery-date: Wed, 25 Jan 2006 01:41:49 +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: AcYhQO6nIifwd5r7Q9GPRa1VXfAWywACkuDA
Thread-topic: [Xen-devel] GNTTABOP_unmap_grant_ref
Vma->close() didn't work.  Thanks for the great suggestion though.  :^)

To verify that I wasn't making some new mistake, inspection of
linux/mm/mmap.c shows that Linux calls vma->close() *after* the page
table manipulation.  In do_munmap(), the sequence is:

detach_vmas_to_be_unmapped()
unmap_region()       <--- page table manipulation buried in here
remove_vma_list()    <--- vma->close() buried in here

Is this turning into a Xen problem?  Why does Xen forbid implicit
unmapping of shared pages?

-steve


-----Original Message-----
From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Muli
Ben-Yehuda
Sent: Tuesday, January 24, 2006 3:50 PM
To: King, Steven R
Cc: xen-devel; Mark Williamson
Subject: Re: [Xen-devel] GNTTABOP_unmap_grant_ref

On Tue, Jan 24, 2006 at 03:28:55PM -0800, King, Steven R wrote:

> 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.

Could you hook the vma->close function? ISTR it gets called on unmap. If
this is too fine grained or is not called on every munmap (unmapping of
partial VMAs?), you could clean up all mappings when the file that the
application mmap's is closed.

Cheers,
Muli
--
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/


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

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

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