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] Simplify arbitrary_virt_to_phys, and fix the x86/64 vers

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Simplify arbitrary_virt_to_phys, and fix the x86/64 version to mask
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 18 Nov 2005 20:14:16 +0000
Delivery-date: Fri, 18 Nov 2005 20:15:40 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 69ea493e415a2e583e91097bfd0d8d5146f6cc2a
# Parent  5c954929bb0d9ecafc144c433b68e7d65a9e5453
Simplify arbitrary_virt_to_phys, and fix the x86/64 version to mask
out the NX bit.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 5c954929bb0d -r 69ea493e415a 
linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h   Fri Nov 18 
15:32:04 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h   Fri Nov 18 
16:41:03 2005
@@ -438,9 +438,8 @@
 
 #define arbitrary_virt_to_machine(__va)                                        
\
 ({                                                                     \
-       pte_t *__pte = virt_to_ptep(__va);                              \
-       maddr_t __pa = (maddr_t)pte_mfn(*__pte) << PAGE_SHIFT;          \
-       __pa | ((unsigned long)(__va) & (PAGE_SIZE-1));                 \
+       maddr_t m = (maddr_t)pte_mfn(*virt_to_ptep(__va)) << PAGE_SHIFT;\
+       m | ((unsigned long)(__va) & (PAGE_SIZE-1));                    \
 })
 
 #endif /* !__ASSEMBLY__ */
diff -r 5c954929bb0d -r 69ea493e415a 
linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h Fri Nov 18 
15:32:04 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h Fri Nov 18 
16:41:03 2005
@@ -29,9 +29,8 @@
 
 #define arbitrary_virt_to_machine(__va)                                        
\
 ({                                                                     \
-       pte_t *__pte = virt_to_ptep(__va);                              \
-       unsigned long __pa = (*(unsigned long *)__pte) & PAGE_MASK;     \
-       __pa | ((unsigned long)(__va) & (PAGE_SIZE-1));                 \
+       maddr_t m = (maddr_t)pte_mfn(*virt_to_ptep(__va)) << PAGE_SHIFT;\
+       m | ((unsigned long)(__va) & (PAGE_SIZE-1));                    \
 })
 #endif
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Simplify arbitrary_virt_to_phys, and fix the x86/64 version to mask, Xen patchbot -unstable <=