VirtualBox

Changeset 25386 in vbox for trunk/src/VBox/VMM/VMMR0


Ignore:
Timestamp:
Dec 15, 2009 10:26:53 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56011
Message:

Initial commit for unrestricted guest execution support (VT-x)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r24829 r25386  
    754754
    755755#ifdef HWACCM_VMX_EMULATE_REALMODE
    756     if (CPUMIsGuestInRealModeEx(pCtx))
     756    if (    CPUMIsGuestInRealModeEx(pCtx)
     757        &&  pVM->hwaccm.s.vmx.pRealModeTSS)
    757758    {
    758759        RTGCPHYS GCPhysHandler;
     
    12911292# ifdef HWACCM_VMX_EMULATE_REALMODE
    12921293    /* 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)
    12941296        u32TrapMask |= HWACCM_VMX_TRAP_MASK_REALMODE;
    12951297# endif /* HWACCM_VMX_EMULATE_REALMODE */
     
    14731475#ifdef HWACCM_VMX_EMULATE_REALMODE
    14741476        /* 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)
    14761479        {
    14771480            RTGCPHYS GCPhys;
     
    16481651        }
    16491652
     1653#ifdef HWACCM_VMX_EMULATE_REALMODE
    16501654        /* Turn off VME if we're in emulated real mode. */
    1651         if (CPUMIsGuestInRealModeEx(pCtx))
     1655        if (    CPUMIsGuestInRealModeEx(pCtx)
     1656            &&  !pVM->hwaccm.s.vmx.pRealModeTSS)
    16521657            val &= ~X86_CR4_VME;
     1658#endif /* HWACCM_VMX_EMULATE_REALMODE */
    16531659
    16541660        rc |= VMXWriteVMCS64(VMX_VMCS64_GUEST_CR4,            val);
     
    17871793#ifdef HWACCM_VMX_EMULATE_REALMODE
    17881794    /* Real mode emulation using v86 mode. */
    1789     if (CPUMIsGuestInRealModeEx(pCtx))
     1795    if (    CPUMIsGuestInRealModeEx(pCtx)
     1796        &&  pVM->hwaccm.s.vmx.pRealModeTSS)
    17901797    {
    17911798        pVCpu->hwaccm.s.vmx.RealMode.eflags = eflags;
     
    20172024#ifdef HWACCM_VMX_EMULATE_REALMODE
    20182025    /* Real mode emulation using v86 mode. */
    2019     if (CPUMIsGuestInRealModeEx(pCtx))
     2026    if (    CPUMIsGuestInRealModeEx(pCtx)
     2027        &&  pVM->hwaccm.s.vmx.pRealModeTSS)
    20202028    {
    20212029        /* Hide our emulation flags */
     
    30183026                STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitGuestGP);
    30193027#ifdef VBOX_STRICT
    3020                 if (!CPUMIsGuestInRealModeEx(pCtx))
     3028                if (    !CPUMIsGuestInRealModeEx(pCtx)
     3029                    ||  !pVM->hwaccm.s.vmx.pRealModeTSS)
    30213030                {
    30223031                    Log(("Trap %x at %04X:%RGv errorCode=%x\n", vector, pCtx->cs, (RTGCPTR)pCtx->rip, errCode));
     
    32893298            default:
    32903299#ifdef HWACCM_VMX_EMULATE_REALMODE
    3291                 if (CPUMIsGuestInRealModeEx(pCtx))
     3300                if (    CPUMIsGuestInRealModeEx(pCtx)
     3301                    &&  pVM->hwaccm.s.vmx.pRealModeTSS)
    32923302                {
    32933303                    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.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette