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

[Xen-changelog] [xen-unstable] [LINUX] Mark /dev/mem regions as VM_PFNMA

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [LINUX] Mark /dev/mem regions as VM_PFNMAP.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 14 Aug 2006 19:20:24 +0000
Delivery-date: Mon, 14 Aug 2006 12:24:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID eb7e5d95e7ea18b4209952e4ba9b8d50d79ba60b
# Parent  c09d6e997f058a826174c17d040576898dcab110
[LINUX] Mark /dev/mem regions as VM_PFNMAP.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/arch/i386/mm/ioremap-xen.c |    2 +-
 linux-2.6-xen-sparse/mm/memory.c                |    5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff -r c09d6e997f05 -r eb7e5d95e7ea 
linux-2.6-xen-sparse/arch/i386/mm/ioremap-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/mm/ioremap-xen.c   Mon Aug 14 16:12:43 
2006 +0100
+++ b/linux-2.6-xen-sparse/arch/i386/mm/ioremap-xen.c   Mon Aug 14 16:35:49 
2006 +0100
@@ -121,7 +121,7 @@ int direct_remap_pfn_range(struct vm_are
                           domid_t  domid)
 {
        /* Same as remap_pfn_range(). */
-       vma->vm_flags |= VM_IO | VM_RESERVED;
+       vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP;
 
        if (domid == DOMID_SELF)
                return -EINVAL;
diff -r c09d6e997f05 -r eb7e5d95e7ea linux-2.6-xen-sparse/mm/memory.c
--- a/linux-2.6-xen-sparse/mm/memory.c  Mon Aug 14 16:12:43 2006 +0100
+++ b/linux-2.6-xen-sparse/mm/memory.c  Mon Aug 14 16:35:49 2006 +0100
@@ -390,7 +390,7 @@ struct page *vm_normal_page(struct vm_ar
 
        if (vma->vm_flags & VM_PFNMAP) {
                unsigned long off = (addr - vma->vm_start) >> PAGE_SHIFT;
-               if (pfn == vma->vm_pgoff + off)
+               if ((pfn == vma->vm_pgoff + off) || !pfn_valid(pfn))
                        return NULL;
                if (!is_cow_mapping(vma->vm_flags))
                        return NULL;
@@ -405,8 +405,7 @@ struct page *vm_normal_page(struct vm_ar
         * Remove this test eventually!
         */
        if (unlikely(!pfn_valid(pfn))) {
-               if (!(vma->vm_flags & VM_RESERVED))
-                       print_bad_pte(vma, pte, addr);
+               print_bad_pte(vma, pte, addr);
                return NULL;
        }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [LINUX] Mark /dev/mem regions as VM_PFNMAP., Xen patchbot-unstable <=