VirtualBox

Changeset 57513 in vbox


Ignore:
Timestamp:
Aug 24, 2015 3:38:11 PM (9 years ago)
Author:
vboxsync
Message:

GIM/HyperV: Update 0x40000002 cpuid as per the Hyper-V spec. when guest writes to it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/GIMAllHv.cpp

    r57358 r57513  
    259259                        MSR_GIM_HV_GUEST_OS_ID_MAJOR_VERSION(uRawValue),   MSR_GIM_HV_GUEST_OS_ID_MINOR_VERSION(uRawValue),
    260260                        MSR_GIM_HV_GUEST_OS_ID_SERVICE_VERSION(uRawValue), MSR_GIM_HV_GUEST_OS_ID_BUILD(uRawValue)));
     261
     262                /* Update the CPUID leaf, see Hyper-V spec. "Microsoft Hypervisor CPUID Leaves". */
     263                CPUMCPUIDLEAF HyperLeaf;
     264                RT_ZERO(HyperLeaf);
     265                HyperLeaf.uLeaf = UINT32_C(0x40000002);
     266                HyperLeaf.uEax  = MSR_GIM_HV_GUEST_OS_ID_BUILD(uRawValue);
     267                HyperLeaf.uEbx  =  MSR_GIM_HV_GUEST_OS_ID_MINOR_VERSION(uRawValue)
     268                                | (MSR_GIM_HV_GUEST_OS_ID_MAJOR_VERSION(uRawValue) << 16);
     269                HyperLeaf.uEcx  = MSR_GIM_HV_GUEST_OS_ID_SERVICE_VERSION(uRawValue);
     270                HyperLeaf.uEdx  =  MSR_GIM_HV_GUEST_OS_ID_SERVICE_VERSION(uRawValue)
     271                                | (MSR_GIM_HV_GUEST_OS_ID_BUILD(uRawValue) << 24);
     272                int rc2 = CPUMR3CpuIdInsert(pVM, &HyperLeaf);
     273                AssertRC(rc2);
    261274            }
    262275            pHv->u64GuestOsIdMsr = uRawValue;
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