diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-06-25 00:19:32 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 07:15:58 -0400 |
commit | 9f9d489a3e78b49d897734eaaf9dea568dbea66e (patch) | |
tree | 5c3b851701817af0937225bd38602e54ca960868 /include/asm-x86 | |
parent | fab58420ac0007a452b540cfb07923225ea4f48d (diff) |
x86/paravirt, 64-bit: make load_gs_index() a paravirt operation
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: xen-devel <xen-devel@lists.xensource.com>
Cc: Stephen Tweedie <sct@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86')
-rw-r--r-- | include/asm-x86/elf.h | 2 | ||||
-rw-r--r-- | include/asm-x86/paravirt.h | 10 | ||||
-rw-r--r-- | include/asm-x86/system.h | 3 |
3 files changed, 13 insertions, 2 deletions
diff --git a/include/asm-x86/elf.h b/include/asm-x86/elf.h index 8f232dc5b5fe..7be4733c793e 100644 --- a/include/asm-x86/elf.h +++ b/include/asm-x86/elf.h | |||
@@ -83,9 +83,9 @@ extern unsigned int vdso_enabled; | |||
83 | (((x)->e_machine == EM_386) || ((x)->e_machine == EM_486)) | 83 | (((x)->e_machine == EM_386) || ((x)->e_machine == EM_486)) |
84 | 84 | ||
85 | #include <asm/processor.h> | 85 | #include <asm/processor.h> |
86 | #include <asm/system.h> | ||
86 | 87 | ||
87 | #ifdef CONFIG_X86_32 | 88 | #ifdef CONFIG_X86_32 |
88 | #include <asm/system.h> /* for savesegment */ | ||
89 | #include <asm/desc.h> | 89 | #include <asm/desc.h> |
90 | 90 | ||
91 | #define elf_check_arch(x) elf_check_arch_ia32(x) | 91 | #define elf_check_arch(x) elf_check_arch_ia32(x) |
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h index 3dc223da200b..6d8966f9d190 100644 --- a/include/asm-x86/paravirt.h +++ b/include/asm-x86/paravirt.h | |||
@@ -115,6 +115,9 @@ struct pv_cpu_ops { | |||
115 | void (*set_ldt)(const void *desc, unsigned entries); | 115 | void (*set_ldt)(const void *desc, unsigned entries); |
116 | unsigned long (*store_tr)(void); | 116 | unsigned long (*store_tr)(void); |
117 | void (*load_tls)(struct thread_struct *t, unsigned int cpu); | 117 | void (*load_tls)(struct thread_struct *t, unsigned int cpu); |
118 | #ifdef CONFIG_X86_64 | ||
119 | void (*load_gs_index)(unsigned int idx); | ||
120 | #endif | ||
118 | void (*write_ldt_entry)(struct desc_struct *ldt, int entrynum, | 121 | void (*write_ldt_entry)(struct desc_struct *ldt, int entrynum, |
119 | const void *desc); | 122 | const void *desc); |
120 | void (*write_gdt_entry)(struct desc_struct *, | 123 | void (*write_gdt_entry)(struct desc_struct *, |
@@ -845,6 +848,13 @@ static inline void load_TLS(struct thread_struct *t, unsigned cpu) | |||
845 | PVOP_VCALL2(pv_cpu_ops.load_tls, t, cpu); | 848 | PVOP_VCALL2(pv_cpu_ops.load_tls, t, cpu); |
846 | } | 849 | } |
847 | 850 | ||
851 | #ifdef CONFIG_X86_64 | ||
852 | static inline void load_gs_index(unsigned int gs) | ||
853 | { | ||
854 | PVOP_VCALL1(pv_cpu_ops.load_gs_index, gs); | ||
855 | } | ||
856 | #endif | ||
857 | |||
848 | static inline void write_ldt_entry(struct desc_struct *dt, int entry, | 858 | static inline void write_ldt_entry(struct desc_struct *dt, int entry, |
849 | const void *desc) | 859 | const void *desc) |
850 | { | 860 | { |
diff --git a/include/asm-x86/system.h b/include/asm-x86/system.h index f686aa6abfe9..c4946c5964bf 100644 --- a/include/asm-x86/system.h +++ b/include/asm-x86/system.h | |||
@@ -136,7 +136,7 @@ __asm__ __volatile__ ("movw %%dx,%1\n\t" \ | |||
136 | #define set_base(ldt, base) _set_base(((char *)&(ldt)) , (base)) | 136 | #define set_base(ldt, base) _set_base(((char *)&(ldt)) , (base)) |
137 | #define set_limit(ldt, limit) _set_limit(((char *)&(ldt)) , ((limit)-1)) | 137 | #define set_limit(ldt, limit) _set_limit(((char *)&(ldt)) , ((limit)-1)) |
138 | 138 | ||
139 | extern void load_gs_index(unsigned); | 139 | extern void native_load_gs_index(unsigned); |
140 | 140 | ||
141 | /* | 141 | /* |
142 | * Load a segment. Fall back on loading the zero | 142 | * Load a segment. Fall back on loading the zero |
@@ -282,6 +282,7 @@ static inline void native_wbinvd(void) | |||
282 | #ifdef CONFIG_X86_64 | 282 | #ifdef CONFIG_X86_64 |
283 | #define read_cr8() (native_read_cr8()) | 283 | #define read_cr8() (native_read_cr8()) |
284 | #define write_cr8(x) (native_write_cr8(x)) | 284 | #define write_cr8(x) (native_write_cr8(x)) |
285 | #define load_gs_index native_load_gs_index | ||
285 | #endif | 286 | #endif |
286 | 287 | ||
287 | /* Clear the 'TS' bit */ | 288 | /* Clear the 'TS' bit */ |