Commit a8fc1089 authored by Eduardo Habkost's avatar Eduardo Habkost Committed by Ingo Molnar

xen64: implement xen_load_gs_index()

xen-64: implement xen_load_gs_index()
Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Stephen Tweedie <sct@redhat.com>
Cc: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 45eb0d88
...@@ -385,6 +385,14 @@ static void xen_load_tls(struct thread_struct *t, unsigned int cpu) ...@@ -385,6 +385,14 @@ static void xen_load_tls(struct thread_struct *t, unsigned int cpu)
loadsegment(gs, 0); loadsegment(gs, 0);
} }
#ifdef CONFIG_X86_64
static void xen_load_gs_index(unsigned int idx)
{
if (HYPERVISOR_set_segment_base(SEGBASE_GS_USER_SEL, idx))
BUG();
}
#endif
static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum, static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum,
const void *ptr) const void *ptr)
{ {
...@@ -1063,6 +1071,9 @@ static const struct pv_cpu_ops xen_cpu_ops __initdata = { ...@@ -1063,6 +1071,9 @@ static const struct pv_cpu_ops xen_cpu_ops __initdata = {
.load_gdt = xen_load_gdt, .load_gdt = xen_load_gdt,
.load_idt = xen_load_idt, .load_idt = xen_load_idt,
.load_tls = xen_load_tls, .load_tls = xen_load_tls,
#ifdef CONFIG_X86_64
.load_gs_index = xen_load_gs_index,
#endif
.store_gdt = native_store_gdt, .store_gdt = native_store_gdt,
.store_idt = native_store_idt, .store_idt = native_store_idt,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment