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] Fix 64-bit build.

# HG changeset patch
# User sos22@xxxxxxxxxxxxxxxxxxxx
# Node ID bd6ae7117cca102a946fa73dcbaa1324a0b9f3b6
# Parent  407358daf3898067df46434cb0fd8e160370d9f4
Fix 64-bit build.

Signed-off-by: Steven Smith, sos22@xxxxxxxxx

diff -r 407358daf389 -r bd6ae7117cca tools/libxc/xc_linux_build.c
--- a/tools/libxc/xc_linux_build.c      Wed Jan 25 16:41:22 2006
+++ b/tools/libxc/xc_linux_build.c      Wed Jan 25 22:31:07 2006
@@ -232,16 +232,16 @@
     l2_pgentry_t *vl2tab=NULL, *vl2e=NULL;
     l3_pgentry_t *vl3tab=NULL, *vl3e=NULL;
     l4_pgentry_t *vl4tab=NULL, *vl4e=NULL;
-    unsigned long l2tab = 0;
-    unsigned long l1tab = 0;
-    unsigned long l3tab = 0;
-    unsigned long l4tab = 0;
+    unsigned long l2tab = 0, pl2tab;
+    unsigned long l1tab = 0, pl1tab;
+    unsigned long l3tab = 0, pl3tab;
+    unsigned long l4tab = 0, pl4tab;
     unsigned long ppt_alloc;
     unsigned long count;
 
     /* First allocate page for page dir. */
     ppt_alloc = (vpt_start - dsi_v_start) >> PAGE_SHIFT;
-    alloc_pt(l4tab, vl4tab);
+    alloc_pt(l4tab, vl4tab, pl4tab);
     vl4e = &vl4tab[l4_table_offset(dsi_v_start)];
     ctxt->ctrlreg[3] = l4tab;
     
@@ -249,28 +249,37 @@
     {
         if ( !((unsigned long)vl1e & (PAGE_SIZE-1)) )
         {
-            alloc_pt(l1tab, vl1tab);
+            alloc_pt(l1tab, vl1tab, pl1tab);
             
             if ( !((unsigned long)vl2e & (PAGE_SIZE-1)) )
             {
-                alloc_pt(l2tab, vl2tab);
+                alloc_pt(l2tab, vl2tab, pl2tab);
                 if ( !((unsigned long)vl3e & (PAGE_SIZE-1)) )
                 {
-                    alloc_pt(l3tab, vl3tab);
+                    alloc_pt(l3tab, vl3tab, pl3tab);
                     vl3e = &vl3tab[l3_table_offset(dsi_v_start + 
(count<<PAGE_SHIFT))];
-                    *vl4e = l3tab | L4_PROT;
+                    if (shadow_mode_enabled)
+                        *vl4e = pl3tab | L4_PROT;
+                    else
+                        *vl4e = l3tab | L4_PROT;
                     vl4e++;
                 }
                 vl2e = &vl2tab[l2_table_offset(dsi_v_start + 
(count<<PAGE_SHIFT))];
-                *vl3e = l2tab | L3_PROT;
+                if (shadow_mode_enabled)
+                    *vl3e = pl2tab | L3_PROT;
+                else
+                    *vl3e = l2tab | L3_PROT;
                 vl3e++;
             }
             vl1e = &vl1tab[l1_table_offset(dsi_v_start + (count<<PAGE_SHIFT))];
-            *vl2e = l1tab | L2_PROT;
+            if (shadow_mode_enabled)
+                *vl2e = pl1tab | L2_PROT;
+            else
+                *vl2e = l1tab | L2_PROT;
             vl2e++;
         }
         
-        if (shadow_mode_enable) {
+        if (shadow_mode_enabled) {
             *vl1e = (count << PAGE_SHIFT) | L1_PROT;
         } else {
             *vl1e = (page_array[count] << PAGE_SHIFT) | L1_PROT;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix 64-bit build., Xen patchbot -unstable <=