Changeset 12732 in vbox
- Timestamp:
- Sep 25, 2008 1:53:39 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 37055
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/HWACCM.cpp
r12707 r12732 529 529 530 530 /* The I/O bitmap starts right after the virtual interrupt redirection bitmap. Outside the TSS on purpose; the CPU will not check it 531 * for I/O operations.*/531 * for I/O operations. (but fault (#GP) on all IO instructions instead) */ 532 532 ASMMemZero32(pVM->hwaccm.s.vmx.pRealModeTSS, sizeof(*pVM->hwaccm.s.vmx.pRealModeTSS)); 533 533 pVM->hwaccm.s.vmx.pRealModeTSS->offIoBitmap = sizeof(*pVM->hwaccm.s.vmx.pRealModeTSS); -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r12730 r12732 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; … … 1819 1828 } 1820 1829 1830 case X86_XCPT_GP: /* General protection failure exception.*/ 1831 { 1832 STAM_COUNTER_INC(&pVM->hwaccm.s.StatExitGuestGP); 1833 #ifdef VBOX_STRICT 1834 Log(("Trap %x at %VGv error code %x\n", vector, pCtx->rip, errCode)); 1835 rc = VMXR0InjectEvent(pVM, pCtx, VMX_VMCS_CTRL_ENTRY_IRQ_INFO_FROM_EXIT_INT_INFO(intInfo), cbInstr, errCode); 1836 AssertRC(rc); 1837 STAM_PROFILE_ADV_STOP(&pVM->hwaccm.s.StatExit, x); 1838 goto ResumeExecution; 1839 #else 1840 Assert(CPUMIsGuestInRealModeEx(pCtx)); 1841 1842 LogFlow(("Real mode X86_XCPT_GP instruction emulation at %VGv\n", pCtx->rip)); 1843 rc = EMInterpretInstruction(pVM, CPUMCTX2CORE(pCtx), 0, &cbSize); 1844 if (rc == VINF_SUCCESS) 1845 { 1846 /* EIP has been updated already. */ 1847 1848 /* Only resume if successful. */ 1849 STAM_PROFILE_ADV_STOP(&pVM->hwaccm.s.StatExit, x); 1850 goto ResumeExecution; 1851 } 1852 AssertMsg(rc == VERR_EM_INTERPRETER); 1853 break; 1854 #endif 1855 } 1856 1821 1857 #ifdef VBOX_STRICT 1822 1858 case X86_XCPT_DE: /* Divide error. */ 1823 case X86_XCPT_GP: /* General protection failure exception.*/1824 1859 case X86_XCPT_UD: /* Unknown opcode exception. */ 1825 1860 case X86_XCPT_SS: /* Stack segment exception. */ … … 1839 1874 case X86_XCPT_NP: 1840 1875 STAM_COUNTER_INC(&pVM->hwaccm.s.StatExitGuestNP); 1841 break;1842 case X86_XCPT_GP:1843 STAM_COUNTER_INC(&pVM->hwaccm.s.StatExitGuestGP);1844 1876 break; 1845 1877 }
Note:
See TracChangeset
for help on using the changeset viewer.