Changeset 48227 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Sep 2, 2013 11:54:23 AM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 88620
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r48218 r48227 301 301 * @param pvCpuPage Pointer to the global CPU page. 302 302 * @param HCPhysCpuPage Physical address of the global CPU page. 303 * @param fEnabledByHost Whether the host OS has already initialized AMD-V. 303 304 * @param pvArg Unused on AMD-V. 304 305 */ … … 311 312 AssertReturn(pvCpuPage, VERR_INVALID_PARAMETER); 312 313 NOREF(pvArg); 314 NOREF(fEnabledByHost); 313 315 314 316 /* … … 1587 1589 1588 1590 LogFlowFunc(("pVM=%p pVCpu=%p\n", pVM, pVCpu)); 1591 Assert(pVCpu->hm.s.fContextUseFlags & (HM_CHANGED_HOST_CONTEXT | HM_CHANGED_HOST_GUEST_SHARED_STATE)); 1589 1592 1590 1593 pVCpu->hm.s.fLeaveDone = false; … … 2091 2094 } 2092 2095 2093 /* On our way back from ring-3 the following needs to be done. */ 2094 /** @todo This can change with preemption hooks. */ 2095 if (rcExit == VINF_EM_RAW_INTERRUPT) 2096 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_HOST_CONTEXT; 2097 else 2098 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_HOST_CONTEXT | HM_CHANGED_ALL_GUEST; 2096 /* On our way back from ring-3 reload the guest state if there is a possibility of it being changed. */ 2097 if (rcExit != VINF_EM_RAW_INTERRUPT) 2098 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_ALL_GUEST; 2099 2099 2100 2100 STAM_COUNTER_INC(&pVCpu->hm.s.StatSwitchExitToR3); 2101 2102 /* We do -not- want any longjmp notifications after this! We must return to ring-3 ASAP. */ 2103 VMMRZCallRing3RemoveNotification(pVCpu); 2101 2104 VMMRZCallRing3Enable(pVCpu); 2102 2105 } … … 3066 3069 3067 3070 hmR0SvmExitToRing3(pVM, pVCpu, pCtx, rc); 3068 VMMRZCallRing3RemoveNotification(pVCpu);3071 Assert(!VMMRZCallRing3IsNotificationSet(pVCpu)); 3069 3072 return rc; 3070 3073 } -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r48220 r48227 1018 1018 Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD)); 1019 1019 1020 /* Enable VT-x if it's not already enabled by the host. */ 1020 1021 if (!fEnabledByHost) 1021 1022 { … … 6177 6178 { 6178 6179 HM_DISABLE_PREEMPT_IF_NEEDED(); 6180 HMVMX_ASSERT_CPU_SAFE(); 6179 6181 Assert(!VMMRZCallRing3IsEnabled(pVCpu)); 6180 6182 Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD)); … … 6299 6301 * accessing APIC page in prot mode. */ 6300 6302 6301 /* On our way back from ring-3 the following needs to be done. */ 6302 if (rcExit == VINF_EM_RAW_INTERRUPT) 6303 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_HOST_CONTEXT; 6304 else 6305 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_HOST_CONTEXT | HM_CHANGED_ALL_GUEST; 6303 /* On our way back from ring-3 reload the guest state if there is a possibility of it being changed. */ 6304 if (rcExit != VINF_EM_RAW_INTERRUPT) 6305 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_ALL_GUEST; 6306 6306 6307 6307 STAM_COUNTER_INC(&pVCpu->hm.s.StatSwitchExitToR3); 6308 6309 /* We do -not- want any longjmp notifications after this! We must return to ring-3 ASAP. */ 6310 VMMRZCallRing3RemoveNotification(pVCpu); 6308 6311 VMMRZCallRing3Enable(pVCpu); 6309 6312 } … … 6902 6905 6903 6906 LogFlowFunc(("pVM=%p pVCpu=%p\n", pVM, pVCpu)); 6907 Assert(pVCpu->hm.s.fContextUseFlags & (HM_CHANGED_HOST_CONTEXT | HM_CHANGED_HOST_GUEST_SHARED_STATE)); 6904 6908 6905 6909 #ifdef VBOX_STRICT … … 7745 7749 7746 7750 hmR0VmxExitToRing3(pVM, pVCpu, pCtx, rc); 7747 VMMRZCallRing3RemoveNotification(pVCpu);7751 Assert(!VMMRZCallRing3IsNotificationSet(pVCpu)); 7748 7752 return rc; 7749 7753 } … … 8588 8592 Assert(pVCpu->CTX_SUFF(pVM)->hm.s.vmx.pRealModeTSS); 8589 8593 Assert(PDMVmmDevHeapIsEnabled(pVCpu->CTX_SUFF(pVM))); 8594 Assert(CPUMIsGuestInRealModeEx(pMixedCtx)); 8595 8590 8596 rc = hmR0VmxReadExitInstrLenVmcs(pVCpu, pVmxTransient); 8591 8597 rc |= hmR0VmxReadExitIntrErrorCodeVmcs(pVCpu, pVmxTransient); -
trunk/src/VBox/VMM/VMMRZ/VMMRZ.cpp
r45330 r48227 214 214 } 215 215 216 217 /** 218 * Checks whether there is a ring-0 callback notification active. 219 * 220 * @param pVCpu Pointer to the VMCPU. 221 * @returns true if there the notification is active, false otherwise. 222 */ 223 VMMRZDECL(bool) VMMRZCallRing3IsNotificationSet(PVMCPU pVCpu) 224 { 225 return !(pVCpu->vmm.s.pfnCallRing3CallbackR0 == NULL); 226 } 227
Note:
See TracChangeset
for help on using the changeset viewer.