Changeset 12747 in vbox
- Timestamp:
- Sep 25, 2008 3:21:34 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 37071
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r12746 r12747 1097 1097 #endif 1098 1098 1099 /* Intercept #GP faults in real mode to handle IO instructions. */ 1100 if (CPUMIsGuestInRealModeEx(pCtx)) 1101 pVM->hwaccm.s.vmx.u32TrapMask |= RT_BIT(X86_XCPT_GP); 1102 else 1103 pVM->hwaccm.s.vmx.u32TrapMask &= ~RT_BIT(X86_XCPT_GP); 1104 1105 rc = VMXWriteVMCS(VMX_VMCS_CTRL_EXCEPTION_BITMAP, pVM->hwaccm.s.vmx.u32TrapMask); 1106 AssertRC(rc); 1107 1099 1108 /* Done. */ 1100 1109 pVM->hwaccm.s.fContextUseFlags &= ~HWACCM_CHANGED_ALL_GUEST; … … 1818 1827 } 1819 1828 1829 case X86_XCPT_GP: /* General protection failure exception.*/ 1830 { 1831 uint32_t cbSize; 1832 1833 STAM_COUNTER_INC(&pVM->hwaccm.s.StatExitGuestGP); 1834 #ifdef VBOX_STRICT 1835 if (!CPUMIsGuestInRealModeEx(pCtx)) 1836 { 1837 Log(("Trap %x at %VGv error code %x\n", vector, pCtx->rip, errCode)); 1838 rc = VMXR0InjectEvent(pVM, pCtx, VMX_VMCS_CTRL_ENTRY_IRQ_INFO_FROM_EXIT_INT_INFO(intInfo), cbInstr, errCode); 1839 AssertRC(rc); 1840 STAM_PROFILE_ADV_STOP(&pVM->hwaccm.s.StatExit, x); 1841 goto ResumeExecution; 1842 } 1843 #endif 1844 Assert(CPUMIsGuestInRealModeEx(pCtx)); 1845 1846 LogFlow(("Real mode X86_XCPT_GP instruction emulation at %VGv\n", pCtx->rip)); 1847 rc = EMInterpretInstruction(pVM, CPUMCTX2CORE(pCtx), 0, &cbSize); 1848 if (rc == VINF_SUCCESS) 1849 { 1850 /* EIP has been updated already. */ 1851 1852 /* Only resume if successful. */ 1853 STAM_PROFILE_ADV_STOP(&pVM->hwaccm.s.StatExit, x); 1854 goto ResumeExecution; 1855 } 1856 AssertMsg(rc == VERR_EM_INTERPRETER); 1857 break; 1858 } 1859 1820 1860 #ifdef VBOX_STRICT 1821 1861 case X86_XCPT_DE: /* Divide error. */ 1822 case X86_XCPT_GP: /* General protection failure exception.*/1823 1862 case X86_XCPT_UD: /* Unknown opcode exception. */ 1824 1863 case X86_XCPT_SS: /* Stack segment exception. */ … … 1838 1877 case X86_XCPT_NP: 1839 1878 STAM_COUNTER_INC(&pVM->hwaccm.s.StatExitGuestNP); 1840 break;1841 case X86_XCPT_GP:1842 STAM_COUNTER_INC(&pVM->hwaccm.s.StatExitGuestGP);1843 1879 break; 1844 1880 }
Note:
See TracChangeset
for help on using the changeset viewer.