VirtualBox

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


Ignore:
Timestamp:
Sep 15, 2010 11:44:46 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
65891
Message:

Enabled minimal guest state loading (VT-x; again). Watch for regressions.

File:
1 edited

Legend:

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

    r32506 r32512  
    15601560
    15611561    /*
    1562      * Sysenter MSRs (unconditional)
     1562     * Sysenter MSRs
    15631563     */
    1564     rc  = VMXWriteVMCS(VMX_VMCS32_GUEST_SYSENTER_CS,    pCtx->SysEnter.cs);
    1565     rc |= VMXWriteVMCS64(VMX_VMCS64_GUEST_SYSENTER_EIP, pCtx->SysEnter.eip);
    1566     rc |= VMXWriteVMCS64(VMX_VMCS64_GUEST_SYSENTER_ESP, pCtx->SysEnter.esp);
    1567     AssertRC(rc);
     1564    if (pVCpu->hwaccm.s.fContextUseFlags & HWACCM_CHANGED_GUEST_MSR)
     1565    {
     1566        rc  = VMXWriteVMCS(VMX_VMCS32_GUEST_SYSENTER_CS,    pCtx->SysEnter.cs);
     1567        rc |= VMXWriteVMCS64(VMX_VMCS64_GUEST_SYSENTER_EIP, pCtx->SysEnter.eip);
     1568        rc |= VMXWriteVMCS64(VMX_VMCS64_GUEST_SYSENTER_ESP, pCtx->SysEnter.esp);
     1569        AssertRC(rc);
     1570    }
    15681571
    15691572    /* Control registers */
     
    18301833        pVCpu->hwaccm.s.vmx.pfnStartVM  = VMXR0StartVM64;
    18311834#endif
    1832         /* Unconditionally update these as wrmsr might have changed them. */
    1833         rc = VMXWriteVMCS64(VMX_VMCS64_GUEST_FS_BASE, pCtx->fsHid.u64Base);
    1834         AssertRC(rc);
    1835         rc = VMXWriteVMCS64(VMX_VMCS64_GUEST_GS_BASE, pCtx->gsHid.u64Base);
    1836         AssertRC(rc);
     1835        if (pVCpu->hwaccm.s.fContextUseFlags & HWACCM_CHANGED_GUEST_MSR)
     1836        {
     1837            /* Update these as wrmsr might have changed them. */
     1838            rc = VMXWriteVMCS64(VMX_VMCS64_GUEST_FS_BASE, pCtx->fsHid.u64Base);
     1839            AssertRC(rc);
     1840            rc = VMXWriteVMCS64(VMX_VMCS64_GUEST_GS_BASE, pCtx->gsHid.u64Base);
     1841            AssertRC(rc);
     1842        }
    18371843    }
    18381844    else
     
    26142620
    26152621    /* Load the guest state */
    2616 #if 0
    26172622    if (!pVCpu->hwaccm.s.fContextUseFlags)
    26182623    {
     
    26212626    }
    26222627    else
    2623 #endif
    26242628    {
    26252629        rc = VMXR0LoadGuestState(pVM, pVCpu, pCtx);
     
    36123616            goto ResumeExecution;
    36133617        }
     3618        pVCpu->hwaccm.s.fContextUseFlags |= HWACCM_CHANGED_GUEST_MSR;
    36143619        /* no break */
    36153620    case VMX_EXIT_RDMSR:                /* 31 RDMSR. Guest software attempted to execute RDMSR. */
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