VirtualBox

Ignore:
Timestamp:
Aug 27, 2008 2:52:09 PM (16 years ago)
Author:
vboxsync
Message:

Allow enabling and disabling of the PAT cpuid feature.

File:
1 edited

Legend:

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

    r11311 r11704  
    12031203        }
    12041204
     1205        case CPUMCPUIDFEATURE_PAT:
     1206        {
     1207            if (pVM->cpum.s.aGuestCpuIdStd[0].eax >= 1)
     1208                pVM->cpum.s.aGuestCpuIdStd[1].edx |= X86_CPUID_FEATURE_EDX_PAT;
     1209            if (    pVM->cpum.s.aGuestCpuIdExt[0].eax >= 0x80000001
     1210                &&  pVM->cpum.s.enmCPUVendor == CPUMCPUVENDOR_AMD)
     1211                pVM->cpum.s.aGuestCpuIdExt[1].edx |= X86_CPUID_AMD_FEATURE_EDX_PAT;
     1212            LogRel(("CPUMClearGuestCpuIdFeature: Enabled PAT\n"));
     1213            break;
     1214        }
     1215
    12051216        default:
    12061217            AssertMsgFailed(("enmFeature=%d\n", enmFeature));
     
    12651276                pVM->cpum.s.aGuestCpuIdExt[1].edx &= ~X86_CPUID_AMD_FEATURE_EDX_PAE;
    12661277            LogRel(("CPUMClearGuestCpuIdFeature: Disabled PAE!\n"));
     1278            break;
     1279        }
     1280
     1281        case CPUMCPUIDFEATURE_PAT:
     1282        {
     1283            if (pVM->cpum.s.aGuestCpuIdStd[0].eax >= 1)
     1284                pVM->cpum.s.aGuestCpuIdStd[1].edx &= ~X86_CPUID_FEATURE_EDX_PAT;
     1285            if (    pVM->cpum.s.aGuestCpuIdExt[0].eax >= 0x80000001
     1286                &&  pVM->cpum.s.enmCPUVendor == CPUMCPUVENDOR_AMD)
     1287                pVM->cpum.s.aGuestCpuIdExt[1].edx &= ~X86_CPUID_AMD_FEATURE_EDX_PAT;
     1288            LogRel(("CPUMClearGuestCpuIdFeature: Disabled PAT!\n"));
    12671289            break;
    12681290        }
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