aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/paravirt.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86/paravirt.h')
-rw-r--r--include/asm-x86/paravirt.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h
index fbbde93f12d6..8e9b1266898c 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);
@@ -330,6 +333,7 @@ struct pv_lock_ops {
330 int (*spin_is_locked)(struct raw_spinlock *lock); 333 int (*spin_is_locked)(struct raw_spinlock *lock);
331 int (*spin_is_contended)(struct raw_spinlock *lock); 334 int (*spin_is_contended)(struct raw_spinlock *lock);
332 void (*spin_lock)(struct raw_spinlock *lock); 335 void (*spin_lock)(struct raw_spinlock *lock);
336 void (*spin_lock_flags)(struct raw_spinlock *lock, unsigned long flags);
333 int (*spin_trylock)(struct raw_spinlock *lock); 337 int (*spin_trylock)(struct raw_spinlock *lock);
334 void (*spin_unlock)(struct raw_spinlock *lock); 338 void (*spin_unlock)(struct raw_spinlock *lock);
335}; 339};
@@ -824,6 +828,16 @@ do { \
824 (aux) = __aux; \ 828 (aux) = __aux; \
825} while (0) 829} while (0)
826 830
831static inline void paravirt_alloc_ldt(struct desc_struct *ldt, unsigned entries)
832{
833 PVOP_VCALL2(pv_cpu_ops.alloc_ldt, ldt, entries);
834}
835
836static inline void paravirt_free_ldt(struct desc_struct *ldt, unsigned entries)
837{
838 PVOP_VCALL2(pv_cpu_ops.free_ldt, ldt, entries);
839}
840
827static inline void load_TR_desc(void) 841static inline void load_TR_desc(void)
828{ 842{
829 PVOP_VCALL0(pv_cpu_ops.load_tr_desc); 843 PVOP_VCALL0(pv_cpu_ops.load_tr_desc);
@@ -1401,6 +1415,12 @@ static __always_inline void __raw_spin_lock(struct raw_spinlock *lock)
1401 PVOP_VCALL1(pv_lock_ops.spin_lock, lock); 1415 PVOP_VCALL1(pv_lock_ops.spin_lock, lock);
1402} 1416}
1403 1417
1418static __always_inline void __raw_spin_lock_flags(struct raw_spinlock *lock,
1419 unsigned long flags)
1420{
1421 PVOP_VCALL2(pv_lock_ops.spin_lock_flags, lock, flags);
1422}
1423
1404static __always_inline int __raw_spin_trylock(struct raw_spinlock *lock) 1424static __always_inline int __raw_spin_trylock(struct raw_spinlock *lock)
1405{ 1425{
1406 return PVOP_CALL1(int, pv_lock_ops.spin_trylock, lock); 1426 return PVOP_CALL1(int, pv_lock_ops.spin_trylock, lock);