Skip to contentSkip to conversation

Build break with PAE enabled

DISCUSSION Natasha Jarymowycz 2 participants 3 messages Aug 1, 2005 – Aug 2, 2005 x86

lore
Share & tools
lore
#0 lore raw

Currently x86_32 won't build with PAE enabled. shadow_public.c needs access to functions in shadow32.c. It looks like shadow_64.h includes the needed functionality for x86_64 builds. Should there be a comparable shadow_32.h file? Or should some of the code be merged into a single header file -- it looks like free_out_of_sync_state is identical for both 32bit and 64bit.

Also, shadow_l3_normal_pt_update() was clearly written for x86_64 only.

shadow_public.c: In function `free_shadow_pages':
shadow_public.c:689: warning: implicit declaration of function free_out_of_sync_state' shadow_public.c: In function __shadow_mode_enable':
shadow_public.c:917: warning: implicit declaration of function alloc_monitor_pagetable' shadow_public.c: In function shadow_l3_normal_pt_update':
shadow_public.c:1387: error: `pgentry_64_t' undeclared (first use in this function) shadow_public.c:1387: error: (Each undeclared identifier is reported only once shadow_public.c:1387: error: for each function it appears in.) shadow_public.c:1387: error: spl3e' undeclared (first use in this function) shadow_public.c:1397: error: syntax error before ')' token shadow_public.c:1398: warning: implicit declaration of function validate_entry_change' shadow_public.c:1398: error: syntax error before ')' token shadow_public.c:1400: warning: implicit declaration of function `shadow_type_to_level' make[2]: *** [shadow_public.o] Error 1

-Natasha

#1 lore raw
Quoted 3 lines

Currently x86_32 won't build with PAE enabled. shadow_public.c needs access to functions in shadow32.c. It looks like shadow_64.h includes the needed functionality for x86_64 builds.

Yep, and pae should use these as well. I've changed a few places with

	#if CONFIG_PAGING_LEVELS >= 4
	#include <asm/shadow_64.h>
	#endif

to "CONFIG_PAGING_LEVELS >= 3", maybe I forgot to include some into the patch ...

Quoted 1 line

Also, shadow_l3_normal_pt_update() was clearly written for x86_64 only.

Yep, no actual code changes for PAE yet, that patch was just the switchover from the old (shadow32.c) to the new shadow code. PAE will use the 64bit code as the page table entries 64bit wide as well.

Gerd

PS: right now the build fails with "public/acm_ops.h: No such
file or directory" ...

Signature · 1 line
panic("it works"); /* avoid being flooded with debug messages */
#2 lore raw
Quoted 2 lines

to "CONFIG_PAGING_LEVELS >= 3", maybe I forgot to include some into the patch ...

Yep, I did, shadow_public.c bits are missing, sorry for trouble.

Gerd

arch/x86/shadow_public.c +14 -1
Index: xen/arch/x86/shadow_public.c
===================================================================
@@ -30,7 +30,7 @@
 #include <xen/sched.h>
 #include <xen/trace.h>
 
-#if CONFIG_PAGING_LEVELS >= 4 
+#if CONFIG_PAGING_LEVELS >= 3
 #include <asm/shadow_64.h>
 
 extern struct shadow_ops MODE_F_HANDLER;
@@ -233,7 +233,20 @@ void free_monitor_pagetable(struct vcpu 
     v->arch.monitor_vtable = 0;
 }
 
+#elif CONFIG_PAGING_LEVELS == 3
+
+static void alloc_monitor_pagetable(struct vcpu *v)
+{
+    BUG(); /* PAE not implemented yet */
+}
+
+void free_monitor_pagetable(struct vcpu *v)
+{
+    BUG(); /* PAE not implemented yet */
+}
+
 #elif CONFIG_PAGING_LEVELS == 2
+
 static void alloc_monitor_pagetable(struct vcpu *v)
 {
     unsigned long mmfn;