Changeset 93825 in vbox for trunk/src/VBox
- Timestamp:
- Feb 17, 2022 12:27:36 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/NEMR3Native-darwin.cpp
r93787 r93825 1802 1802 1803 1803 /** 1804 * Handles an exit from hv_vcpu_run().1804 * Common worker for both nemR3DarwinHandleExit() and nemR3DarwinHandleExitDebug(). 1805 1805 * 1806 1806 * @returns VBox strict status code. … … 1810 1810 * @param pVmxTransient The transient VMX structure. 1811 1811 */ 1812 static VBOXSTRICTRC nemR3DarwinHandleExit(PVM pVM, PVMCPU pVCpu, PVMXTRANSIENT pVmxTransient)1812 DECLINLINE(int) nemR3DarwinHandleExitCommon(PVM pVM, PVMCPU pVCpu, PVMXTRANSIENT pVmxTransient) 1813 1813 { 1814 1814 uint32_t uExitReason; … … 1832 1832 STAM_COUNTER_INC(&pVCpu->nem.s.pVmxStats->aStatExitReason[pVmxTransient->uExitReason & MASK_EXITREASON_STAT]); 1833 1833 STAM_REL_COUNTER_INC(&pVCpu->nem.s.pVmxStats->StatExitAll); 1834 return VINF_SUCCESS; 1835 } 1836 1837 1838 /** 1839 * Handles an exit from hv_vcpu_run(). 1840 * 1841 * @returns VBox strict status code. 1842 * @param pVM The cross context VM structure. 1843 * @param pVCpu The cross context virtual CPU structure of the 1844 * calling EMT. 1845 * @param pVmxTransient The transient VMX structure. 1846 */ 1847 static VBOXSTRICTRC nemR3DarwinHandleExit(PVM pVM, PVMCPU pVCpu, PVMXTRANSIENT pVmxTransient) 1848 { 1849 int rc = nemR3DarwinHandleExitCommon(pVM, pVCpu, pVmxTransient); 1850 AssertRCReturn(rc, rc); 1834 1851 1835 1852 #ifndef HMVMX_USE_FUNCTION_TABLE … … 1853 1870 static VBOXSTRICTRC nemR3DarwinHandleExitDebug(PVM pVM, PVMCPU pVCpu, PVMXTRANSIENT pVmxTransient, PVMXRUNDBGSTATE pDbgState) 1854 1871 { 1855 uint32_t uExitReason; 1856 int rc = nemR3DarwinReadVmcs32(pVCpu, VMX_VMCS32_RO_EXIT_REASON, &uExitReason); 1857 AssertRC(rc); 1858 pVmxTransient->fVmcsFieldsRead = 0; 1859 pVmxTransient->fIsNestedGuest = false; 1860 pVmxTransient->uExitReason = VMX_EXIT_REASON_BASIC(uExitReason); 1861 pVmxTransient->fVMEntryFailed = VMX_EXIT_REASON_HAS_ENTRY_FAILED(uExitReason); 1862 1863 if (RT_UNLIKELY(pVmxTransient->fVMEntryFailed)) 1864 AssertLogRelMsgFailedReturn(("Running guest failed for CPU #%u: %#x %u\n", 1865 pVCpu->idCpu, pVmxTransient->uExitReason, vmxHCCheckGuestState(pVCpu, &pVCpu->nem.s.VmcsInfo)), 1866 VERR_NEM_IPE_0); 1867 1868 /** @todo Only copy the state on demand (the R0 VT-x code saves some stuff unconditionally and the VMX template assumes that 1869 * when handling exits). */ 1870 rc = nemR3DarwinCopyStateFromHv(pVM, pVCpu, CPUMCTX_EXTRN_ALL); 1872 int rc = nemR3DarwinHandleExitCommon(pVM, pVCpu, pVmxTransient); 1871 1873 AssertRCReturn(rc, rc); 1872 1873 STAM_COUNTER_INC(&pVCpu->nem.s.pVmxStats->aStatExitReason[pVmxTransient->uExitReason & MASK_EXITREASON_STAT]);1874 STAM_REL_COUNTER_INC(&pVCpu->nem.s.pVmxStats->StatExitAll);1875 1874 1876 1875 return vmxHCRunDebugHandleExit(pVCpu, pVmxTransient, pDbgState);
Note:
See TracChangeset
for help on using the changeset viewer.