Changeset 48394 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Sep 9, 2013 3:54:51 PM (11 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r48370 r48394 6087 6087 * 6088 6088 * @returns VBox status code. 6089 * @param pVM Pointer to the VM. 6090 * @param pVCpu Pointer to the VMCPU. 6091 * @param pMixedCtx Pointer to the guest-CPU context. The data may be 6092 * out-of-sync. Make sure to update the required fields 6093 * before using them. 6089 * @param pVM Pointer to the VM. 6090 * @param pVCpu Pointer to the VMCPU. 6091 * @param pMixedCtx Pointer to the guest-CPU context. The data may 6092 * be out-of-sync. Make sure to update the required 6093 * fields before using them. 6094 * @param fSaveGuestState Whether to save the guest state or not. 6094 6095 * 6095 6096 * @remarks No-long-jmp zone!!! 6096 6097 */ 6097 static int hmR0VmxLeave(PVM pVM, PVMCPU pVCpu, PCPUMCTX pMixedCtx )6098 static int hmR0VmxLeave(PVM pVM, PVMCPU pVCpu, PCPUMCTX pMixedCtx, bool fSaveGuestState) 6098 6099 { 6099 6100 Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD)); … … 6104 6105 6105 6106 /* Save the guest state if necessary. */ 6106 if (pVCpu->hm.s.vmx.fUpdatedGuestState != HMVMX_UPDATED_GUEST_ALL) 6107 if ( fSaveGuestState 6108 && pVCpu->hm.s.vmx.fUpdatedGuestState != HMVMX_UPDATED_GUEST_ALL) 6107 6109 { 6108 6110 int rc = hmR0VmxSaveGuestState(pVCpu, pMixedCtx); … … 6194 6196 if (!pVCpu->hm.s.fLeaveDone) 6195 6197 { 6196 int rc2 = hmR0VmxLeave(pVM, pVCpu, pMixedCtx );6198 int rc2 = hmR0VmxLeave(pVM, pVCpu, pMixedCtx, true /* fSaveGuestState */); 6197 6199 AssertRCReturn(rc2, rc2); 6198 6200 pVCpu->hm.s.fLeaveDone = true; … … 7011 7013 Log4Func(("Preempting: HostCpuId=%u\n", RTMpCpuId())); 7012 7014 7013 /* Save the guest-state, restore host-state (FPU, debug etc.). */ 7015 /* 7016 * Restore host-state (FPU, debug etc.) 7017 */ 7014 7018 if (!pVCpu->hm.s.fLeaveDone) 7015 7019 { 7016 hmR0VmxLeave(pVM, pVCpu, pMixedCtx); 7020 /* Do -not- save guest-state here as we might already be in the middle of saving it (esp. bad if we are 7021 holding the PGM lock while saving the guest state (see hmR0VmxSaveGuestControlRegs()). */ 7022 hmR0VmxLeave(pVM, pVCpu, pMixedCtx, false /* fSaveGuestState */); 7017 7023 pVCpu->hm.s.fLeaveDone = true; 7018 7024 } -
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r48391 r48394 450 450 VMCPU_ASSERT_EMT(pVCpu); 451 451 Assert(pVCpu->vmm.s.hR0ThreadCtx == NIL_RTTHREADCTX); 452 #if 0 /* Not stable. */452 #if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) 453 453 int rc = RTThreadCtxHooksCreate(&pVCpu->vmm.s.hR0ThreadCtx); 454 454 if ( RT_FAILURE(rc)
Note:
See TracChangeset
for help on using the changeset viewer.