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] fix linux ioremap() of domain local memory

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] fix linux ioremap() of domain local memory
From: Avi Kivity <avi@xxxxxxxxxxxx>
Date: Thu, 22 Jun 2006 21:08:06 +0300
Delivery-date: Thu, 22 Jun 2006 11:09:03 -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
User-agent: Thunderbird 1.5.0.4 (X11/20060614)
is_local_lowmem() treats its physical address input as a machine address; this causes agpgart to fail while calling ioremap_nocache().

X still does not load on my Athlon 64 / Via S3 Unichrome, so perhaps best not to apply just yet.

Signed-off-by: Avi Kivity <avi@xxxxxxxxxxxx>

--- xen-ioremap-fix/linux-2.6-xen-sparse/arch/i386/mm/ioremap-xen.c~ioremap     
2006-06-22 20:30:20.000000000 +0300
+++ xen-ioremap-fix/linux-2.6-xen-sparse/arch/i386/mm/ioremap-xen.c     
2006-06-22 20:31:09.000000000 +0300
@@ -206,13 +206,11 @@
/*
 * Does @address reside within a non-highmem page that is local to this virtual
 * machine (i.e., not an I/O page, nor a memory page belonging to another VM).
- * See the comment that accompanies mfn_to_local_pfn() in page.h to understand
- * why this works.
 */
static inline int is_local_lowmem(unsigned long address)
{
        extern unsigned long max_low_pfn;
-       return (mfn_to_local_pfn(address >> PAGE_SHIFT) < max_low_pfn);
+       return ((address >> PAGE_SHIFT) < max_low_pfn);
}

/*




--
Do not meddle in the internals of kernels, for they are subtle and quick to 
panic.


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

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