VMware vSphere

 View Only
Expand all | Collapse all

Manipulating Guest CPUID

  • 1.  Manipulating Guest CPUID

    Posted Jan 06, 2014 05:00 PM

    Hi there,

    I wish all a happy new year!

    Did anybody ever tried to manipulate the CPUID, which is shown to the guest OS?

    I have the following scenario:


    CPUID shown in the guest OS: 0FABFBFF00020651
     

    vmx-File Parameters:
     

    guestCPUID.0 = "0000000b756e65476c65746e49656e69"
    guestCPUID.1 = "0002065100010800829822030fabfbff"
     
    As you can see I find the ID shown above splitted in two parts inside of the value of guestCPUID.1 (marked in bold).
     
     
    I need to change this ID to 0FEBFBFF000006F1
    If I manipulate the guestCPUID.1 value according to the ID I need I get the following result: After PowerOn the VM again the value gets instantly overwritten by the original value.  

    I assume that the other part of the value and maybe also guestCPUID.0 are also related in some way.


    Unfortunally I can´t find anything in the documation / google about this paramaters.


    Thanks for any help!

    Cheers,

    Mario
     

     



  • 2.  RE: Manipulating Guest CPUID

    Posted Jan 07, 2014 12:39 AM

    Many cpuid leaves can be modified using options like the following:

    # Northwood

    cpuid.1.eax="----:0000:0000:0000:----:1111:0010:1001"

    The general form is cpuid.<eax-in>.<gpr>="<value>"

    The GPR is eax, ebx, ecx, or edx.  The colons are optional.  Ones and zeroes override the default settings, bit by bit.  Dashes are used to leave the default settings alone.

    Thanks,

    --jim



  • 3.  RE: Manipulating Guest CPUID

    Posted Jan 07, 2014 07:34 AM

    Hi Jim,

    thanks for you respose!

    Do have any more information how I convert my desired 16-digits long CPUID (0FEBFBFF000006F1) into the correct values for cpuid.1.eax/ebx/.... ??

    Whats about the guestCPUID.1 value? Isn´t it related to this ID,because I find the ID in this value (splittet into two parts), which I see inside of the OS?

    Many thanks!!!
    Mario



  • 4.  RE: Manipulating Guest CPUID
    Best Answer

    Posted Jan 07, 2014 12:42 PM

    0FEBFBFF000006F1 looks like CPUID.1.EDX concatenated with CPUID.1.EAX.  So, you want CPUID.1.EDX to be 0FEBFBFF and CPUID.1.EAX to be 000006F1.  Use a binary calculator to convert hexadecimal to binary, and you get:


    cpuid.1.edx = "00001111111010111111101111111111"

    cpuid.1.eax = "00000000000000000000011011110001"


    The only thing that would concern me is that you are changing bit 22 of CPUID.1.EDX from 0 to 1.  This will result in the virtual CPU claiming support for a feature that it does not really support, namely "ACPI." Intel documents this feature bit as follows:

    Thermal Monitor and Software Controlled Clock Facilities. The processor implements internal MSRs that allow processor temperature to be monitored and processor performance to be modulated in predefined duty cycles under software control.


    This may or may not be a problem, depending on what the guest OS does with these MSRs.

    The guestCPUID.1 value is informational only.  You should see that value change after you have powered on the VM with the configuration options above.



  • 5.  RE: Manipulating Guest CPUID

    Posted Jan 07, 2014 02:35 PM

    Awesome, worked like a charm!

    Thank you very much!!

    Cheers,

    Mario



  • 6.  RE: Manipulating Guest CPUID

    Posted Jan 08, 2014 05:30 AM

    Thanks a lot....



  • 7.  RE: Manipulating Guest CPUID

    Posted Aug 23, 2014 10:03 AM

    thats was really helpfull mattson

    you explainen about guestCPUID.1 value but there is another CPUID with this flag: guestCPUID.0

    this is totally different to guestCPUID.1, so what is that??



  • 8.  RE: Manipulating Guest CPUID

    Posted Aug 23, 2014 10:18 AM

    guestCPUID.0 is the data from CPUID function 0, which is not all that interesting.  The first 8 hexadecimal digits indicate the maximum input value for basic CPUID Information.  The rest is the string "GenuineIntel" in a strange order (see http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-2a-manual.pdf for more details). 



  • 9.  RE: Manipulating Guest CPUID

    Posted Aug 24, 2014 05:06 AM

    is it possible to change it with the same way that we use for changing guestCPUID.0 ??

    beside, as i know in addition of EAX and EDX there are tow other IDs covered in guestCPUID.0, they are ECX and EBX right??

    how can i extract them?? is it possible to change them like EAX and EDX with adding these items for example to vmx file of virtual machine:

    cpuid.1.eax = "00001111111010111111101111111111"

    cpuid.1.ebx = "00000000000000000000011011110001"

    Best Regards,



  • 10.  RE: Manipulating Guest CPUID

    Posted Aug 24, 2014 09:55 AM

    Each CPUID function populates four general purpose registers with data.  These registers are eax, ebx, ecx, and edx.  For the functions that VMware hypervisors typically mask, like function 1, it is sufficient to add a configuration entry like the ones you have indicated above.  However, if we do not typically mask the particular CPUID function you are interested in, then you will also need the option:

    monitor_control.enable_fullcpuid = TRUE

    As for extracting the results, you can write a program to query the CPUID function(s) of interest, or you can just look in the vmware.log file of any VM.  All current VMware hypervisors log all CPUID information for both the host and the guest



  • 11.  RE: Manipulating Guest CPUID

    Broadcom Employee
    Posted Feb 10, 2016 12:45 PM

    What would be needed in the vmx file to modify guestCPUID 80000002-80000005 for all vCPU's?



  • 12.  RE: Manipulating Guest CPUID

    Posted Feb 10, 2016 05:57 PM

    For current VMware product releases, you can modify CPUID leaves 80000002 - 80000004 with the following configuration option:

    cpuid.brandstring = "whatever you want"

    For example,

    cpuid.brandstring = "Intel(R) Xeon(R) CPU E3-1270 v3 @ 3.50GHz"



  • 13.  RE: Manipulating Guest CPUID

    Posted Jan 30, 2018 04:27 PM

    Hi jmattson,

    you need to close the virtual machine to do that. otherwise the change does not take place.

    That's what I want to learn;

    Is there a program we can do without shutting down the computer?

    Thanks..



  • 14.  RE: Manipulating Guest CPUID

    Posted Jan 30, 2018 09:40 PM

    Yes, I need this method.

    Without turning off the computer, is there a way to change BrandString?



  • 15.  RE: Manipulating Guest CPUID

    Broadcom Employee
    Posted Jan 30, 2018 10:26 PM

    There is no way to reflect that to the guest os whitout a VM restart, if you vMotion you will also see the booted CPUID.



  • 16.  RE: Manipulating Guest CPUID

    Posted Oct 09, 2020 03:49 PM

    Does anyone know if this is still available in Workstation 16 pro?   Or has implementation changed?

    Having issue with move from version 15 to 16.  Workstation reports vmx is invalid when options are in place. 



  • 17.  RE: Manipulating Guest CPUID

    Posted Oct 09, 2020 05:41 PM

    What is your use case?



  • 18.  RE: Manipulating Guest CPUID

    Posted Jul 08, 2015 09:15 AM

    Hi,

    I have been trying to install mac os 10.8.2 using souldev teams tutorial, in vmware.

    I have used hardware bypass software in download (vmware patch) and still it shows the same error.

    I also tried to add the "cpuid" code line in .vmx file and no result.

    cpu- amd athlon

    asus motherboard

    4gb ram

    windows 7 ultimate 64 bit

    tried with several versions of vmware (8,9 series) and same error every where

    I have been searching for the solutions since weeks and no result.

    PLEASE some body help me out guys.

    Thanks advance.



  • 19.  RE: Manipulating Guest CPUID

    Posted Jul 08, 2015 12:19 PM

    Apple's EULA does not permit the installation of Mac OS X on non-Apple branded hardware.