Changeset 79485 in vbox
- Timestamp:
- Jul 3, 2019 5:10:33 AM (6 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r79478 r79485 1374 1374 } 1375 1375 1376 /* 1377 * Disable interrupts to prevent being preempted while we switch the current VMCS as the 1378 * preemption hook code path acquires the current VMCS. 1379 */ 1376 1380 RTCCUINTREG const fEFlags = ASMIntDisableFlags(); 1381 1377 1382 int rc = hmR0VmxSwitchVmcs(pVmcsInfoFrom, pVmcsInfoTo); 1378 1383 if (RT_SUCCESS(rc)) 1379 1384 { 1380 1385 pVCpu->hm.s.vmx.fSwitchedToNstGstVmcs = fSwitchToNstGstVmcs; 1381 ASMSetFlags(fEFlags);1382 1386 1383 1387 /* … … 1390 1394 else 1391 1395 ASMAtomicUoOrU64(&pVCpu->hm.s.fCtxChanged, HM_CHANGED_HOST_CONTEXT | HM_CHANGED_VMX_HOST_GUEST_SHARED_STATE); 1396 1397 ASMSetFlags(fEFlags); 1392 1398 1393 1399 /* … … 9147 9153 Assert(!VMMRZCallRing3IsEnabled(pVCpu)); 9148 9154 9149 RTCPUID idCpu = RTMpCpuId();9155 RTCPUID const idCpu = RTMpCpuId(); 9150 9156 Log4Func(("HostCpuId=%u\n", idCpu)); 9151 9157 … … 11660 11666 if (pVCpu->hm.s.fCtxChanged & HM_CHANGED_HOST_CONTEXT) 11661 11667 { 11662 int rc = hmR0VmxExportHostState(pVCpu); 11663 AssertRC(rc); 11664 STAM_COUNTER_INC(&pVCpu->hm.s.StatSwitchExportHostState); 11668 hmR0VmxExportHostState(pVCpu); 11669 STAM_COUNTER_INC(&pVCpu->hm.s.StatExportHostState); 11665 11670 } 11666 11671 Assert(!(pVCpu->hm.s.fCtxChanged & HM_CHANGED_HOST_CONTEXT)); … … 12066 12071 12067 12072 /* 12068 * Switch to the nested-guest VMCS as we may have transitioned toexecuting the12069 * nested-guest without leaving ring-0. Otherwise, if we came from ring-3 we would have12073 * Switch to the nested-guest VMCS as we may have transitioned from executing the 12074 * guest without leaving ring-0. Otherwise, if we came from ring-3 we would have 12070 12075 * loaded the nested-guest VMCS while entering the VMX ring-0 session. 12071 12076 */ … … 12077 12082 else 12078 12083 { 12079 LogRelFunc(("Failed to switch to the guest VMCS. rc=%Rrc\n", rc));12084 LogRelFunc(("Failed to switch to the nested-guest VMCS. rc=%Rrc\n", rc)); 12080 12085 return rc; 12081 12086 } -
trunk/src/VBox/VMM/VMMR3/HM.cpp
r79462 r79485 802 802 HM_REG_COUNTER(&pVCpu->hm.s.StatSwitchPreempt, "/HM/CPU%d/Switch/Preempting", "EMT has been preempted while in HM context."); 803 803 #ifdef VBOX_WITH_STATISTICS 804 HM_REG_COUNTER(&pVCpu->hm.s.StatSwitchExportHostState, "/HM/CPU%d/Switch/ExportHostState", "Preemption or entering with nested-guest VMCS caused re-exporting of host state.");805 804 HM_REG_COUNTER(&pVCpu->hm.s.StatSwitchNstGstVmexit, "/HM/CPU%d/Switch/NstGstVmexit", "Nested-guest VM-exit occurred."); 806 805 … … 836 835 HM_REG_COUNTER(&pVCpu->hm.s.StatExportFull, "/HM/CPU%d/Export/Full", "VM-entry exporting the full guest-state."); 837 836 HM_REG_COUNTER(&pVCpu->hm.s.StatLoadGuestFpu, "/HM/CPU%d/Export/GuestFpu", "VM-entry loading the guest-FPU state."); 837 HM_REG_COUNTER(&pVCpu->hm.s.StatExportHostState, "/HM/CPU%d/Export/HostState", "VM-entry exporting host-state."); 838 838 839 839 HM_REG_COUNTER(&pVCpu->hm.s.StatVmxCheckBadRmSelBase, "/HM/CPU%d/VMXCheck/RMSelBase", "Could not use VMX due to unsuitable real-mode selector base."); -
trunk/src/VBox/VMM/include/HMInternal.h
r79477 r79485 1202 1202 STAMCOUNTER StatSwitchApicAccessToR3; 1203 1203 STAMCOUNTER StatSwitchPreempt; 1204 STAMCOUNTER StatSwitchExportHostState;1205 1204 STAMCOUNTER StatSwitchNstGstVmexit; 1206 1205 … … 1216 1215 STAMCOUNTER StatExportFull; 1217 1216 STAMCOUNTER StatLoadGuestFpu; 1217 STAMCOUNTER StatExportHostState; 1218 1218 1219 1219 STAMCOUNTER StatVmxCheckBadRmSelBase;
Note:
See TracChangeset
for help on using the changeset viewer.