direct-io.hg

changeset 7461:e813ac9f7d23

Fix early bootstrap of secondary VCPUs on x86/64.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Oct 21 14:33:46 2005 +0100 (2005-10-21)
parents d8b35f72a587
children c4c0bded343a
files linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c	Fri Oct 21 13:30:31 2005 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c	Fri Oct 21 14:33:46 2005 +0100
     1.3 @@ -179,6 +179,8 @@ void vcpu_prepare(int vcpu)
     1.4  	ctxt.syscall_callback_eip  = (unsigned long)system_call;
     1.5  
     1.6  	ctxt.ctrlreg[3] = virt_to_mfn(init_level4_pgt) << PAGE_SHIFT;
     1.7 +
     1.8 +	ctxt.gs_base_kernel = (unsigned long)(cpu_pda + vcpu);
     1.9  #endif
    1.10  
    1.11  	BUG_ON(HYPERVISOR_vcpu_op(VCPUOP_initialise, vcpu, &ctxt));
    1.12 @@ -208,6 +210,13 @@ void __init smp_prepare_cpus(unsigned in
    1.13  		if (IS_ERR(idle))
    1.14  			panic("failed fork for CPU %d", cpu);
    1.15  
    1.16 +#ifdef __x86_64__
    1.17 +		cpu_pda[cpu].pcurrent = idle;
    1.18 +		cpu_pda[cpu].cpunumber = cpu;
    1.19 +		per_cpu(init_tss,cpu).rsp0 = idle->thread.rsp;
    1.20 +		clear_ti_thread_flag(idle->thread_info, TIF_FORK);
    1.21 +#endif
    1.22 +
    1.23  		irq_ctx_init(cpu);
    1.24  
    1.25  		cpu_gdt_descr[cpu].address =