Changeset 47766 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Aug 15, 2013 1:23:31 PM (11 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r47760 r47766 1556 1556 LogFlowFunc(("pVM=%p pVCpu=%p\n", pVM, pVCpu)); 1557 1557 1558 /* Nothing to do here. */1558 pVCpu->hm.s.fLeaveDone = false; 1559 1559 return VINF_SUCCESS; 1560 1560 } … … 1576 1576 NOREF(pCtx); 1577 1577 1578 /* Nothing to do here. Everything is taken care of in hmR0SvmL ongJmpToRing3(). */1578 /* Nothing to do here. Everything is taken care of in hmR0SvmLeave(). */ 1579 1579 return VINF_SUCCESS; 1580 1580 } … … 1887 1887 Assert(VMMR0IsLogFlushDisabled(pVCpu)); 1888 1888 1889 /* Avoid repeating this work when thread-context hooks are used and we had been preempted before 1890 which would've done this work from the SVMR0ThreadCtxCallback(). */ 1891 RTTHREADPREEMPTSTATE PreemptState = RTTHREADPREEMPTSTATE_INITIALIZER; 1892 bool fPreemptDisabled = false; 1893 if (RTThreadPreemptIsEnabled(NIL_RTTHREAD)) 1894 { 1895 Assert(VMMR0ThreadCtxHooksAreRegistered(pVCpu)); 1896 RTThreadPreemptDisable(&PreemptState); 1897 fPreemptDisabled = true; 1898 if (pVCpu->hm.s.fLeaveDone) 1899 { 1900 RTThreadPreemptRestore(&PreemptState); 1901 return; 1902 } 1903 } 1904 1889 1905 /* Restore host FPU state if necessary and resync on next R0 reentry .*/ 1890 1906 if (CPUMIsGuestFPUStateActive(pVCpu)) … … 1912 1928 Assert(!CPUMIsGuestDebugStateActive(pVCpu)); 1913 1929 1914 1915 1930 STAM_PROFILE_ADV_SET_STOPPED(&pVCpu->hm.s.StatEntry); 1916 1931 STAM_PROFILE_ADV_SET_STOPPED(&pVCpu->hm.s.StatLoadGuestState); … … 1920 1935 1921 1936 VMCPU_CMPXCHG_STATE(pVCpu, VMCPUSTATE_STARTED_HM, VMCPUSTATE_STARTED_EXEC); 1937 1938 /* Restore preemption if we previous disabled it ourselves. */ 1939 if (fPreemptDisabled) 1940 { 1941 pVCpu->hm.s.fLeaveDone = true; 1942 RTThreadPreemptRestore(&PreemptState); 1943 } 1922 1944 } 1923 1945 -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r47760 r47766 6040 6040 RTThreadPreemptDisable(&PreemptState); 6041 6041 fPreemptDisabled = true; 6042 if (pVCpu->hm.s. vmx.fVmxLeaveDone)6042 if (pVCpu->hm.s.fLeaveDone) 6043 6043 { 6044 6044 RTThreadPreemptRestore(&PreemptState); … … 6094 6094 if (fPreemptDisabled) 6095 6095 { 6096 pVCpu->hm.s. vmx.fVmxLeaveDone = true;6096 pVCpu->hm.s.fLeaveDone = true; 6097 6097 RTThreadPreemptRestore(&PreemptState); 6098 6098 } … … 6796 6796 /** @todo this will change with preemption hooks where can VMRESUME as long 6797 6797 * as we're no preempted. */ 6798 pVCpu->hm.s.fResumeVM = false;6799 pVCpu->hm.s. vmx.fVmxLeaveDone = false;6798 pVCpu->hm.s.fResumeVM = false; 6799 pVCpu->hm.s.fLeaveDone = false; 6800 6800 return VINF_SUCCESS; 6801 6801 } … … 6848 6848 AssertRC(rc); 6849 6849 6850 pVCpu->hm.s.fResumeVM = false;6851 pVCpu->hm.s. vmx.fVmxLeaveDone = false;6850 pVCpu->hm.s.fResumeVM = false; 6851 pVCpu->hm.s.fLeaveDone = false; 6852 6852 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_HOST_CONTEXT; 6853 6853
Note:
See TracChangeset
for help on using the changeset viewer.