Changeset 54712 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Mar 11, 2015 12:54:03 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 98876
- Location:
- trunk/src/VBox/VMM/VMMR0
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMR0.cpp
r54600 r54712 1427 1427 /* Clear it while leaving HM context, hmPokeCpuForTlbFlush() relies on this. */ 1428 1428 pVCpu->hm.s.idEnteredCpu = NIL_RTCPUID; 1429 1430 /* Clear the VCPU <-> host CPU mapping as we've left HM context (for the preemption hook case). */1431 ASMAtomicWriteU32(&pVCpu->idHostCpu, NIL_RTCPUID);1432 1429 1433 1430 return VINF_SUCCESS; -
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r54308 r54712 2097 2097 2098 2098 /* Deregister hook now that we've left HM context before re-enabling preemption. */ 2099 if (VMMR0ThreadCtxHooksAreRegistered(pVCpu)) 2100 VMMR0ThreadCtxHooksDeregister(pVCpu); 2099 VMMR0ThreadCtxHooksDeregister(pVCpu); 2101 2100 2102 2101 /* Leave HM context. This takes care of local init (term). */ … … 2154 2153 CPUMR0DebugStateMaybeSaveGuestAndRestoreHost(pVCpu, false /* save DR6 */); 2155 2154 2156 /* Deregister hook now that we've left HM context before re-enabling preemption. */ 2157 if (VMMR0ThreadCtxHooksAreRegistered(pVCpu)) 2158 VMMR0ThreadCtxHooksDeregister(pVCpu); 2155 /* Deregister the hook now that we've left HM context before re-enabling preemption. */ 2156 VMMR0ThreadCtxHooksDeregister(pVCpu); 2159 2157 2160 2158 /* Leave HM context. This takes care of local init (term). */ -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r54650 r54712 7108 7108 7109 7109 /* Deregister hook now that we've left HM context before re-enabling preemption. */ 7110 /** @todo This is bad.Deregistering here means we need to VMCLEAR always7110 /** @todo Deregistering here means we need to VMCLEAR always 7111 7111 * (longjmp/exit-to-r3) in VT-x which is not efficient. */ 7112 if (VMMR0ThreadCtxHooksAreRegistered(pVCpu)) 7113 VMMR0ThreadCtxHooksDeregister(pVCpu); 7112 VMMR0ThreadCtxHooksDeregister(pVCpu); 7114 7113 7115 7114 /* Leave HM context. This takes care of local init (term). */ … … 7278 7277 } 7279 7278 7280 if (VMMR0ThreadCtxHooksAreRegistered(pVCpu)) 7281 VMMR0ThreadCtxHooksDeregister(pVCpu); 7279 VMMR0ThreadCtxHooksDeregister(pVCpu); 7282 7280 7283 7281 HMR0LeaveCpu(pVCpu); -
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r54552 r54712 510 510 VMMR0DECL(int) VMMR0ThreadCtxHooksDeregister(PVMCPU pVCpu) 511 511 { 512 return RTThreadCtxHooksDeregister(pVCpu->vmm.s.hR0ThreadCtx); 512 if (pVCpu->vmm.s.hR0ThreadCtx != NIL_RTTHREADCTX) 513 { 514 Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD)); 515 int rc = RTThreadCtxHooksDeregister(pVCpu->vmm.s.hR0ThreadCtx); 516 AssertRCReturn(rc, rc); 517 } 518 519 /* Clear the VCPU <-> host CPU mapping as we've left HM context. See @bugref{7726} comment #19. */ 520 ASMAtomicWriteU32(&pVCpu->idHostCpu, NIL_RTCPUID); 521 return VINF_SUCCESS; 513 522 } 514 523
Note:
See TracChangeset
for help on using the changeset viewer.