VirtualBox

Changeset 27306 in vbox


Ignore:
Timestamp:
Mar 11, 2010 8:44:52 PM (15 years ago)
Author:
vboxsync
Message:

CPUM: expose EDX of leaf 5 too, contains MWAIT C-states

File:
1 edited

Legend:

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

    r26992 r27306  
    629629    rc = CFGMR3QueryBoolDef(pCpumCfg, "MWaitExtensions", &fMWaitExtensions, false); AssertRCReturn(rc, rc);
    630630    if (fMWaitExtensions)
     631    {
    631632        pCPUM->aGuestCpuIdStd[5].ecx = X86_CPUID_MWAIT_ECX_EXT | X86_CPUID_MWAIT_ECX_BREAKIRQIF0;
     633        /* @todo: for now we just expose host's MWAIT C-states, although conceptually
     634           it shall be part of our power management virtualization model */
     635#if 0
     636        /* MWAIT sub C-states */
     637        pCPUM->aGuestCpuIdStd[5].edx =
     638                (0 << 0)  /* 0 in C0 */ |
     639                (2 << 4)  /* 2 in C1 */ |
     640                (2 << 8)  /* 2 in C2 */ |
     641                (2 << 12) /* 2 in C3 */ |
     642                (0 << 16) /* 0 in C4 */
     643                ;
     644#endif
     645    }
     646    else
     647        pCPUM->aGuestCpuIdStd[5].ecx = pCPUM->aGuestCpuIdStd[5].edx = 0;
    632648
    633649    /*
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