aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-07-23 17:21:18 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-24 06:30:06 -0400
commit38ffbe66d59051fd9cfcfc8545f164700e2fa3bc (patch)
tree37e76db49cc86b3da550a62f36d101c7269d262e /include
parent338b9bb3adac0d2c5a1e180491d9b001d624c402 (diff)
x86/paravirt/xen: properly fill out the ldt ops
LTP testing showed that Xen does not properly implement sys_modify_ldt(). This patch does the final little bits needed to make the ldt work properly. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86/desc.h10
-rw-r--r--include/asm-x86/paravirt.h13
2 files changed, 22 insertions, 1 deletions
diff --git a/include/asm-x86/desc.h b/include/asm-x86/desc.h
index a44c4dc70590..24a524f5e1a2 100644
--- a/include/asm-x86/desc.h
+++ b/include/asm-x86/desc.h
@@ -97,7 +97,15 @@ static inline int desc_empty(const void *ptr)
97 native_write_gdt_entry(dt, entry, desc, type) 97 native_write_gdt_entry(dt, entry, desc, type)
98#define write_idt_entry(dt, entry, g) \ 98#define write_idt_entry(dt, entry, g) \
99 native_write_idt_entry(dt, entry, g) 99 native_write_idt_entry(dt, entry, g)
100#endif 100
101static inline void paravirt_alloc_ldt(struct desc_struct *ldt, unsigned entries)
102{
103}
104
105static inline void paravirt_free_ldt(struct desc_struct *ldt, unsigned entries)
106{
107}
108#endif /* CONFIG_PARAVIRT */
101 109
102static inline void native_write_idt_entry(gate_desc *idt, int entry, 110static inline void native_write_idt_entry(gate_desc *idt, int entry,
103 const gate_desc *gate) 111 const gate_desc *gate)
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h
index fbbde93f12d6..db9b0647b346 100644
--- a/include/asm-x86/paravirt.h
+++ b/include/asm-x86/paravirt.h
@@ -124,6 +124,9 @@ struct pv_cpu_ops {
124 int entrynum, const void *desc, int size); 124 int entrynum, const void *desc, int size);
125 void (*write_idt_entry)(gate_desc *, 125 void (*write_idt_entry)(gate_desc *,
126 int entrynum, const gate_desc *gate); 126 int entrynum, const gate_desc *gate);
127 void (*alloc_ldt)(struct desc_struct *ldt, unsigned entries);
128 void (*free_ldt)(struct desc_struct *ldt, unsigned entries);
129
127 void (*load_sp0)(struct tss_struct *tss, struct thread_struct *t); 130 void (*load_sp0)(struct tss_struct *tss, struct thread_struct *t);
128 131
129 void (*set_iopl_mask)(unsigned mask); 132 void (*set_iopl_mask)(unsigned mask);
@@ -824,6 +827,16 @@ do { \
824 (aux) = __aux; \ 827 (aux) = __aux; \
825} while (0) 828} while (0)
826 829
830static inline void paravirt_alloc_ldt(struct desc_struct *ldt, unsigned entries)
831{
832 PVOP_VCALL2(pv_cpu_ops.alloc_ldt, ldt, entries);
833}
834
835static inline void paravirt_free_ldt(struct desc_struct *ldt, unsigned entries)
836{
837 PVOP_VCALL2(pv_cpu_ops.free_ldt, ldt, entries);
838}
839
827static inline void load_TR_desc(void) 840static inline void load_TR_desc(void)
828{ 841{
829 PVOP_VCALL0(pv_cpu_ops.load_tr_desc); 842 PVOP_VCALL0(pv_cpu_ops.load_tr_desc);