VirtualBox

Changeset 26653 in vbox


Ignore:
Timestamp:
Feb 19, 2010 2:01:06 PM (15 years ago)
Author:
vboxsync
Message:

Rewrote cpuid workaround

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/cpum.h

    r25935 r26653  
    931931VMMR3DECL(void)         CPUMR3ResetCpu(PVMCPU pVCpu);
    932932VMMDECL(bool)           CPUMR3IsStateRestorePending(PVM pVM);
     933VMMR3DECL(void)         CPUMR3SetHWVirtEx(PVM pVM, bool fHWVirtExEnabled);
    933934# ifdef DEBUG
    934935VMMR3DECL(void)         CPUMR3SaveEntryCtx(PVM pVM);
  • trunk/src/VBox/VMM/CPUM.cpp

    r26652 r26653  
    819819
    820820    }
     821}
     822
     823
     824/**
     825 * Apply late CPUM property changes based on the fHWVirtEx setting
     826 *
     827 * @param   pVM                 The VM to operate on.
     828 * @param   fHWVirtExEnabled    HWVirtEx enabled/disabled
     829 */
     830VMMR3DECL(void) CPUMR3SetHWVirtEx(PVM pVM, bool fHWVirtExEnabled)
     831{
    821832    /*
    822833     * Workaround for missing cpuid(0) patches when leaf 4 returns GuestCpuIdDef:
     
    824835     * of processors from (cpuid(4).eax >> 26) + 1.
    825836     */
    826     if (!HWACCMR3IsAllowed(pVM))
     837    if (!fHWVirtExEnabled)
    827838        pVM->cpum.s.aGuestCpuIdStd[4].eax = 0;
    828839}
    829 
    830840
    831841/**
  • trunk/src/VBox/VMM/VM.cpp

    r26365 r26653  
    10211021    /** @todo Move this to the VMINITCOMPLETED_RING0 notification handler. */
    10221022    if (RT_SUCCESS(rc))
     1023    {
    10231024        rc = HWACCMR3InitFinalizeR0(pVM);
     1025        CPUMR3SetHWVirtEx(pVM, HWACCMIsEnabled(pVM));
     1026    }
    10241027
    10251028    LogFlow(("vmR3InitRing0: returns %Rrc\n", rc));
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