i386: Simplify failsafe callback handling.

Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
kfraser@localhost.localdomain committed 2007-06-21 21:36:26 +01:00
1 parent d127010888
commit e5417ae6f9
2 files changed
+15 -20

No files matched your search

+3 -11
View File
@@ -99,17 +99,9 @@ restore_all_guest:
.Lrestore_iret_guest:
.Lft5: iret
.section .fixup,"ax"
.Lfx1: subl $28,%esp
pushl 28(%esp) # error_code/entry_vector
movl %eax,UREGS_eax+4(%esp)
movl %ebp,UREGS_ebp+4(%esp)
movl %edi,UREGS_edi+4(%esp)
movl %esi,UREGS_esi+4(%esp)
movl %edx,UREGS_edx+4(%esp)
movl %ecx,UREGS_ecx+4(%esp)
movl %ebx,UREGS_ebx+4(%esp)
sti
popl %esi
.Lfx1: sti
SAVE_ALL_GPRS
mov UREGS_error_code(%esp),%esi
pushfl # EFLAGS
movl $__HYPERVISOR_CS,%eax
pushl %eax # CS
+12 -9
View File
@@ -26,6 +26,17 @@
#define ASSERT_INTERRUPTS_ENABLED ASSERT_INTERRUPT_STATUS(nz)
#define ASSERT_INTERRUPTS_DISABLED ASSERT_INTERRUPT_STATUS(z)
#define SAVE_ALL_GPRS \
cld; \
pushl %eax; \
pushl %ebp; \
SETUP_EXCEPTION_FRAME_POINTER; \
pushl %edi; \
pushl %esi; \
pushl %edx; \
pushl %ecx; \
pushl %ebx
/*
* Saves all register state into an exception/interrupt stack frame.
* Returns to the caller at <xen_lbl> if the interrupted context is within
@@ -36,15 +47,7 @@
* the caller is reponsible for validity of %ds/%es.
*/
#define SAVE_ALL(xen_lbl, vm86_lbl) \
cld; \
pushl %eax; \
pushl %ebp; \
SETUP_EXCEPTION_FRAME_POINTER; \
pushl %edi; \
pushl %esi; \
pushl %edx; \
pushl %ecx; \
pushl %ebx; \
SAVE_ALL_GPRS; \
testl $(X86_EFLAGS_VM),UREGS_eflags(%esp); \
mov %ds,%edi; \
mov %es,%esi; \
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.