VirtualBox

Changeset 848 in vbox for trunk/src


Ignore:
Timestamp:
Feb 12, 2007 4:01:52 PM (18 years ago)
Author:
vboxsync
Message:

AMD64 debugging: Added checks for NMIs and that IF is cleared when doing the context switching.

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMGC/TRPMGCHandlersA.asm

    r19 r848  
    885885    mov     edx, IMP(g_VM)
    886886    mov     eax, VINF_EM_RAW_INTERRUPT_HYPER
     887%if HC_ARCH_BITS == 64 ; bird debugging tripple-fault/reboot on AMD64, should be removed later!
     888    test    dword [esp + CPUMCTXCORE.eflags], X86_EFL_IF
     889    jnz     .if_set
     890    mov     eax, 0c0caff00h
     891    mov     al, [esp + 0h + ESPOFF]
     892.if_set:
     893%endif
    887894    call    [edx + VM.pfnVMMGCGuestToHostAsm]
    888895%ifdef DEBUG_STUFF_INT
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r672 r848  
    443443                 */
    444444                default:
     445#if HC_ARCH_BITS == 64 /* AMD64 debugging - to be removed */
     446                    if ((unsigned)rc - 0xc0caff00U > 0xff)
     447                        return rc;
     448                    /* fall thru */
     449#else
    445450                    return rc;
     451#endif
    446452
    447453                /*
  • trunk/src/VBox/VMM/VMMSwitcher/AMD64ToPAE.asm

    r464 r848  
    2121
    2222;%define DEBUG_STUFF 1
     23%define STRICT_IF 1
    2324
    2425;*******************************************************************************
     
    6667    COM64_S_NEWLINE
    6768    COM64_S_CHAR '^'
     69%endif
     70
     71%ifdef STRICT_IF
     72    pushf
     73    pop     rax
     74    test    eax, X86_EFL_IF
     75    jz      .if_clear_in
     76    mov     eax, 0c0ffee00h
     77    ret
     78.if_clear_in:
    6879%endif
    6980
     
    707718    ; special registers which may change.
    708719vmmGCGuestToHostAsm_SkipHyperRegs:
     720%ifdef STRICT_IF
     721    pushf
     722    pop     ecx
     723    test    ecx, X86_EFL_IF
     724    jz      .if_clear_out
     725    mov     eax, 0c0ffee01h
     726    cli
     727.if_clear_out:
     728%endif
    709729    ; str     [edx + CPUM.Hyper.tr] - double fault only, and it won't be right then either.
    710730    sldt    [edx + CPUM.Hyper.ldtr]
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette