VirtualBox

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


Ignore:
Timestamp:
Feb 23, 2012 2:48:24 PM (13 years ago)
Author:
vboxsync
Message:

Optionally present basic hypervisor CPUID leaves.

File:
1 edited

Legend:

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

    r40170 r40234  
    14551455    if (iLeaf < RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdStd))
    14561456        pCpuId = &pVM->cpum.s.aGuestCpuIdStd[iLeaf];
     1457    else if (iLeaf - UINT32_C(0x40000000) < RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdHyper))
     1458        if ((pVCpu->CTX_SUFF(pVM)->cpum.s.aGuestCpuIdStd[1].ecx & X86_CPUID_FEATURE_ECX_HVP) != 0)
     1459            pCpuId = &pVM->cpum.s.aGuestCpuIdHyper[iLeaf - UINT32_C(0x40000000)];   /* Only report if HVP bit set. */
    14571460    else if (iLeaf - UINT32_C(0x80000000) < RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdExt))
    14581461        pCpuId = &pVM->cpum.s.aGuestCpuIdExt[iLeaf - UINT32_C(0x80000000)];
     
    18841887
    18851888        case CPUMCPUIDFEATURE_HVP:
    1886             if (pVM->cpum.s.aGuestCpuIdExt[0].eax >= 1)
    1887                 pVM->cpum.s.aGuestCpuIdExt[1].ecx &= ~X86_CPUID_FEATURE_ECX_HVP;
     1889            if (pVM->cpum.s.aGuestCpuIdStd[0].eax >= 1)
     1890                pVM->cpum.s.aGuestCpuIdStd[1].ecx &= ~X86_CPUID_FEATURE_ECX_HVP;
    18881891            break;
    18891892
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