[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Add m2p translation to read_cr3 on x86_64.



# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID 40c309827ee5b8091b53dc8004188770f28aef8e
# Parent  c83c242916eaf1d40e122f8347b298bdbf84d1b7
Add m2p translation to read_cr3 on x86_64.

From: Jan Beulich <JBeulich@xxxxxxxxxx>
From: Nakajima, Jun <jun.nakajima@xxxxxxxxx>
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r c83c242916ea -r 40c309827ee5 
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/system.h
--- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/system.h     Wed Feb 
 8 15:45:11 2006
+++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/system.h     Wed Feb 
 8 15:58:01 2006
@@ -179,12 +179,11 @@
        asm volatile("movq %0,%%cr0" :: "r" (val));
 } 
 
-static inline unsigned long read_cr3(void)
-{ 
-       unsigned long cr3;
-       asm("movq %%cr3,%0" : "=r" (cr3));
-       return cr3;
-} 
+#define read_cr3() ({ \
+       unsigned long __dummy; \
+       asm("movq %%cr3,%0" : "=r" (__dummy)); \
+       return machine_to_phys(__dummy); \
+})
 
 static inline unsigned long read_cr4(void)
 { 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.