VirtualBox

Changeset 51301 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
May 20, 2014 4:47:59 AM (11 years ago)
Author:
vboxsync
Message:

VMM: Retire aGuestCpuIdHyper legacy array.

Location:
trunk/src/VBox/VMM/VMMAll
Files:
2 edited

Legend:

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

    r51288 r51301  
    55935593
    55945594#endif /* IN_RING0 */
     5595
  • trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp

    r50785 r51301  
    19341934    else if (iLeaf - UINT32_C(0x80000000) < RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdExt))
    19351935        pCpuId = &pVM->cpum.s.aGuestCpuIdExt[iLeaf - UINT32_C(0x80000000)];
    1936     else if (   iLeaf - UINT32_C(0x40000000) < RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdHyper)
    1937              && (pVCpu->CTX_SUFF(pVM)->cpum.s.aGuestCpuIdStd[1].ecx & X86_CPUID_FEATURE_ECX_HVP))
    1938         pCpuId = &pVM->cpum.s.aGuestCpuIdHyper[iLeaf - UINT32_C(0x40000000)];   /* Only report if HVP bit set. */
     1936    else if (   iLeaf - UINT32_C(0x40000000) < 0x100   /** @todo Fix this later: Hyper-V says 0x400000FF is the last valid leaf. */
     1937             && (pVCpu->CTX_SUFF(pVM)->cpum.s.aGuestCpuIdStd[1].ecx & X86_CPUID_FEATURE_ECX_HVP)) /* Only report if HVP bit set. */
     1938    {
     1939        PCPUMCPUIDLEAF pHyperLeaf = cpumCpuIdGetLeaf(pVM, iLeaf, 0 /* uSubLeaf */);
     1940        if (RT_LIKELY(pHyperLeaf))
     1941        {
     1942            *pEax = pHyperLeaf->uEax;
     1943            *pEbx = pHyperLeaf->uEbx;
     1944            *pEcx = pHyperLeaf->uEcx;
     1945            *pEdx = pHyperLeaf->uEdx;
     1946        }
     1947        else
     1948        {
     1949            *pEax = *pEbx = *pEcx = *pEdx = 0;
     1950            LogRel(("CPUM: CPUMGetGuestCpuId: failed to get CPUID leaf for iLeaf=%#RX32\n", iLeaf));
     1951        }
     1952        return;
     1953    }
    19391954    else if (iLeaf - UINT32_C(0xc0000000) < RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdCentaur))
    19401955        pCpuId = &pVM->cpum.s.aGuestCpuIdCentaur[iLeaf - UINT32_C(0xc0000000)];
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