[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 3/3] [RFC] User-space grant table device - changes to PV linux
Changes to the paravirtualised version of Linux to add a hook before the page table is cleared, for use with the grant-table device. Signed-off-by: Derek Murray <Derek.Murray@xxxxxxxxxxxx> --- diff -r 809f36b1b685 linux-2.6-xen-sparse/include/linux/mm.h--- a/linux-2.6-xen-sparse/include/linux/mm.h Thu Mar 15 10:43:13 2007 +0000 +++ b/linux-2.6-xen-sparse/include/linux/mm.h Thu Mar 15 17:46:06 2007 +0000 @@ -205,6 +205,7 @@ struct vm_operations_struct { /* notification that a previously read-only page is about to become * writable, if an error is returned it will cause a SIGBUS */ int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page); + void (*unmap_page_range)(struct vm_area_struct *vma); #ifdef CONFIG_NUMA int (*set_policy)(struct vm_area_struct *vma, struct mempolicy *new); struct mempolicy *(*get_policy)(struct vm_area_struct *vma, diff -r 809f36b1b685 linux-2.6-xen-sparse/mm/memory.c --- a/linux-2.6-xen-sparse/mm/memory.c Thu Mar 15 10:43:13 2007 +0000 +++ b/linux-2.6-xen-sparse/mm/memory.c Thu Mar 15 17:46:06 2007 +0000 @@ -755,6 +755,15 @@ static unsigned long unmap_page_range(st details = NULL; BUG_ON(addr >= end); + + /* + * If specified, call the following hook to perform any unmapping + * operations before the PTEs are destroyed. + */ + if (vma->vm_ops) + if (unlikely(vma->vm_ops->unmap_page_range)) + vma->vm_ops->unmap_page_range(vma); + tlb_start_vma(tlb, vma); pgd = pgd_offset(vma->vm_mm, addr); do { _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |