VirtualBox

Changeset 73140 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Jul 16, 2018 9:06:51 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
123730
Message:

VMM/HMSVM: Sort out state syncing on #VMEXIT, VMRUN transitions. We need to swap the full state as we use dedicated VMCBs for
guest and nested-guest.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/HMSVMAll.cpp

    r72967 r73140  
    164164     * However, with nested-guests, the state -can- change on trips to ring-3 for we might
    165165     * try to inject a nested-guest physical interrupt and cause a SVM_EXIT_INTR #VMEXIT for
    166      * the nested-guest from ring-3. Hence we signal the required CPU state change here.
     166     * the nested-guest from ring-3. Import the complete state here as we will be swapping
     167     * to the guest VMCB after the #VMEXIT.
    167168     */
    168     /** @todo Figure out why using HM_CHANGED_SVM_VMEXIT_MASK instead of
    169      *        HM_CHANGED_ALL_GUEST breaks nested guests (XP Pro, DSL etc.), see also
    170      *        hmR0SvmHandleExitNested(). */
    171     AssertMsg(!(pVCpu->cpum.GstCtx.fExtrn & IEM_CPUMCTX_EXTRN_SVM_VMEXIT_MASK),
    172               ("fExtrn=%#RX64 fExtrnMbz=%#RX64\n", pVCpu->cpum.GstCtx.fExtrn, IEM_CPUMCTX_EXTRN_SVM_VMEXIT_MASK));
     169    CPUMImportGuestStateOnDemand(pVCpu, CPUMCTX_EXTRN_ALL);
     170    AssertMsg(!(pVCpu->cpum.GstCtx.fExtrn & CPUMCTX_EXTRN_ALL),
     171              ("fExtrn=%#RX64 fExtrnMbz=%#RX64\n", pVCpu->cpum.GstCtx.fExtrn, CPUMCTX_EXTRN_ALL));
    173172    ASMAtomicUoOrU64(&pVCpu->hm.s.fCtxChanged, HM_CHANGED_ALL_GUEST);
    174173}
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