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] merge?

# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID b54144915ae6d316dd6edbe882487975367f323d
# Parent  4f73a7bde7b1737d8f4941576460df33396727a6
# Parent  b88c5350de57a1fc18943cbb33fa72c348004fc8
merge?

diff -r 4f73a7bde7b1 -r b54144915ae6 
linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h      Thu Aug 25 
16:24:51 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h      Thu Aug 25 
16:26:30 2005
@@ -65,8 +65,26 @@
 extern unsigned int *phys_to_machine_mapping;
 #define pfn_to_mfn(pfn)        \
 ((unsigned long)phys_to_machine_mapping[(unsigned int)(pfn)] & 0x7FFFFFFFUL)
-#define mfn_to_pfn(mfn)        \
-((unsigned long)machine_to_phys_mapping[(unsigned int)(mfn)])
+static inline unsigned long mfn_to_pfn(unsigned long mfn)
+{
+       unsigned int pfn;
+
+       /*
+        * The array access can fail (e.g., device space beyond end of RAM).
+        * In such cases it doesn't matter what we return (we return garbage),
+        * but we must handle the fault without crashing!
+        */
+       asm (
+               "1:     movl %1,%0\n"
+               "2:\n"
+               ".section __ex_table,\"a\"\n"
+               "       .align 4\n"
+               "       .long 1b,2b\n"
+               ".previous"
+               : "=r" (pfn) : "m" (machine_to_phys_mapping[mfn]) );
+
+       return (unsigned long)pfn;
+}
 
 /* Definitions for machine and pseudophysical addresses. */
 #ifdef CONFIG_X86_PAE
diff -r 4f73a7bde7b1 -r b54144915ae6 
linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/page.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/page.h    Thu Aug 25 
16:24:51 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/page.h    Thu Aug 25 
16:26:30 2005
@@ -67,8 +67,26 @@
 extern u32 *phys_to_machine_mapping;
 #define pfn_to_mfn(pfn)        \
 ((unsigned long)phys_to_machine_mapping[(unsigned int)(pfn)] & 0x7FFFFFFFUL)
-#define mfn_to_pfn(mfn)        \
-((unsigned long)machine_to_phys_mapping[(unsigned int)(mfn)])
+static inline unsigned long mfn_to_pfn(unsigned long mfn)
+{
+       unsigned int pfn;
+
+       /*
+        * The array access can fail (e.g., device space beyond end of RAM).
+        * In such cases it doesn't matter what we return (we return garbage),
+        * but we must handle the fault without crashing!
+        */
+       asm (
+               "1:     movl %1,%k0\n"
+               "2:\n"
+               ".section __ex_table,\"a\"\n"
+               "       .align 8\n"
+               "       .quad 1b,2b\n"
+               ".previous"
+               : "=r" (pfn) : "m" (machine_to_phys_mapping[mfn]) );
+
+       return (unsigned long)pfn;
+}
 
 /* Definitions for machine and pseudophysical addresses. */
 typedef unsigned long paddr_t;
diff -r 4f73a7bde7b1 -r b54144915ae6 tools/examples/vif-bridge
--- a/tools/examples/vif-bridge Thu Aug 25 16:24:51 2005
+++ b/tools/examples/vif-bridge Thu Aug 25 16:26:30 2005
@@ -74,8 +74,10 @@
     exit
 fi
 
-# Add/remove vif to/from bridge.
-brctl ${brcmd} ${bridge} ${vif}
+# Add vif to bridge. vifs are auto-removed from bridge.
+if [ "${brcmd}" == "addif" ] ; then
+    brctl ${brcmd} ${bridge} ${vif}
+fi
 ifconfig ${vif} $OP
 
 if [ ${ip} ] ; then
diff -r 4f73a7bde7b1 -r b54144915ae6 xen/arch/x86/x86_64/mm.c
--- a/xen/arch/x86/x86_64/mm.c  Thu Aug 25 16:24:51 2005
+++ b/xen/arch/x86/x86_64/mm.c  Thu Aug 25 16:26:30 2005
@@ -98,7 +98,7 @@
      * Allocate and map the machine-to-phys table.
      * This also ensures L3 is present for fixmaps.
      */
-    for ( i = 0; i < max_page; i += ((1UL << L2_PAGETABLE_SHIFT) / 8) )
+    for ( i = 0; i < max_page; i += ((1UL << L2_PAGETABLE_SHIFT) / 4) )
     {
         pg = alloc_domheap_pages(NULL, PAGETABLE_ORDER, 0);
         if ( pg == NULL )

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

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