VirtualBox

Changeset 56705 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Jun 30, 2015 3:29:46 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
101347
Message:

HMR0.cpp: Don't call SUPR0EnableVTx(false) in HMR0Term unless we've actually called with with 'true'.

File:
1 edited

Legend:

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

    r56620 r56705  
    122122        VMXMSRS                     Msrs;
    123123
    124         /* Last instruction error */
     124        /** Last instruction error. */
    125125        uint32_t                    ulLastInstrError;
     126
     127        /** Set if we've called SUPR0EnableVTx(true) and should disable it during
     128         * module termination. */
     129        bool                        fCalledSUPR0EnableVTx;
    126130    } vmx;
    127131
     
    720724         */
    721725        Assert(g_HmR0.fGlobalInit);
    722         rc = SUPR0EnableVTx(false /* fEnable */);
     726
     727        if (g_HmR0.vmx.fCalledSUPR0EnableVTx)
     728        {
     729            rc = SUPR0EnableVTx(false /* fEnable */);
     730            g_HmR0.vmx.fCalledSUPR0EnableVTx = false;
     731        }
    723732
    724733        for (unsigned iCpu = 0; iCpu < RT_ELEMENTS(g_HmR0.aCpuInfo); iCpu++)
     
    919928        if (RT_SUCCESS(rc))
    920929        {
     930            g_HmR0.vmx.fCalledSUPR0EnableVTx = true;
    921931            /* If the host provides a VT-x init API, then we'll rely on that for global init. */
    922932            g_HmR0.fGlobalInit = pVM->hm.s.fGlobalInit = true;
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