Skip to contentSkip to conversation

auto-enable translated shadow mode ...

PATCH New Gerd Knorr 1 participant 1 message Jul 28, 2005 x86

lore
Share & tools
lore

Gerd Knorr

author
#0 lore raw

PATCH 1/1 auto-enable translated shadow mode ...

... for dom0 if we know we'll need it. This is the xen counterpart to the previous xenlinux patch which adds this info to the kernel. Also adds some printk's.

Gerd

arch/x86/domain_build.c +5 -0
Index: xen/arch/x86/domain_build.c
===================================================================
@@ -165,6 +165,8 @@ int construct_dom0(struct domain *d,
                xen_pae ? "yes" : "no", dom0_pae ? "yes" : "no");
         return -EINVAL;
     }
+    if (strstr(dsi.xen_section_string, "SHADOW=translate"))
+	opt_dom0_translate = 1;
 
     /* Align load address to 4MB boundary. */
     dsi.v_start &= ~((1UL<<22)-1);
@@ -620,11 +622,13 @@ int construct_dom0(struct domain *d,
 
     if ( opt_dom0_shadow || opt_dom0_translate )
     {
+	printk("dom0: shadow enable\n");
         shadow_mode_enable(d, (opt_dom0_translate
                                ? SHM_enable | SHM_refcounts | SHM_translate
                                : SHM_enable));
         if ( opt_dom0_translate )
         {
+	    printk("dom0: shadow translate\n");
 #if defined(__i386__) && defined(CONFIG_X86_PAE)
             printk("FIXME: PAE code needed here: %s:%d (%s)\n",
                    __FILE__, __LINE__, __FUNCTION__);
@@ -657,6 +661,7 @@ int construct_dom0(struct domain *d,
         }
 
         update_pagetables(v); /* XXX SMP */
+	printk("dom0: shadow setup done\n");
     }
 
     return 0;