paravirt.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. #ifndef __ASM_PARAVIRT_H
  2. #define __ASM_PARAVIRT_H
  3. /* Various instructions on x86 need to be replaced for
  4. * para-virtualization: those hooks are defined here. */
  5. #include <linux/linkage.h>
  6. #include <linux/stringify.h>
  7. #include <asm/page.h>
  8. #ifdef CONFIG_PARAVIRT
  9. /* These are the most performance critical ops, so we want to be able to patch
  10. * callers */
  11. #define PARAVIRT_IRQ_DISABLE 0
  12. #define PARAVIRT_IRQ_ENABLE 1
  13. #define PARAVIRT_RESTORE_FLAGS 2
  14. #define PARAVIRT_SAVE_FLAGS 3
  15. #define PARAVIRT_SAVE_FLAGS_IRQ_DISABLE 4
  16. #define PARAVIRT_INTERRUPT_RETURN 5
  17. #define PARAVIRT_STI_SYSEXIT 6
  18. /* Bitmask of what can be clobbered: usually at least eax. */
  19. #define CLBR_NONE 0x0
  20. #define CLBR_EAX 0x1
  21. #define CLBR_ECX 0x2
  22. #define CLBR_EDX 0x4
  23. #define CLBR_ANY 0x7
  24. #ifndef __ASSEMBLY__
  25. struct thread_struct;
  26. struct Xgt_desc_struct;
  27. struct tss_struct;
  28. struct mm_struct;
  29. struct paravirt_ops
  30. {
  31. unsigned int kernel_rpl;
  32. int paravirt_enabled;
  33. const char *name;
  34. /*
  35. * Patch may replace one of the defined code sequences with arbitrary
  36. * code, subject to the same register constraints. This generally
  37. * means the code is not free to clobber any registers other than EAX.
  38. * The patch function should return the number of bytes of code
  39. * generated, as we nop pad the rest in generic code.
  40. */
  41. unsigned (*patch)(u8 type, u16 clobber, void *firstinsn, unsigned len);
  42. void (*arch_setup)(void);
  43. char *(*memory_setup)(void);
  44. void (*init_IRQ)(void);
  45. void (*banner)(void);
  46. unsigned long (*get_wallclock)(void);
  47. int (*set_wallclock)(unsigned long);
  48. void (*time_init)(void);
  49. /* All the function pointers here are declared as "fastcall"
  50. so that we get a specific register-based calling
  51. convention. This makes it easier to implement inline
  52. assembler replacements. */
  53. void (*cpuid)(unsigned int *eax, unsigned int *ebx,
  54. unsigned int *ecx, unsigned int *edx);
  55. unsigned long (*get_debugreg)(int regno);
  56. void (*set_debugreg)(int regno, unsigned long value);
  57. void (*clts)(void);
  58. unsigned long (*read_cr0)(void);
  59. void (*write_cr0)(unsigned long);
  60. unsigned long (*read_cr2)(void);
  61. void (*write_cr2)(unsigned long);
  62. unsigned long (*read_cr3)(void);
  63. void (*write_cr3)(unsigned long);
  64. unsigned long (*read_cr4_safe)(void);
  65. unsigned long (*read_cr4)(void);
  66. void (*write_cr4)(unsigned long);
  67. unsigned long (*save_fl)(void);
  68. void (*restore_fl)(unsigned long);
  69. void (*irq_disable)(void);
  70. void (*irq_enable)(void);
  71. void (*safe_halt)(void);
  72. void (*halt)(void);
  73. void (*wbinvd)(void);
  74. /* err = 0/-EFAULT. wrmsr returns 0/-EFAULT. */
  75. u64 (*read_msr)(unsigned int msr, int *err);
  76. int (*write_msr)(unsigned int msr, u64 val);
  77. u64 (*read_tsc)(void);
  78. u64 (*read_pmc)(void);
  79. u64 (*get_scheduled_cycles)(void);
  80. unsigned long (*get_cpu_khz)(void);
  81. void (*load_tr_desc)(void);
  82. void (*load_gdt)(const struct Xgt_desc_struct *);
  83. void (*load_idt)(const struct Xgt_desc_struct *);
  84. void (*store_gdt)(struct Xgt_desc_struct *);
  85. void (*store_idt)(struct Xgt_desc_struct *);
  86. void (*set_ldt)(const void *desc, unsigned entries);
  87. unsigned long (*store_tr)(void);
  88. void (*load_tls)(struct thread_struct *t, unsigned int cpu);
  89. void (*write_ldt_entry)(void *dt, int entrynum,
  90. u32 low, u32 high);
  91. void (*write_gdt_entry)(void *dt, int entrynum,
  92. u32 low, u32 high);
  93. void (*write_idt_entry)(void *dt, int entrynum,
  94. u32 low, u32 high);
  95. void (*load_esp0)(struct tss_struct *tss,
  96. struct thread_struct *thread);
  97. void (*set_iopl_mask)(unsigned mask);
  98. void (*io_delay)(void);
  99. void (*const_udelay)(unsigned long loops);
  100. #ifdef CONFIG_X86_LOCAL_APIC
  101. void (*apic_write)(unsigned long reg, unsigned long v);
  102. void (*apic_write_atomic)(unsigned long reg, unsigned long v);
  103. unsigned long (*apic_read)(unsigned long reg);
  104. void (*setup_boot_clock)(void);
  105. void (*setup_secondary_clock)(void);
  106. #endif
  107. void (*flush_tlb_user)(void);
  108. void (*flush_tlb_kernel)(void);
  109. void (*flush_tlb_single)(u32 addr);
  110. void (fastcall *map_pt_hook)(int type, pte_t *va, u32 pfn);
  111. void (*alloc_pt)(u32 pfn);
  112. void (*alloc_pd)(u32 pfn);
  113. void (*alloc_pd_clone)(u32 pfn, u32 clonepfn, u32 start, u32 count);
  114. void (*release_pt)(u32 pfn);
  115. void (*release_pd)(u32 pfn);
  116. void (*set_pte)(pte_t *ptep, pte_t pteval);
  117. void (*set_pte_at)(struct mm_struct *mm, u32 addr, pte_t *ptep, pte_t pteval);
  118. void (*set_pmd)(pmd_t *pmdp, pmd_t pmdval);
  119. void (*pte_update)(struct mm_struct *mm, u32 addr, pte_t *ptep);
  120. void (*pte_update_defer)(struct mm_struct *mm, u32 addr, pte_t *ptep);
  121. #ifdef CONFIG_X86_PAE
  122. void (*set_pte_atomic)(pte_t *ptep, pte_t pteval);
  123. void (*set_pte_present)(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte);
  124. void (*set_pud)(pud_t *pudp, pud_t pudval);
  125. void (*pte_clear)(struct mm_struct *mm, unsigned long addr, pte_t *ptep);
  126. void (*pmd_clear)(pmd_t *pmdp);
  127. #endif
  128. void (*set_lazy_mode)(int mode);
  129. /* These two are jmp to, not actually called. */
  130. void (*irq_enable_sysexit)(void);
  131. void (*iret)(void);
  132. void (*startup_ipi_hook)(int phys_apicid, unsigned long start_eip, unsigned long start_esp);
  133. };
  134. /* Mark a paravirt probe function. */
  135. #define paravirt_probe(fn) \
  136. static asmlinkage void (*__paravirtprobe_##fn)(void) __attribute_used__ \
  137. __attribute__((__section__(".paravirtprobe"))) = fn
  138. extern struct paravirt_ops paravirt_ops;
  139. #define paravirt_enabled() (paravirt_ops.paravirt_enabled)
  140. static inline void load_esp0(struct tss_struct *tss,
  141. struct thread_struct *thread)
  142. {
  143. paravirt_ops.load_esp0(tss, thread);
  144. }
  145. #define ARCH_SETUP paravirt_ops.arch_setup();
  146. static inline unsigned long get_wallclock(void)
  147. {
  148. return paravirt_ops.get_wallclock();
  149. }
  150. static inline int set_wallclock(unsigned long nowtime)
  151. {
  152. return paravirt_ops.set_wallclock(nowtime);
  153. }
  154. static inline void do_time_init(void)
  155. {
  156. return paravirt_ops.time_init();
  157. }
  158. /* The paravirtualized CPUID instruction. */
  159. static inline void __cpuid(unsigned int *eax, unsigned int *ebx,
  160. unsigned int *ecx, unsigned int *edx)
  161. {
  162. paravirt_ops.cpuid(eax, ebx, ecx, edx);
  163. }
  164. /*
  165. * These special macros can be used to get or set a debugging register
  166. */
  167. #define get_debugreg(var, reg) var = paravirt_ops.get_debugreg(reg)
  168. #define set_debugreg(val, reg) paravirt_ops.set_debugreg(reg, val)
  169. #define clts() paravirt_ops.clts()
  170. #define read_cr0() paravirt_ops.read_cr0()
  171. #define write_cr0(x) paravirt_ops.write_cr0(x)
  172. #define read_cr2() paravirt_ops.read_cr2()
  173. #define write_cr2(x) paravirt_ops.write_cr2(x)
  174. #define read_cr3() paravirt_ops.read_cr3()
  175. #define write_cr3(x) paravirt_ops.write_cr3(x)
  176. #define read_cr4() paravirt_ops.read_cr4()
  177. #define read_cr4_safe(x) paravirt_ops.read_cr4_safe()
  178. #define write_cr4(x) paravirt_ops.write_cr4(x)
  179. static inline void raw_safe_halt(void)
  180. {
  181. paravirt_ops.safe_halt();
  182. }
  183. static inline void halt(void)
  184. {
  185. paravirt_ops.safe_halt();
  186. }
  187. #define wbinvd() paravirt_ops.wbinvd()
  188. #define get_kernel_rpl() (paravirt_ops.kernel_rpl)
  189. #define rdmsr(msr,val1,val2) do { \
  190. int _err; \
  191. u64 _l = paravirt_ops.read_msr(msr,&_err); \
  192. val1 = (u32)_l; \
  193. val2 = _l >> 32; \
  194. } while(0)
  195. #define wrmsr(msr,val1,val2) do { \
  196. u64 _l = ((u64)(val2) << 32) | (val1); \
  197. paravirt_ops.write_msr((msr), _l); \
  198. } while(0)
  199. #define rdmsrl(msr,val) do { \
  200. int _err; \
  201. val = paravirt_ops.read_msr((msr),&_err); \
  202. } while(0)
  203. #define wrmsrl(msr,val) (paravirt_ops.write_msr((msr),(val)))
  204. #define wrmsr_safe(msr,a,b) ({ \
  205. u64 _l = ((u64)(b) << 32) | (a); \
  206. paravirt_ops.write_msr((msr),_l); \
  207. })
  208. /* rdmsr with exception handling */
  209. #define rdmsr_safe(msr,a,b) ({ \
  210. int _err; \
  211. u64 _l = paravirt_ops.read_msr(msr,&_err); \
  212. (*a) = (u32)_l; \
  213. (*b) = _l >> 32; \
  214. _err; })
  215. #define rdtsc(low,high) do { \
  216. u64 _l = paravirt_ops.read_tsc(); \
  217. low = (u32)_l; \
  218. high = _l >> 32; \
  219. } while(0)
  220. #define rdtscl(low) do { \
  221. u64 _l = paravirt_ops.read_tsc(); \
  222. low = (int)_l; \
  223. } while(0)
  224. #define rdtscll(val) (val = paravirt_ops.read_tsc())
  225. #define get_scheduled_cycles(val) (val = paravirt_ops.get_scheduled_cycles())
  226. #define calculate_cpu_khz() (paravirt_ops.get_cpu_khz())
  227. #define write_tsc(val1,val2) wrmsr(0x10, val1, val2)
  228. #define rdpmc(counter,low,high) do { \
  229. u64 _l = paravirt_ops.read_pmc(); \
  230. low = (u32)_l; \
  231. high = _l >> 32; \
  232. } while(0)
  233. #define load_TR_desc() (paravirt_ops.load_tr_desc())
  234. #define load_gdt(dtr) (paravirt_ops.load_gdt(dtr))
  235. #define load_idt(dtr) (paravirt_ops.load_idt(dtr))
  236. #define set_ldt(addr, entries) (paravirt_ops.set_ldt((addr), (entries)))
  237. #define store_gdt(dtr) (paravirt_ops.store_gdt(dtr))
  238. #define store_idt(dtr) (paravirt_ops.store_idt(dtr))
  239. #define store_tr(tr) ((tr) = paravirt_ops.store_tr())
  240. #define load_TLS(t,cpu) (paravirt_ops.load_tls((t),(cpu)))
  241. #define write_ldt_entry(dt, entry, low, high) \
  242. (paravirt_ops.write_ldt_entry((dt), (entry), (low), (high)))
  243. #define write_gdt_entry(dt, entry, low, high) \
  244. (paravirt_ops.write_gdt_entry((dt), (entry), (low), (high)))
  245. #define write_idt_entry(dt, entry, low, high) \
  246. (paravirt_ops.write_idt_entry((dt), (entry), (low), (high)))
  247. #define set_iopl_mask(mask) (paravirt_ops.set_iopl_mask(mask))
  248. /* The paravirtualized I/O functions */
  249. static inline void slow_down_io(void) {
  250. paravirt_ops.io_delay();
  251. #ifdef REALLY_SLOW_IO
  252. paravirt_ops.io_delay();
  253. paravirt_ops.io_delay();
  254. paravirt_ops.io_delay();
  255. #endif
  256. }
  257. #ifdef CONFIG_X86_LOCAL_APIC
  258. /*
  259. * Basic functions accessing APICs.
  260. */
  261. static inline void apic_write(unsigned long reg, unsigned long v)
  262. {
  263. paravirt_ops.apic_write(reg,v);
  264. }
  265. static inline void apic_write_atomic(unsigned long reg, unsigned long v)
  266. {
  267. paravirt_ops.apic_write_atomic(reg,v);
  268. }
  269. static inline unsigned long apic_read(unsigned long reg)
  270. {
  271. return paravirt_ops.apic_read(reg);
  272. }
  273. static inline void setup_boot_clock(void)
  274. {
  275. paravirt_ops.setup_boot_clock();
  276. }
  277. static inline void setup_secondary_clock(void)
  278. {
  279. paravirt_ops.setup_secondary_clock();
  280. }
  281. #endif
  282. #ifdef CONFIG_SMP
  283. static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip,
  284. unsigned long start_esp)
  285. {
  286. return paravirt_ops.startup_ipi_hook(phys_apicid, start_eip, start_esp);
  287. }
  288. #endif
  289. #define __flush_tlb() paravirt_ops.flush_tlb_user()
  290. #define __flush_tlb_global() paravirt_ops.flush_tlb_kernel()
  291. #define __flush_tlb_single(addr) paravirt_ops.flush_tlb_single(addr)
  292. #define paravirt_map_pt_hook(type, va, pfn) paravirt_ops.map_pt_hook(type, va, pfn)
  293. #define paravirt_alloc_pt(pfn) paravirt_ops.alloc_pt(pfn)
  294. #define paravirt_release_pt(pfn) paravirt_ops.release_pt(pfn)
  295. #define paravirt_alloc_pd(pfn) paravirt_ops.alloc_pd(pfn)
  296. #define paravirt_alloc_pd_clone(pfn, clonepfn, start, count) \
  297. paravirt_ops.alloc_pd_clone(pfn, clonepfn, start, count)
  298. #define paravirt_release_pd(pfn) paravirt_ops.release_pd(pfn)
  299. static inline void set_pte(pte_t *ptep, pte_t pteval)
  300. {
  301. paravirt_ops.set_pte(ptep, pteval);
  302. }
  303. static inline void set_pte_at(struct mm_struct *mm, u32 addr, pte_t *ptep, pte_t pteval)
  304. {
  305. paravirt_ops.set_pte_at(mm, addr, ptep, pteval);
  306. }
  307. static inline void set_pmd(pmd_t *pmdp, pmd_t pmdval)
  308. {
  309. paravirt_ops.set_pmd(pmdp, pmdval);
  310. }
  311. static inline void pte_update(struct mm_struct *mm, u32 addr, pte_t *ptep)
  312. {
  313. paravirt_ops.pte_update(mm, addr, ptep);
  314. }
  315. static inline void pte_update_defer(struct mm_struct *mm, u32 addr, pte_t *ptep)
  316. {
  317. paravirt_ops.pte_update_defer(mm, addr, ptep);
  318. }
  319. #ifdef CONFIG_X86_PAE
  320. static inline void set_pte_atomic(pte_t *ptep, pte_t pteval)
  321. {
  322. paravirt_ops.set_pte_atomic(ptep, pteval);
  323. }
  324. static inline void set_pte_present(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte)
  325. {
  326. paravirt_ops.set_pte_present(mm, addr, ptep, pte);
  327. }
  328. static inline void set_pud(pud_t *pudp, pud_t pudval)
  329. {
  330. paravirt_ops.set_pud(pudp, pudval);
  331. }
  332. static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
  333. {
  334. paravirt_ops.pte_clear(mm, addr, ptep);
  335. }
  336. static inline void pmd_clear(pmd_t *pmdp)
  337. {
  338. paravirt_ops.pmd_clear(pmdp);
  339. }
  340. #endif
  341. /* Lazy mode for batching updates / context switch */
  342. #define PARAVIRT_LAZY_NONE 0
  343. #define PARAVIRT_LAZY_MMU 1
  344. #define PARAVIRT_LAZY_CPU 2
  345. #define __HAVE_ARCH_ENTER_LAZY_CPU_MODE
  346. #define arch_enter_lazy_cpu_mode() paravirt_ops.set_lazy_mode(PARAVIRT_LAZY_CPU)
  347. #define arch_leave_lazy_cpu_mode() paravirt_ops.set_lazy_mode(PARAVIRT_LAZY_NONE)
  348. #define __HAVE_ARCH_ENTER_LAZY_MMU_MODE
  349. #define arch_enter_lazy_mmu_mode() paravirt_ops.set_lazy_mode(PARAVIRT_LAZY_MMU)
  350. #define arch_leave_lazy_mmu_mode() paravirt_ops.set_lazy_mode(PARAVIRT_LAZY_NONE)
  351. /* These all sit in the .parainstructions section to tell us what to patch. */
  352. struct paravirt_patch {
  353. u8 *instr; /* original instructions */
  354. u8 instrtype; /* type of this instruction */
  355. u8 len; /* length of original instruction */
  356. u16 clobbers; /* what registers you may clobber */
  357. };
  358. #define paravirt_alt(insn_string, typenum, clobber) \
  359. "771:\n\t" insn_string "\n" "772:\n" \
  360. ".pushsection .parainstructions,\"a\"\n" \
  361. " .long 771b\n" \
  362. " .byte " __stringify(typenum) "\n" \
  363. " .byte 772b-771b\n" \
  364. " .short " __stringify(clobber) "\n" \
  365. ".popsection"
  366. static inline unsigned long __raw_local_save_flags(void)
  367. {
  368. unsigned long f;
  369. __asm__ __volatile__(paravirt_alt( "pushl %%ecx; pushl %%edx;"
  370. "call *%1;"
  371. "popl %%edx; popl %%ecx",
  372. PARAVIRT_SAVE_FLAGS, CLBR_NONE)
  373. : "=a"(f): "m"(paravirt_ops.save_fl)
  374. : "memory", "cc");
  375. return f;
  376. }
  377. static inline void raw_local_irq_restore(unsigned long f)
  378. {
  379. __asm__ __volatile__(paravirt_alt( "pushl %%ecx; pushl %%edx;"
  380. "call *%1;"
  381. "popl %%edx; popl %%ecx",
  382. PARAVIRT_RESTORE_FLAGS, CLBR_EAX)
  383. : "=a"(f) : "m" (paravirt_ops.restore_fl), "0"(f)
  384. : "memory", "cc");
  385. }
  386. static inline void raw_local_irq_disable(void)
  387. {
  388. __asm__ __volatile__(paravirt_alt( "pushl %%ecx; pushl %%edx;"
  389. "call *%0;"
  390. "popl %%edx; popl %%ecx",
  391. PARAVIRT_IRQ_DISABLE, CLBR_EAX)
  392. : : "m" (paravirt_ops.irq_disable)
  393. : "memory", "eax", "cc");
  394. }
  395. static inline void raw_local_irq_enable(void)
  396. {
  397. __asm__ __volatile__(paravirt_alt( "pushl %%ecx; pushl %%edx;"
  398. "call *%0;"
  399. "popl %%edx; popl %%ecx",
  400. PARAVIRT_IRQ_ENABLE, CLBR_EAX)
  401. : : "m" (paravirt_ops.irq_enable)
  402. : "memory", "eax", "cc");
  403. }
  404. static inline unsigned long __raw_local_irq_save(void)
  405. {
  406. unsigned long f;
  407. __asm__ __volatile__(paravirt_alt( "pushl %%ecx; pushl %%edx;"
  408. "call *%1; pushl %%eax;"
  409. "call *%2; popl %%eax;"
  410. "popl %%edx; popl %%ecx",
  411. PARAVIRT_SAVE_FLAGS_IRQ_DISABLE,
  412. CLBR_NONE)
  413. : "=a"(f)
  414. : "m" (paravirt_ops.save_fl),
  415. "m" (paravirt_ops.irq_disable)
  416. : "memory", "cc");
  417. return f;
  418. }
  419. #define CLI_STRING paravirt_alt("pushl %%ecx; pushl %%edx;" \
  420. "call *paravirt_ops+%c[irq_disable];" \
  421. "popl %%edx; popl %%ecx", \
  422. PARAVIRT_IRQ_DISABLE, CLBR_EAX)
  423. #define STI_STRING paravirt_alt("pushl %%ecx; pushl %%edx;" \
  424. "call *paravirt_ops+%c[irq_enable];" \
  425. "popl %%edx; popl %%ecx", \
  426. PARAVIRT_IRQ_ENABLE, CLBR_EAX)
  427. #define CLI_STI_CLOBBERS , "%eax"
  428. #define CLI_STI_INPUT_ARGS \
  429. , \
  430. [irq_disable] "i" (offsetof(struct paravirt_ops, irq_disable)), \
  431. [irq_enable] "i" (offsetof(struct paravirt_ops, irq_enable))
  432. #else /* __ASSEMBLY__ */
  433. #define PARA_PATCH(ptype, clobbers, ops) \
  434. 771:; \
  435. ops; \
  436. 772:; \
  437. .pushsection .parainstructions,"a"; \
  438. .long 771b; \
  439. .byte ptype; \
  440. .byte 772b-771b; \
  441. .short clobbers; \
  442. .popsection
  443. #define INTERRUPT_RETURN \
  444. PARA_PATCH(PARAVIRT_INTERRUPT_RETURN, CLBR_ANY, \
  445. jmp *%cs:paravirt_ops+PARAVIRT_iret)
  446. #define DISABLE_INTERRUPTS(clobbers) \
  447. PARA_PATCH(PARAVIRT_IRQ_DISABLE, clobbers, \
  448. pushl %ecx; pushl %edx; \
  449. call *paravirt_ops+PARAVIRT_irq_disable; \
  450. popl %edx; popl %ecx) \
  451. #define ENABLE_INTERRUPTS(clobbers) \
  452. PARA_PATCH(PARAVIRT_IRQ_ENABLE, clobbers, \
  453. pushl %ecx; pushl %edx; \
  454. call *%cs:paravirt_ops+PARAVIRT_irq_enable; \
  455. popl %edx; popl %ecx)
  456. #define ENABLE_INTERRUPTS_SYSEXIT \
  457. PARA_PATCH(PARAVIRT_STI_SYSEXIT, CLBR_ANY, \
  458. jmp *%cs:paravirt_ops+PARAVIRT_irq_enable_sysexit)
  459. #define GET_CR0_INTO_EAX \
  460. call *paravirt_ops+PARAVIRT_read_cr0
  461. #endif /* __ASSEMBLY__ */
  462. #endif /* CONFIG_PARAVIRT */
  463. #endif /* __ASM_PARAVIRT_H */