diff -r c4eead8a925b tools/libxc/xc_linux_build.c --- a/tools/libxc/xc_linux_build.c Sun Apr 16 14:41:31 2006 +++ b/tools/libxc/xc_linux_build.c Thu Apr 20 22:45:21 2006 @@ -45,6 +45,11 @@ #ifdef __ia64__ #define probe_aout9(image,image_size,load_funcs) 1 #endif + +/* from xc_ptrace.h */ +#define X86_CR0_PE 0x00000001 /* Enable Protected Mode (RW) */ +#define X86_CR0_PG 0x80000000 /* Paging (RW) */ + struct initrd_info { enum { INITRD_none, INITRD_file, INITRD_mem } type; @@ -1174,6 +1179,8 @@ ctxt->failsafe_callback_eip = 0; ctxt->syscall_callback_eip = 0; #endif + /* set sane cr0 bits, protected and paging enabled */ + ctxt->ctrlreg[0] = X86_CR0_PE|X86_CR0_PG; #endif /* x86 */ memset( &launch_op, 0, sizeof(launch_op) ); diff -r c4eead8a925b linux-2.6-xen-sparse/drivers/xen/core/smpboot.c --- a/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c Sun Apr 16 14:41:31 2006 +++ b/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c Thu Apr 20 22:45:36 2006 @@ -216,6 +216,8 @@ ctxt.gs_base_kernel = (unsigned long)(cpu_pda(vcpu)); #endif + /* set sane cr0 bits, protected and paging enabled */ + ctxt.ctrlreg[0] = 0x80000001; BUG_ON(HYPERVISOR_vcpu_op(VCPUOP_initialise, vcpu, &ctxt)); }