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] [PATCH 3/3] [RFC] User-space grant table device - changes to

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 3/3] [RFC] User-space grant table device - changes to PV linux
From: Derek Murray <Derek.Murray@xxxxxxxxxxxx>
Date: Mon, 19 Mar 2007 10:40:38 +0000
Delivery-date: Mon, 19 Mar 2007 03:44:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH 3/3] [RFC] User-space grant table device - changes to PV linux, Derek Murray <=