/* Set up the GDT and segment registers for -fstack-protector. Until we do this, we have to be careful not to call any stack-protected function, which is most of the kernel.  */
static void __init xen_setup_stackprotector(void)
/* Set up the GDT and segment registers for -fstack-protector. Until we do this, we have to be careful not to call any stack-protected function, which is most of the kernel.  */
static void __init xen_setup_stackprotector(void)
{
	pv_cpu_ops.write_gdt_entry = xen_write_gdt_entry_boot;
	pv_cpu_ops.load_gdt = xen_load_gdt_boot;
	setup_stack_canary_segment(0);
	switch_to_new_gdt(0);
	pv_cpu_ops.write_gdt_entry = xen_write_gdt_entry;
	pv_cpu_ops.load_gdt = xen_load_gdt;
}