Changeset 48135 in vbox
- Timestamp:
- Aug 28, 2013 6:04:49 PM (11 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR0
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMR0.cpp
r48132 r48135 87 87 * @{ */ 88 88 DECLR0CALLBACKMEMBER(int, pfnEnterSession,(PVM pVM, PVMCPU pVCpu, PHMGLOBALCPUINFO pCpu)); 89 DECLR0CALLBACKMEMBER(int, pfnLeaveSession,(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx));90 89 DECLR0CALLBACKMEMBER(void, pfnThreadCtxCallback,(RTTHREADCTXEVENT enmEvent, PVMCPU pVCpu, bool fGlobalInit)); 91 90 DECLR0CALLBACKMEMBER(int, pfnSaveHostState,(PVM pVM, PVMCPU pVCpu)); … … 528 527 */ 529 528 g_HvmR0.pfnEnterSession = VMXR0Enter; 530 g_HvmR0.pfnLeaveSession = VMXR0Leave;531 529 g_HvmR0.pfnThreadCtxCallback = VMXR0ThreadCtxCallback; 532 530 g_HvmR0.pfnSaveHostState = VMXR0SaveHostState; … … 594 592 */ 595 593 g_HvmR0.pfnEnterSession = SVMR0Enter; 596 g_HvmR0.pfnLeaveSession = SVMR0Leave;597 594 g_HvmR0.pfnThreadCtxCallback = SVMR0ThreadCtxCallback; 598 595 g_HvmR0.pfnSaveHostState = SVMR0SaveHostState; … … 659 656 /* Fill in all callbacks with placeholders. */ 660 657 g_HvmR0.pfnEnterSession = hmR0DummyEnter; 661 g_HvmR0.pfnLeaveSession = hmR0DummyLeave;662 658 g_HvmR0.pfnThreadCtxCallback = hmR0DummyThreadCtxCallback; 663 659 g_HvmR0.pfnSaveHostState = hmR0DummySaveHostState; … … 1517 1513 ASMAtomicWriteU32(&pVCpu->idHostCpu, NIL_RTCPUID); 1518 1514 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, our1531 * 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. */1537 1515 return VINF_SUCCESS; 1538 1516 } -
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r48134 r48135 1572 1572 1573 1573 /** 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 /**1593 1574 * Thread-context callback for AMD-V. 1594 1575 * … … 1945 1926 1946 1927 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 */ 1947 1936 DECLINLINE(void) hmR0SvmLeaveSession(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx) 1948 1937 { -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r48132 r48135 6158 6158 6159 6159 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 */ 6160 6171 DECLINLINE(void) hmR0VmxLeaveSession(PVM pVM, PVMCPU pVCpu, PCPUMCTX pMixedCtx) 6161 6172 { … … 6993 7004 break; 6994 7005 } 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;7014 7006 } 7015 7007 -
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r48132 r48135 939 939 rc = vmmR0CallRing3SetJmp(&pVCpu->vmm.s.CallRing3JmpBufR0, HMR0RunGuestCode, pVM, pVCpu); 940 940 941 /* Leave HM context. */942 int rc2 = HMR0Leave(pVM, pVCpu);943 AssertRC(rc2);944 945 941 if (RT_UNLIKELY( VMCPU_GET_STATE(pVCpu) != VMCPUSTATE_STARTED_HM 946 942 && RT_SUCCESS_NP(rc) && rc != VINF_VMM_CALL_HOST ))
Note:
See TracChangeset
for help on using the changeset viewer.