Changeset 48140 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Aug 29, 2013 9:39:53 AM (11 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r48135 r48140 2926 2926 ASMSetFlags(pSvmTransient->uEflags); /* Enable interrupts. */ 2927 2927 2928 VMMRZCallRing3SetNotification(pVCpu, hmR0SvmCallRing3Callback, pMixedCtx);2929 2928 VMMRZCallRing3Enable(pVCpu); /* It is now safe to do longjmps to ring-3!!! */ 2930 2929 … … 2975 2974 Assert(VMMRZCallRing3IsEnabled(pVCpu)); 2976 2975 HMSVM_ASSERT_PREEMPT_SAFE(); 2976 VMMRZCallRing3SetNotification(pVCpu, hmR0SvmCallRing3Callback, pCtx); 2977 2977 2978 2978 SVMTRANSIENT SvmTransient; … … 2999 2999 */ 3000 3000 VMMRZCallRing3Disable(pVCpu); 3001 VMMRZCallRing3RemoveNotification(pVCpu);3002 3001 hmR0SvmPreRunGuestCommitted(pVM, pVCpu, pCtx, &SvmTransient); 3003 3002 … … 3016 3015 STAM_PROFILE_ADV_STOP(&pVCpu->hm.s.StatExit1, x); 3017 3016 hmR0SvmReportWorldSwitchError(pVM, pVCpu, rc, pCtx); 3018 return rc;3017 break; 3019 3018 } 3020 3019 … … 3039 3038 else if (rc == VINF_EM_RESET) 3040 3039 rc = VINF_EM_TRIPLE_FAULT; 3040 3041 3041 hmR0SvmExitToRing3(pVM, pVCpu, pCtx, rc); 3042 VMMRZCallRing3RemoveNotification(pVCpu); 3042 3043 return rc; 3043 3044 } -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r48135 r48140 6091 6091 Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD)); 6092 6092 Assert(!VMMRZCallRing3IsEnabled(pVCpu)); 6093 Assert(VMMR0IsLogFlushDisabled(pVCpu));6094 6093 6095 6094 RTCPUID idCpu = RTMpCpuId(); … … 6123 6122 6124 6123 /* Restore host-state bits that VT-x only restores partially. */ 6125 if (pVCpu->hm.s.vmx.fRestoreHostFlags) 6124 if ( (pVCpu->hm.s.vmx.fRestoreHostFlags & VMX_RESTORE_HOST_REQUIRED) 6125 && (pVCpu->hm.s.vmx.fRestoreHostFlags & ~VMX_RESTORE_HOST_REQUIRED)) 6126 6126 { 6127 6127 Log4Func(("Restoring Host State: fRestoreHostFlags=%#RX32 HostCpuId=%u\n", pVCpu->hm.s.vmx.fRestoreHostFlags, idCpu)); … … 7526 7526 /** @todo Find a way to fix hardcoding a guestimate. */ 7527 7527 TMCpuTickSetLastSeen(pVCpu, ASMReadTSC() 7528 + pVCpu->hm.s.vmx.u64TSCOffset - 0x400 /* guestimate of world switch overhead in clock ticks */);7528 + pVCpu->hm.s.vmx.u64TSCOffset - 0x400 /* guestimate of world switch overhead in clock ticks */); 7529 7529 } 7530 7530 … … 7534 7534 VMCPU_SET_STATE(pVCpu, VMCPUSTATE_STARTED_HM); 7535 7535 7536 pVCpu->hm.s.vmx.fRestoreHostFlags |= VMX_RESTORE_HOST_REQUIRED; /* Host state messed up by VT-x, we must restore. */ 7536 7537 pVCpu->hm.s.vmx.uVmcsState |= HMVMX_VMCS_STATE_LAUNCHED; /* Use VMRESUME instead of VMLAUNCH in the next run. */ 7537 7538 ASMSetFlags(pVmxTransient->uEflags); /* Enable interrupts. */ 7538 7539 VMMRZCallRing3SetNotification(pVCpu, hmR0VmxCallRing3Callback, pMixedCtx);7540 7539 VMMRZCallRing3Enable(pVCpu); /* It is now safe to do longjmps to ring-3!!! */ 7541 7540 … … 7617 7616 */ 7618 7617 VMMRZCallRing3Disable(pVCpu); 7619 VMMRZCallRing3RemoveNotification(pVCpu);7620 7618 hmR0VmxPreRunGuestCommitted(pVM, pVCpu, pCtx, &VmxTransient); 7621 7619 … … 7698 7696 */ 7699 7697 VMMRZCallRing3Disable(pVCpu); 7700 VMMRZCallRing3RemoveNotification(pVCpu);7701 7698 hmR0VmxPreRunGuestCommitted(pVM, pVCpu, pCtx, &VmxTransient); 7702 7699 … … 7770 7767 { 7771 7768 Assert(VMMRZCallRing3IsEnabled(pVCpu)); 7769 Assert(pVCpu->hm.s.vmx.fUpdatedGuestState == HMVMX_UPDATED_GUEST_ALL); 7772 7770 HMVMX_ASSERT_PREEMPT_SAFE(); 7771 7772 VMMRZCallRing3SetNotification(pVCpu, hmR0VmxCallRing3Callback, pCtx); 7773 7773 7774 7774 int rc; … … 7782 7782 else if (rc == VINF_EM_RESET) 7783 7783 rc = VINF_EM_TRIPLE_FAULT; 7784 7784 7785 hmR0VmxExitToRing3(pVM, pVCpu, pCtx, rc); 7786 VMMRZCallRing3RemoveNotification(pVCpu); 7785 7787 return rc; 7786 7788 }
Note:
See TracChangeset
for help on using the changeset viewer.