Changeset 25386 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Dec 15, 2009 10:26:53 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 56011
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r24829 r25386 754 754 755 755 #ifdef HWACCM_VMX_EMULATE_REALMODE 756 if (CPUMIsGuestInRealModeEx(pCtx)) 756 if ( CPUMIsGuestInRealModeEx(pCtx) 757 && pVM->hwaccm.s.vmx.pRealModeTSS) 757 758 { 758 759 RTGCPHYS GCPhysHandler; … … 1291 1292 # ifdef HWACCM_VMX_EMULATE_REALMODE 1292 1293 /* Intercept all exceptions in real mode as none of them can be injected directly (#GP otherwise). */ 1293 if (CPUMIsGuestInRealModeEx(pCtx) && pVM->hwaccm.s.vmx.pRealModeTSS) 1294 if ( CPUMIsGuestInRealModeEx(pCtx) 1295 && pVM->hwaccm.s.vmx.pRealModeTSS) 1294 1296 u32TrapMask |= HWACCM_VMX_TRAP_MASK_REALMODE; 1295 1297 # endif /* HWACCM_VMX_EMULATE_REALMODE */ … … 1473 1475 #ifdef HWACCM_VMX_EMULATE_REALMODE 1474 1476 /* Real mode emulation using v86 mode with CR4.VME (interrupt redirection using the int bitmap in the TSS) */ 1475 if (CPUMIsGuestInRealModeEx(pCtx)) 1477 if ( CPUMIsGuestInRealModeEx(pCtx) 1478 && pVM->hwaccm.s.vmx.pRealModeTSS) 1476 1479 { 1477 1480 RTGCPHYS GCPhys; … … 1648 1651 } 1649 1652 1653 #ifdef HWACCM_VMX_EMULATE_REALMODE 1650 1654 /* Turn off VME if we're in emulated real mode. */ 1651 if (CPUMIsGuestInRealModeEx(pCtx)) 1655 if ( CPUMIsGuestInRealModeEx(pCtx) 1656 && !pVM->hwaccm.s.vmx.pRealModeTSS) 1652 1657 val &= ~X86_CR4_VME; 1658 #endif /* HWACCM_VMX_EMULATE_REALMODE */ 1653 1659 1654 1660 rc |= VMXWriteVMCS64(VMX_VMCS64_GUEST_CR4, val); … … 1787 1793 #ifdef HWACCM_VMX_EMULATE_REALMODE 1788 1794 /* Real mode emulation using v86 mode. */ 1789 if (CPUMIsGuestInRealModeEx(pCtx)) 1795 if ( CPUMIsGuestInRealModeEx(pCtx) 1796 && pVM->hwaccm.s.vmx.pRealModeTSS) 1790 1797 { 1791 1798 pVCpu->hwaccm.s.vmx.RealMode.eflags = eflags; … … 2017 2024 #ifdef HWACCM_VMX_EMULATE_REALMODE 2018 2025 /* Real mode emulation using v86 mode. */ 2019 if (CPUMIsGuestInRealModeEx(pCtx)) 2026 if ( CPUMIsGuestInRealModeEx(pCtx) 2027 && pVM->hwaccm.s.vmx.pRealModeTSS) 2020 2028 { 2021 2029 /* Hide our emulation flags */ … … 3018 3026 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitGuestGP); 3019 3027 #ifdef VBOX_STRICT 3020 if (!CPUMIsGuestInRealModeEx(pCtx)) 3028 if ( !CPUMIsGuestInRealModeEx(pCtx) 3029 || !pVM->hwaccm.s.vmx.pRealModeTSS) 3021 3030 { 3022 3031 Log(("Trap %x at %04X:%RGv errorCode=%x\n", vector, pCtx->cs, (RTGCPTR)pCtx->rip, errCode)); … … 3289 3298 default: 3290 3299 #ifdef HWACCM_VMX_EMULATE_REALMODE 3291 if (CPUMIsGuestInRealModeEx(pCtx)) 3300 if ( CPUMIsGuestInRealModeEx(pCtx) 3301 && pVM->hwaccm.s.vmx.pRealModeTSS) 3292 3302 { 3293 3303 Log(("Real Mode Trap %x at %04x:%04X error code %x\n", vector, pCtx->cs, pCtx->eip, errCode));
Note:
See TracChangeset
for help on using the changeset viewer.