summaryrefslogtreecommitdiff
path: root/arch/x86/xen/enlighten.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2008-07-09 02:07:05 +0400
committerIngo Molnar <mingo@elte.hu>2008-07-16 13:03:45 +0400
commita8fc1089e49caa5dca346dfacb5c84abf9a22a0c (patch)
tree96867d58309f72cbcce52c260dd8187ff05de013 /arch/x86/xen/enlighten.c
parent45eb0d889862c813dfc98c95549c25acbfc99ab8 (diff)
downloadlinux-a8fc1089e49caa5dca346dfacb5c84abf9a22a0c.tar.xz
xen64: implement xen_load_gs_index()
xen-64: implement xen_load_gs_index() Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Stephen Tweedie <sct@redhat.com> Cc: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
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)
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,
const void *ptr)
{
@@ -1063,6 +1071,9 @@ static const struct pv_cpu_ops xen_cpu_ops __initdata = {
.load_gdt = xen_load_gdt,
.load_idt = xen_load_idt,
.load_tls = xen_load_tls,
+#ifdef CONFIG_X86_64
+ .load_gs_index = xen_load_gs_index,
+#endif
.store_gdt = native_store_gdt,
.store_idt = native_store_idt,