VirtualBox

Changeset 14499 in vbox


Ignore:
Timestamp:
Nov 24, 2008 1:48:34 AM (16 years ago)
Author:
vboxsync
Message:

VMM: Don't try use the invalid pvSavedStack pointer on darwin, set it to NULL instead. (assertions on EMT would cause corruption or crash)

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMM.cpp

    r14299 r14499  
    230230    if (RT_SUCCESS(rc))
    231231    {
    232         pVM->vmm.s.CallHostR0JmpBuf.pvSavedStack = MMHyperR3ToR0(pVM, pVM->vmm.s.pbEMTStackR3);
     232#ifdef VBOX_WITH_2X_4GB_ADDR_SPACE
     233        /* MMHyperR3ToR0 returns R3 when not doing hardware assisted virtualization. */
     234        if (!HWACCMIsEnabled(pVM))
     235            pVM->vmm.s.CallHostR0JmpBuf.pvSavedStack = NIL_RTR0PTR;
     236        else
     237#endif
     238            pVM->vmm.s.CallHostR0JmpBuf.pvSavedStack = MMHyperR3ToR0(pVM, pVM->vmm.s.pbEMTStackR3);
    233239        pVM->vmm.s.pbEMTStackRC = MMHyperR3ToRC(pVM, pVM->vmm.s.pbEMTStackR3);
    234240        pVM->vmm.s.pbEMTStackBottomRC = pVM->vmm.s.pbEMTStackRC + VMM_STACK_SIZE;
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r14114 r14499  
    5555*   Internal Functions                                                         *
    5656*******************************************************************************/
    57 static int VMMR0Init(PVM pVM, uint32_t uSvnRev);
    58 static int VMMR0Term(PVM pVM);
    5957__BEGIN_DECLS
    6058VMMR0DECL(int) ModuleInit(void);
  • trunk/src/VBox/VMM/VMMR0/VMMR0A.asm

    r13872 r14499  
    305305    ;
    306306    mov     edi, [edx + VMMR0JMPBUF.pvSavedStack]
     307    cmp     edi, 0                      ; darwin may set this to 0.
     308    je      .nok
    307309    mov     [edx + VMMR0JMPBUF.SpResume], esp
    308310    mov     esi, esp
     
    383385    ;
    384386    mov     rdi, [rdx + VMMR0JMPBUF.pvSavedStack]
     387    cmp     rdi, 0                      ; darwin may set this to 0.
     388    je      .nok
    385389    mov     [rdx + VMMR0JMPBUF.SpResume], rsp
    386390    mov     rsi, rsp
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