aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386/paravirt.h
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2007-05-02 13:27:14 -0400
committerAndi Kleen <andi@basil.nowhere.org>2007-05-02 13:27:14 -0400
commit42c24fa22e86365055fc931d833f26165e687c19 (patch)
treec74861202966ccb80afaae8469843cf2617fea65 /include/asm-i386/paravirt.h
parentd582203578a1f3d408e27bb9042e8635954cd320 (diff)
[PATCH] i386: PARAVIRT: Fix patch site clobbers to include return register
Fix a few clobbers to include the return register. The clobbers set is the set of all registers modified (or may be modified) by the code snippet, regardless of whether it was deliberate or accidental. Also, make sure that callsites which are used in contexts which don't allow clobbers actually save and restore all clobberable registers. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Andi Kleen <ak@suse.de> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Zachary Amsden <zach@vmware.com>
Diffstat (limited to 'include/asm-i386/paravirt.h')
-rw-r--r--include/asm-i386/paravirt.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/include/asm-i386/paravirt.h b/include/asm-i386/paravirt.h
index 1dbc01f4ed4d..87fd4317bee9 100644
--- a/include/asm-i386/paravirt.h
+++ b/include/asm-i386/paravirt.h
@@ -535,7 +535,7 @@ static inline unsigned long __raw_local_save_flags(void)
535 "popl %%edx; popl %%ecx") 535 "popl %%edx; popl %%ecx")
536 : "=a"(f) 536 : "=a"(f)
537 : paravirt_type(save_fl), 537 : paravirt_type(save_fl),
538 paravirt_clobber(CLBR_NONE) 538 paravirt_clobber(CLBR_EAX)
539 : "memory", "cc"); 539 : "memory", "cc");
540 return f; 540 return f;
541} 541}
@@ -620,27 +620,29 @@ static inline unsigned long __raw_local_irq_save(void)
620 .popsection 620 .popsection
621 621
622#define INTERRUPT_RETURN \ 622#define INTERRUPT_RETURN \
623 PARA_SITE(PARA_PATCH(PARAVIRT_iret), CLBR_ANY, \ 623 PARA_SITE(PARA_PATCH(PARAVIRT_iret), CLBR_NONE, \
624 jmp *%cs:paravirt_ops+PARAVIRT_iret) 624 jmp *%cs:paravirt_ops+PARAVIRT_iret)
625 625
626#define DISABLE_INTERRUPTS(clobbers) \ 626#define DISABLE_INTERRUPTS(clobbers) \
627 PARA_SITE(PARA_PATCH(PARAVIRT_irq_disable), clobbers, \ 627 PARA_SITE(PARA_PATCH(PARAVIRT_irq_disable), clobbers, \
628 pushl %ecx; pushl %edx; \ 628 pushl %eax; pushl %ecx; pushl %edx; \
629 call *%cs:paravirt_ops+PARAVIRT_irq_disable; \ 629 call *%cs:paravirt_ops+PARAVIRT_irq_disable; \
630 popl %edx; popl %ecx) \ 630 popl %edx; popl %ecx; popl %eax) \
631 631
632#define ENABLE_INTERRUPTS(clobbers) \ 632#define ENABLE_INTERRUPTS(clobbers) \
633 PARA_SITE(PARA_PATCH(PARAVIRT_irq_enable), clobbers, \ 633 PARA_SITE(PARA_PATCH(PARAVIRT_irq_enable), clobbers, \
634 pushl %ecx; pushl %edx; \ 634 pushl %eax; pushl %ecx; pushl %edx; \
635 call *%cs:paravirt_ops+PARAVIRT_irq_enable; \ 635 call *%cs:paravirt_ops+PARAVIRT_irq_enable; \
636 popl %edx; popl %ecx) 636 popl %edx; popl %ecx; popl %eax)
637 637
638#define ENABLE_INTERRUPTS_SYSEXIT \ 638#define ENABLE_INTERRUPTS_SYSEXIT \
639 PARA_SITE(PARA_PATCH(PARAVIRT_irq_enable_sysexit), CLBR_ANY, \ 639 PARA_SITE(PARA_PATCH(PARAVIRT_irq_enable_sysexit), CLBR_NONE, \
640 jmp *%cs:paravirt_ops+PARAVIRT_irq_enable_sysexit) 640 jmp *%cs:paravirt_ops+PARAVIRT_irq_enable_sysexit)
641 641
642#define GET_CR0_INTO_EAX \ 642#define GET_CR0_INTO_EAX \
643 call *paravirt_ops+PARAVIRT_read_cr0 643 push %ecx; push %edx; \
644 call *paravirt_ops+PARAVIRT_read_cr0; \
645 pop %edx; pop %ecx
644 646
645#endif /* __ASSEMBLY__ */ 647#endif /* __ASSEMBLY__ */
646#endif /* CONFIG_PARAVIRT */ 648#endif /* CONFIG_PARAVIRT */