VirtualBox

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


Ignore:
Timestamp:
Oct 30, 2009 4:21:35 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
54154
Message:

Check if we need to intercept invlpg; we catch all page table updates, so there's no need unless there are dirty (unmonitored) pages.
The InvalidatePage handler should only check for dirty pages for the same reason. Restricted to R0 for now.

Again a risky change.

Location:
trunk/src/VBox/VMM/VMMR0
Files:
2 edited

Legend:

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

    r24027 r24207  
    942942#endif
    943943
     944    /* Check if we need to intercept invlpg; we catch all page table updates, so there's no need unless there are dirty (unmonitored) pages. */
     945    if (PGMHasDirtyPages(pVM))
     946        pVMCB->ctrl.u32InterceptCtrl1 |= SVM_CTRL1_INTERCEPT_INVLPG;
     947    else
     948        pVMCB->ctrl.u32InterceptCtrl1 &= ~SVM_CTRL1_INTERCEPT_INVLPG;
     949
    944950    /* Done. */
    945951    pVCpu->hwaccm.s.fContextUseFlags &= ~HWACCM_CHANGED_ALL_GUEST;
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r24029 r24207  
    18631863
    18641864    vmxR0UpdateExceptionBitmap(pVM, pVCpu, pCtx);
     1865
     1866    /* Check if we need to intercept invlpg; we catch all page table updates, so there's no need unless there are dirty (unmonitored) pages. */
     1867    val = pVCpu->hwaccm.s.vmx.proc_ctls;
     1868    if (PGMHasDirtyPages(pVM))
     1869        pVCpu->hwaccm.s.vmx.proc_ctls |= VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_INVLPG_EXIT;
     1870    else
     1871        pVCpu->hwaccm.s.vmx.proc_ctls &= ~VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_INVLPG_EXIT;
     1872
     1873    if (val != pVCpu->hwaccm.s.vmx.proc_ctls)
     1874    {
     1875        rc = VMXWriteVMCS(VMX_VMCS_CTRL_PROC_EXEC_CONTROLS, pVCpu->hwaccm.s.vmx.proc_ctls);
     1876        AssertRC(rc);
     1877    }
    18651878
    18661879#ifdef VBOX_WITH_AUTO_MSR_LOAD_RESTORE
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