Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136715
b: refs/heads/master
c: 3834143
h: refs/heads/master
i:
  136713: d427caf
  136711: b47bf45
v: v3
  • Loading branch information
Jeremy Fitzhardinge authored and H. Peter Anvin committed Feb 5, 2009
1 parent a5e3ddd commit c4009d2
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 327641da8e3e227f42690479182b896fd19486be
refs/heads/master: 383414322b3b3ced0cbc146801e0cc6c60a6c5f4
15 changes: 14 additions & 1 deletion trunk/arch/x86/xen/enlighten.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ EXPORT_SYMBOL_GPL(xen_start_info);

struct shared_info xen_dummy_shared_info;

void *xen_initial_gdt;

/*
* Point at some empty memory to start with. We map the real shared_info
* page as soon as fixmap is up and running.
Expand Down Expand Up @@ -917,8 +919,19 @@ asmlinkage void __init xen_start_kernel(void)
have_vcpu_info_placement = 0;
#endif

/* setup percpu state */
#ifdef CONFIG_X86_64
/*
* Setup percpu state. We only need to do this for 64-bit
* because 32-bit already has %fs set properly.
*/
load_percpu_segment(0);
#endif
/*
* The only reliable way to retain the initial address of the
* percpu gdt_page is to remember it here, so we can go and
* mark it RW later, when the initial percpu area is freed.
*/
xen_initial_gdt = &per_cpu(gdt_page, 0);

xen_smp_init();

Expand Down
6 changes: 4 additions & 2 deletions trunk/arch/x86/xen/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@ static void __init xen_smp_prepare_boot_cpu(void)

/* We've switched to the "real" per-cpu gdt, so make sure the
old memory can be recycled */
make_lowmem_page_readwrite(__per_cpu_load +
(unsigned long)&per_cpu_var(gdt_page));
make_lowmem_page_readwrite(xen_initial_gdt);

xen_setup_vcpu_info_placement();
}
Expand Down Expand Up @@ -287,6 +286,9 @@ static int __cpuinit xen_cpu_up(unsigned int cpu)
irq_ctx_init(cpu);
#else
clear_tsk_thread_flag(idle, TIF_FORK);
per_cpu(kernel_stack, cpu) =
(unsigned long)task_stack_page(idle) -
KERNEL_STACK_OFFSET + THREAD_SIZE;
#endif
xen_setup_timer(cpu);
xen_init_lock_cpu(cpu);
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86/xen/xen-ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
extern const char xen_hypervisor_callback[];
extern const char xen_failsafe_callback[];

extern void *xen_initial_gdt;

struct trap_info;
void xen_copy_trap_info(struct trap_info *traps);

Expand Down

0 comments on commit c4009d2

Please sign in to comment.