VirtualBox

Changeset 70732 in vbox for trunk/src/VBox/VMM/VMMR3


Ignore:
Timestamp:
Jan 25, 2018 4:50:36 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
120487
Message:

VMM: Move fGif out of svm and into common nested hwvirt struct.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/CPUM.cpp

    r70415 r70732  
    752752
    753753/**
    754  * Frees memory allocated by cpumR3AllocHwVirtState().
     754 * Frees memory allocated for the SVM hardware virtualization state.
    755755 *
    756756 * @param   pVM     The cross context VM structure.
    757757 */
    758 static void cpumR3FreeHwVirtState(PVM pVM)
     758static void cpumR3FreeSvmHwVirtState(PVM pVM)
    759759{
    760760    Assert(pVM->cpum.ro.GuestFeatures.fSvm);
     
    785785
    786786/**
    787  * Allocates memory required by the hardware virtualization state.
     787 * Allocates memory for the SVM hardware virtualization state.
    788788 *
    789789 * @returns VBox status code.
    790790 * @param   pVM     The cross context VM structure.
    791791 */
    792 static int cpumR3AllocHwVirtState(PVM pVM)
     792static int cpumR3AllocSvmHwVirtState(PVM pVM)
    793793{
    794794    Assert(pVM->cpum.ro.GuestFeatures.fSvm);
     
    850850    /* On any failure, cleanup. */
    851851    if (RT_FAILURE(rc))
    852         cpumR3FreeHwVirtState(pVM);
     852        cpumR3FreeSvmHwVirtState(pVM);
    853853
    854854    return rc;
     
    10391039    if (pVM->cpum.ro.GuestFeatures.fSvm)
    10401040    {
    1041         rc = cpumR3AllocHwVirtState(pVM);
     1041        rc = cpumR3AllocSvmHwVirtState(pVM);
    10421042        if (RT_FAILURE(rc))
    10431043            return rc;
     
    11261126
    11271127    if (pVM->cpum.ro.GuestFeatures.fSvm)
    1128         cpumR3FreeHwVirtState(pVM);
     1128        cpumR3FreeSvmHwVirtState(pVM);
    11291129    return VINF_SUCCESS;
    11301130}
     
    12821282     * Hardware virtualization state.
    12831283     */
     1284    pCtx->hwvirt.fGif = 1;
     1285
    12841286    /* SVM. */
    12851287    if (pCtx->hwvirt.svm.CTX_SUFF(pVmcb))
     1288    {
    12861289        memset(pCtx->hwvirt.svm.CTX_SUFF(pVmcb), 0, SVM_VMCB_PAGES << PAGE_SHIFT);
    1287     pCtx->hwvirt.svm.uMsrHSavePa = 0;
    1288     pCtx->hwvirt.svm.GCPhysVmcb = 0;
    1289     pCtx->hwvirt.svm.fGif = 1;
     1290        pCtx->hwvirt.svm.uMsrHSavePa = 0;
     1291        pCtx->hwvirt.svm.GCPhysVmcb = 0;
     1292    }
    12901293}
    12911294
     
    24562459        pHlp->pfnPrintf(pHlp, "    idtr                       = %016RX64:%04x\n", pCtx->hwvirt.svm.HostState.idtr.pIdt,
    24572460                        pCtx->hwvirt.svm.HostState.idtr.cbIdt);
    2458         pHlp->pfnPrintf(pHlp, "  fGif                       = %u\n",        pCtx->hwvirt.svm.fGif);
     2461        pHlp->pfnPrintf(pHlp, "  fGif                       = %u\n",        pCtx->hwvirt.fGif);
    24592462        pHlp->pfnPrintf(pHlp, "  cPauseFilter               = %RU16\n",     pCtx->hwvirt.svm.cPauseFilter);
    24602463        pHlp->pfnPrintf(pHlp, "  cPauseFilterThreshold      = %RU32\n",     pCtx->hwvirt.svm.cPauseFilterThreshold);
  • trunk/src/VBox/VMM/VMMR3/EM.cpp

    r70730 r70732  
    19601960            {
    19611961                PCPUMCTX pCtx = pVCpu->em.s.pCtx;
    1962                 bool fGif     = pCtx->hwvirt.svm.fGif;
     1962                bool fGif     = pCtx->hwvirt.fGif;
    19631963#ifdef VBOX_WITH_RAW_MODE
    19641964                /* We cannot just inspect EFLAGS when nested hw.virt is enabled (see e.g. CPUMCanSvmNstGstTakePhysIntr). */
Note: See TracChangeset for help on using the changeset viewer.

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