VirtualBox

Changeset 10683 in vbox


Ignore:
Timestamp:
Jul 16, 2008 7:45:39 AM (16 years ago)
Author:
vboxsync
Message:

Backed out 33399; must save the host context on entry due to long jumps to ring 3.

Location:
trunk/src/VBox/VMM/VMMR0
Files:
2 edited

Legend:

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

    r10682 r10683  
    6565    DECLR0CALLBACKMEMBER(int, pfnEnterSession,(PVM pVM, PHWACCM_CPUINFO pCpu));
    6666    DECLR0CALLBACKMEMBER(int, pfnLeaveSession,(PVM pVM));
     67    DECLR0CALLBACKMEMBER(int, pfnSaveHostState,(PVM pVM));
    6768    DECLR0CALLBACKMEMBER(int, pfnLoadGuestState,(PVM pVM, CPUMCTX *pCtx));
    6869    DECLR0CALLBACKMEMBER(int, pfnRunGuestCode,(PVM pVM, CPUMCTX *pCtx));
     
    145146    HWACCMR0Globals.pfnEnterSession     = HWACCMR0DummyEnter;
    146147    HWACCMR0Globals.pfnLeaveSession     = HWACCMR0DummyLeave;
     148    HWACCMR0Globals.pfnSaveHostState    = HWACCMR0DummySaveHostState;
    147149    HWACCMR0Globals.pfnLoadGuestState   = HWACCMR0DummyLoadGuestState;
    148150    HWACCMR0Globals.pfnRunGuestCode     = HWACCMR0DummyRunGuestCode;
     
    341343        HWACCMR0Globals.pfnEnterSession     = VMXR0Enter;
    342344        HWACCMR0Globals.pfnLeaveSession     = VMXR0Leave;
     345        HWACCMR0Globals.pfnSaveHostState    = VMXR0SaveHostState;
    343346        HWACCMR0Globals.pfnLoadGuestState   = VMXR0LoadGuestState;
    344347        HWACCMR0Globals.pfnRunGuestCode     = VMXR0RunGuestCode;
     
    354357        HWACCMR0Globals.pfnEnterSession     = SVMR0Enter;
    355358        HWACCMR0Globals.pfnLeaveSession     = SVMR0Leave;
     359        HWACCMR0Globals.pfnSaveHostState    = SVMR0SaveHostState;
    356360        HWACCMR0Globals.pfnLoadGuestState   = SVMR0LoadGuestState;
    357361        HWACCMR0Globals.pfnRunGuestCode     = SVMR0RunGuestCode;
     
    738742
    739743    rc  = HWACCMR0Globals.pfnEnterSession(pVM, &HWACCMR0Globals.aCpuInfo[idCpu]);
     744    AssertRC(rc);
     745    /* We must save the host context here (VT-x) as we might be rescheduled on a different cpu after a long jump back to ring 3. */
     746    rc |= HWACCMR0Globals.pfnSaveHostState(pVM);
    740747    AssertRC(rc);
    741748    rc |= HWACCMR0Globals.pfnLoadGuestState(pVM, pCtx);
  • trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp

    r10682 r10683  
    508508
    509509/**
     510 * Save the host state
     511 *
     512 * @returns VBox status code.
     513 * @param   pVM         The VM to operate on.
     514 */
     515HWACCMR0DECL(int) SVMR0SaveHostState(PVM pVM)
     516{
     517    /* Nothing to do here. */
     518    return VINF_SUCCESS;
     519}
     520
     521/**
    510522 * Loads the guest state
    511523 *
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