summaryrefslogtreecommitdiffstats
path: root/include/asm-x86/paravirt.h
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-07-23 14:21:18 -0700
committerIngo Molnar <mingo@elte.hu>2008-07-24 12:30:06 +0200
commit38ffbe66d59051fd9cfcfc8545f164700e2fa3bc (patch)
tree37e76db49cc86b3da550a62f36d101c7269d262e /include/asm-x86/paravirt.h
parent338b9bb3adac0d2c5a1e180491d9b001d624c402 (diff)
downloadkernel-crypto-38ffbe66d59051fd9cfcfc8545f164700e2fa3bc.tar.gz
kernel-crypto-38ffbe66d59051fd9cfcfc8545f164700e2fa3bc.tar.xz
kernel-crypto-38ffbe66d59051fd9cfcfc8545f164700e2fa3bc.zip
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/asm-x86/paravirt.h')
-rw-r--r--include/asm-x86/paravirt.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h
index fbbde93f12d..db9b0647b34 100644
--- a/include/asm-x86/paravirt.h
+++ b/include/asm-x86/paravirt.h
@@ -124,6 +124,9 @@ struct pv_cpu_ops {
int entrynum, const void *desc, int size);
void (*write_idt_entry)(gate_desc *,
int entrynum, const gate_desc *gate);
+ void (*alloc_ldt)(struct desc_struct *ldt, unsigned entries);
+ void (*free_ldt)(struct desc_struct *ldt, unsigned entries);
+
void (*load_sp0)(struct tss_struct *tss, struct thread_struct *t);
void (*set_iopl_mask)(unsigned mask);
@@ -824,6 +827,16 @@ do { \
(aux) = __aux; \
} while (0)
+static inline void paravirt_alloc_ldt(struct desc_struct *ldt, unsigned entries)
+{
+ PVOP_VCALL2(pv_cpu_ops.alloc_ldt, ldt, entries);
+}
+
+static inline void paravirt_free_ldt(struct desc_struct *ldt, unsigned entries)
+{
+ PVOP_VCALL2(pv_cpu_ops.free_ldt, ldt, entries);
+}
+
static inline void load_TR_desc(void)
{
PVOP_VCALL0(pv_cpu_ops.load_tr_desc);