VirtualBox

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


Ignore:
Timestamp:
Nov 20, 2017 4:36:39 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
119163
Message:

VMM/HMSVMR0: Nested Hw.virt: Force using a new ASID each time when executing the nested-guest.

File:
1 edited

Legend:

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

    r69715 r69763  
    903903    }
    904904
     905#ifdef VBOX_WITH_NESTED_HWVIRT
     906    if (CPUMIsGuestInSvmNestedHwVirtMode(pCtx))
     907        fNewAsid = true;
     908#else
     909    RT_NOREF(pCtx);
     910#endif
     911
    905912    /* Set TLB flush state as checked until we return from the world switch. */
    906913    ASMAtomicWriteBool(&pVCpu->hm.s.fCheckedTLBFlush, true);
     
    933940    else
    934941    {
    935 #ifdef VBOX_WITH_NESTED_HWVIRT
    936         /*
    937          * Only if the nested hypervisor says it does not need to flush anything in the TLB,
    938          * can we possibly apply it on the host. Otherwise, the nested-guest TLB flush setting
    939          * should be used and then the host settings be added on top.
    940          */
    941         if (CPUMIsGuestInSvmNestedHwVirtMode(pCtx))
    942         {
    943             PCSVMNESTEDVMCBCACHE pVmcbNstGstCache = &pVCpu->hm.s.svm.NstGstVmcbCache;
    944             if (pVmcbNstGstCache->TLBCtrl.n.u8TLBFlush == SVM_TLB_FLUSH_NOTHING)
    945                 pVmcb->ctrl.TLBCtrl.n.u8TLBFlush = SVM_TLB_FLUSH_NOTHING;
    946             else
    947                 pVmcb->ctrl.TLBCtrl.n.u8TLBFlush = pVmcbNstGstCache->TLBCtrl.n.u8TLBFlush;
    948         }
    949 #else
    950         RT_NOREF(pCtx);
    951942        pVmcb->ctrl.TLBCtrl.n.u8TLBFlush = SVM_TLB_FLUSH_NOTHING;
    952 #endif
    953943        if (pVCpu->hm.s.fForceTLBFlush)
    954944        {
     
    997987        pVmcb->ctrl.u64VmcbCleanBits &= ~HMSVM_VMCB_CLEAN_ASID;
    998988    }
    999 
    1000 #ifdef VBOX_WITH_NESTED_HWVIRT
    1001     Assert(CPUMIsGuestInSvmNestedHwVirtMode(pCtx) || pVmcb->ctrl.TLBCtrl.n.u8TLBFlush != SVM_TLB_FLUSH_NOTHING);
    1002 #endif
    1003989
    1004990    AssertMsg(pVCpu->hm.s.idLastCpu == pCpu->idCpu,
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