aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/enlighten.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/xen/enlighten.c')
-rw-r--r--arch/x86/xen/enlighten.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 52f2292672c4..3b6b7fcf5b55 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -385,6 +385,14 @@ static void xen_load_tls(struct thread_struct *t, unsigned int cpu)
385 loadsegment(gs, 0); 385 loadsegment(gs, 0);
386} 386}
387 387
388#ifdef CONFIG_X86_64
389static void xen_load_gs_index(unsigned int idx)
390{
391 if (HYPERVISOR_set_segment_base(SEGBASE_GS_USER_SEL, idx))
392 BUG();
393}
394#endif
395
388static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum, 396static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum,
389 const void *ptr) 397 const void *ptr)
390{ 398{
@@ -1063,6 +1071,9 @@ static const struct pv_cpu_ops xen_cpu_ops __initdata = {
1063 .load_gdt = xen_load_gdt, 1071 .load_gdt = xen_load_gdt,
1064 .load_idt = xen_load_idt, 1072 .load_idt = xen_load_idt,
1065 .load_tls = xen_load_tls, 1073 .load_tls = xen_load_tls,
1074#ifdef CONFIG_X86_64
1075 .load_gs_index = xen_load_gs_index,
1076#endif
1066 1077
1067 .store_gdt = native_store_gdt, 1078 .store_gdt = native_store_gdt,
1068 .store_idt = native_store_idt, 1079 .store_idt = native_store_idt,