Changeset 22070 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Aug 7, 2009 1:34:10 PM (15 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/CPUM.cpp
r22042 r22070 527 527 } 528 528 529 /** @cfgm{/CPUM/NT4LeafLimit, boolean, false} 530 * Limit the number of standard CPUID leafs to 0..2 to prevent NT4 from 531 * bugchecking with MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED (0x3e). 532 * This option corrsponds somewhat to IA32_MISC_ENABLES.BOOT_NT4[bit 22]. 533 * @todo r=bird: The intel docs states that leafs 3 is included, why don't we? 534 */ 535 bool fNt4LeafLimit; 536 CFGMR3QueryBoolDef(CFGMR3GetChild(CFGMR3GetRoot(pVM), "CPUM"), "NT4LeafLimit", &fNt4LeafLimit, false); 537 if (fNt4LeafLimit) 538 pCPUM->aGuestCpuIdStd[0].eax = 2; 539 529 540 /* 530 541 * Limit it the number of entries and fill the remaining with the defaults. … … 534 545 * info too in these leaves (like words about having a constant TSC). 535 546 */ 536 {537 bool fNt4LeafLimit;538 PCFGMNODE pNode = CFGMR3GetRoot(pVM);539 int rc = CFGMR3QueryBoolDef(pNode, "NT4LeafLimit", &fNt4LeafLimit, false);540 if (RT_SUCCESS(rc) && fNt4LeafLimit)541 pCPUM->aGuestCpuIdStd[0].eax = 2;542 }543 547 if (pCPUM->aGuestCpuIdStd[0].eax > 5) 544 548 pCPUM->aGuestCpuIdStd[0].eax = 5; … … 556 560 557 561 /* 558 * Workaround for missing cpuid(0) patches : If we miss to patch a cpuid(0).eax then559 * Linux tries to determine the number of processors from (cpuid(4).eax >> 26) + 1.560 * We currently don't support more than 1 processor.562 * Workaround for missing cpuid(0) patches when leaf 4 returns GuestCpuIdDef: 563 * If we miss to patch a cpuid(0).eax then Linux tries to determine the number 564 * of processors from (cpuid(4).eax >> 26) + 1. 561 565 */ 562 566 if (pVM->cCPUs == 1) -
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r22037 r22070 1080 1080 } 1081 1081 1082 if ( iLeaf == 4 && fHasMoreCaches && 1083 pVM->cpum.s.enmCPUVendor == CPUMCPUVENDOR_INTEL) 1082 if ( iLeaf == 4 1083 && fHasMoreCaches 1084 && pVM->cpum.s.enmCPUVendor == CPUMCPUVENDOR_INTEL) 1084 1085 { 1085 1086 /* Report unified L0 cache, Linux'es num_cpu_cores() requires … … 2058 2059 return enmMode; 2059 2060 } 2061
Note:
See TracChangeset
for help on using the changeset viewer.