VirtualBox

Changeset 48135 in vbox


Ignore:
Timestamp:
Aug 28, 2013 6:04:49 PM (11 years ago)
Author:
vboxsync
Message:

VMM/HM: Eliminate dead code paths.

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

Legend:

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

    r48132 r48135  
    8787     * @{ */
    8888    DECLR0CALLBACKMEMBER(int,  pfnEnterSession,(PVM pVM, PVMCPU pVCpu, PHMGLOBALCPUINFO pCpu));
    89     DECLR0CALLBACKMEMBER(int,  pfnLeaveSession,(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx));
    9089    DECLR0CALLBACKMEMBER(void, pfnThreadCtxCallback,(RTTHREADCTXEVENT enmEvent, PVMCPU pVCpu, bool fGlobalInit));
    9190    DECLR0CALLBACKMEMBER(int,  pfnSaveHostState,(PVM pVM, PVMCPU pVCpu));
     
    528527                 */
    529528                g_HvmR0.pfnEnterSession      = VMXR0Enter;
    530                 g_HvmR0.pfnLeaveSession      = VMXR0Leave;
    531529                g_HvmR0.pfnThreadCtxCallback = VMXR0ThreadCtxCallback;
    532530                g_HvmR0.pfnSaveHostState     = VMXR0SaveHostState;
     
    594592         */
    595593        g_HvmR0.pfnEnterSession      = SVMR0Enter;
    596         g_HvmR0.pfnLeaveSession      = SVMR0Leave;
    597594        g_HvmR0.pfnThreadCtxCallback = SVMR0ThreadCtxCallback;
    598595        g_HvmR0.pfnSaveHostState     = SVMR0SaveHostState;
     
    659656    /* Fill in all callbacks with placeholders. */
    660657    g_HvmR0.pfnEnterSession      = hmR0DummyEnter;
    661     g_HvmR0.pfnLeaveSession      = hmR0DummyLeave;
    662658    g_HvmR0.pfnThreadCtxCallback = hmR0DummyThreadCtxCallback;
    663659    g_HvmR0.pfnSaveHostState     = hmR0DummySaveHostState;
     
    15171513    ASMAtomicWriteU32(&pVCpu->idHostCpu, NIL_RTCPUID);
    15181514
    1519     return VINF_SUCCESS;
    1520 }
    1521 
    1522 
    1523 /**
    1524  * Leaves the VT-x or AMD-V session.
    1525  *
    1526  * @returns VBox status code.
    1527  * @param   pVM        Pointer to the VM.
    1528  * @param   pVCpu      Pointer to the VMCPU.
    1529  *
    1530  * @remarks Called with preemption disabled just like HMR0Enter, our
    1531  *          counterpart.
    1532  */
    1533 VMMR0_INT_DECL(int) HMR0Leave(PVM pVM, PVMCPU pVCpu)
    1534 {
    1535     /* Nothing to do currently. Taken care of HMR0LeaveCpu() and in hmR0VmxLeaveSession() and hmR0SvmLeaveSession(). */
    1536     /** @todo refactor later to more common code. */
    15371515    return VINF_SUCCESS;
    15381516}
  • trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp

    r48134 r48135  
    15721572
    15731573/**
    1574  * Leaves the AMD-V session.
    1575  *
    1576  * @returns VBox status code.
    1577  * @param   pVM         Pointer to the VM.
    1578  * @param   pVCpu       Pointer to the VMCPU.
    1579  * @param   pCtx        Pointer to the guest-CPU context.
    1580  */
    1581 VMMR0DECL(int) SVMR0Leave(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx)
    1582 {
    1583     NOREF(pVM);
    1584     NOREF(pVCpu);
    1585     NOREF(pCtx);
    1586 
    1587     /* Nothing to do here. Everything is taken care of in hmR0SvmLeave(). */
    1588     return VINF_SUCCESS;
    1589 }
    1590 
    1591 
    1592 /**
    15931574 * Thread-context callback for AMD-V.
    15941575 *
     
    19451926
    19461927
     1928/**
     1929 * Leaves the AMD-V session.
     1930 *
     1931 * @returns VBox status code.
     1932 * @param   pVM         Pointer to the VM.
     1933 * @param   pVCpu       Pointer to the VMCPU.
     1934 * @param   pCtx        Pointer to the guest-CPU context.
     1935 */
    19471936DECLINLINE(void) hmR0SvmLeaveSession(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx)
    19481937{
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r48132 r48135  
    61586158
    61596159
     6160/**
     6161 * Leaves the VT-x session.
     6162 *
     6163 * @param   pVM         Pointer to the VM.
     6164 * @param   pVCpu       Pointer to the VMCPU.
     6165 * @param   pMixedCtx   Pointer to the guest-CPU context. The data may be
     6166 *                      out-of-sync. Make sure to update the required fields
     6167 *                      before using them.
     6168 *
     6169 * @remarks No-long-jmp zone!!!
     6170 */
    61606171DECLINLINE(void) hmR0VmxLeaveSession(PVM pVM, PVMCPU pVCpu, PCPUMCTX pMixedCtx)
    61616172{
     
    69937004            break;
    69947005    }
    6995 }
    6996 
    6997 
    6998 /**
    6999  * Leaves the VT-x session.
    7000  *
    7001  * @returns VBox status code.
    7002  * @param   pVM         Pointer to the VM.
    7003  * @param   pVCpu       Pointer to the VMCPU.
    7004  * @param   pCtx        Pointer to the guest-CPU context.
    7005  */
    7006 VMMR0DECL(int) VMXR0Leave(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx)
    7007 {
    7008     NOREF(pVCpu);
    7009     NOREF(pVM);
    7010     NOREF(pCtx);
    7011 
    7012     /* Everything is taken care of in hmR0VmxLeave() and VMXR0ThreadCtxCallback()'s preempt event. */
    7013     return VINF_SUCCESS;
    70147006}
    70157007
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r48132 r48135  
    939939                    rc = vmmR0CallRing3SetJmp(&pVCpu->vmm.s.CallRing3JmpBufR0, HMR0RunGuestCode, pVM, pVCpu);
    940940
    941                     /* Leave HM context. */
    942                     int rc2 = HMR0Leave(pVM, pVCpu);
    943                     AssertRC(rc2);
    944 
    945941                    if (RT_UNLIKELY(   VMCPU_GET_STATE(pVCpu) != VMCPUSTATE_STARTED_HM
    946942                                    && RT_SUCCESS_NP(rc)  && rc !=  VINF_VMM_CALL_HOST ))
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