debuggers.hg

diff xen/arch/x86/x86_32/entry.S @ 3633:a5f1a6abfc46

bitkeeper revision 1.1159.223.54 (41ff4a05JwUWXLAjyzybyxNxCOE3yw)

Defer NMI that cannot be handled, instead of dropping it completely.
author kaf24@scramble.cl.cam.ac.uk
date Tue Feb 01 09:21:09 2005 +0000 (2005-02-01)
parents a3b623535680
children 578b6c14e635 fb875591fd72
line diff
     1.1 --- a/xen/arch/x86/x86_32/entry.S	Sat Jan 29 22:20:09 2005 +0000
     1.2 +++ b/xen/arch/x86/x86_32/entry.S	Tue Feb 01 09:21:09 2005 +0000
     1.3 @@ -57,6 +57,7 @@
     1.4  #include <xen/errno.h>
     1.5  #include <xen/softirq.h>
     1.6  #include <asm/asm_defns.h>
     1.7 +#include <asm/apicdef.h>
     1.8  #include <public/xen.h>
     1.9  
    1.10  #define GET_CURRENT(reg)   \
    1.11 @@ -497,10 +498,10 @@ ENTRY(nmi)
    1.12          jnz   do_watchdog_tick
    1.13          movl  %ds,%eax
    1.14          cmpw  $(__HYPERVISOR_DS),%ax
    1.15 -        jne   restore_all_xen
    1.16 +        jne   defer_nmi
    1.17          movl  %es,%eax
    1.18          cmpw  $(__HYPERVISOR_DS),%ax
    1.19 -        jne   restore_all_xen
    1.20 +        jne   defer_nmi
    1.21  
    1.22  do_watchdog_tick:
    1.23          movl  $(__HYPERVISOR_DS),%edx
    1.24 @@ -518,6 +519,17 @@ do_watchdog_tick:
    1.25          GET_CURRENT(%ebx)
    1.26          jmp   restore_all_guest
    1.27  
    1.28 +defer_nmi:
    1.29 +        movl  $FIXMAP_apic_base,%eax
    1.30 +        # apic_wait_icr_idle()
    1.31 +1:      movl  APIC_ICR(%eax),%ebx
    1.32 +        testl $APIC_ICR_BUSY,%ebx
    1.33 +        jnz   1b
    1.34 +        # __send_IPI_shortcut(APIC_DEST_SELF, TRAP_deferred_nmi)
    1.35 +        movl  $(APIC_DM_FIXED | APIC_DEST_SELF | APIC_DEST_LOGICAL | \
    1.36 +                TRAP_deferred_nmi),APIC_ICR(%eax)
    1.37 +        jmp   restore_all_xen
    1.38 +
    1.39  nmi_parity_err:
    1.40          # Clear and disable the parity-error line
    1.41          andb $0xf,%al