Changeset 22042 in vbox
- Timestamp:
- Aug 6, 2009 4:58:57 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vm.h
r22037 r22042 692 692 uint32_t offVMCPU; 693 693 694 /** Maximum CPUID leaf, exposed to this VM. */695 uint32_t cCpuidLeafs;696 697 694 /** Reserved; alignment. */ 698 uint32_t u32Reserved[ 5];695 uint32_t u32Reserved[6]; 699 696 700 697 /** @name Public VMM Switcher APIs -
trunk/include/VBox/vm.mac
r22037 r22042 59 59 .cbSelf resd 1 60 60 .offVMCPU resd 1 61 .cCpuidLeafs resd 1 62 .u32Reserved resd 5 61 .u32Reserved resd 6 63 62 64 63 .pfnVMMGCGuestToHostAsmGuestCtx RTRCPTR_RES 1 -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r22037 r22042 212 212 hrc = pMachine->COMGETTER(CPUCount)(&cCpus); H(); 213 213 214 ULONG cCpuidLeafs = 5;215 214 Bstr osTypeId; 216 215 hrc = pMachine->COMGETTER(OSTypeId)(osTypeId.asOutParam()); H(); 217 if (osTypeId == "WindowsNT4")218 {219 /*220 * We must limit CPUID count for Windows NT 4 manually,221 * as otherwise it stops with 0x3e error222 * (MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED).223 */224 LogRel(("Limiting CPUID leaf count for NT4 guests\n"));225 cCpuidLeafs = 2;226 }227 216 228 217 /* … … 244 233 rc = CFGMR3InsertInteger(pRoot, "RamHoleSize", cbRamHole); RC_CHECK(); 245 234 rc = CFGMR3InsertInteger(pRoot, "NumCPUs", cCpus); RC_CHECK(); 246 rc = CFGMR3Insert Integer(pRoot, "CpuidLeafs", cCpuidLeafs);RC_CHECK();235 rc = CFGMR3InsertString (pRoot, "OSType", Utf8Str(osTypeId)); RC_CHECK(); 247 236 rc = CFGMR3InsertInteger(pRoot, "TimerMillies", 10); RC_CHECK(); 248 237 rc = CFGMR3InsertInteger(pRoot, "RawR3Enabled", 1); /* boolean */ RC_CHECK(); … … 251 240 rc = CFGMR3InsertInteger(pRoot, "PATMEnabled", 1); /* boolean */ RC_CHECK(); 252 241 rc = CFGMR3InsertInteger(pRoot, "CSAMEnabled", 1); /* boolean */ RC_CHECK(); 242 243 if (osTypeId == "WindowsNT4") 244 { 245 /* 246 * We must limit CPUID count for Windows NT 4, 247 * as otherwise it stops with 0x3e error 248 * (MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED). 249 */ 250 LogRel(("Limiting CPUID leaf count for NT4 guests\n")); 251 rc = CFGMR3InsertInteger(pRoot, "NT4LeafLimit", true); RC_CHECK(); 252 } 253 253 254 254 /* hardware virtualization extensions */ -
trunk/src/VBox/VMM/CPUM.cpp
r22037 r22042 534 534 * info too in these leaves (like words about having a constant TSC). 535 535 */ 536 if (pCPUM->aGuestCpuIdStd[0].eax > pVM->cCpuidLeafs) 537 pCPUM->aGuestCpuIdStd[0].eax = pVM->cCpuidLeafs; 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 if (pCPUM->aGuestCpuIdStd[0].eax > 5) 544 pCPUM->aGuestCpuIdStd[0].eax = 5; 538 545 539 546 for (i = pCPUM->aGuestCpuIdStd[0].eax + 1; i < RT_ELEMENTS(pCPUM->aGuestCpuIdStd); i++) … … 1121 1128 ); 1122 1129 1123 /* Make sure we don't forget to update the masks when enabling 1124 * features in the future. 1130 /* Make sure we don't forget to update the masks when enabling 1131 * features in the future. 1125 1132 */ 1126 AssertRelease(!(pVM->cpum.s.aGuestCpuIdStd[1].ecx & 1133 AssertRelease(!(pVM->cpum.s.aGuestCpuIdStd[1].ecx & 1127 1134 ( X86_CPUID_FEATURE_ECX_DTES64 1128 1135 | X86_CPUID_FEATURE_ECX_VMX -
trunk/src/VBox/VMM/VM.cpp
r22037 r22042 594 594 rc = VERR_INVALID_PARAMETER; 595 595 } 596 }597 /*598 * Set correct CPUID leafs limit, some guests types,599 * notably Win NT 4.0 may wish to override this value.600 */601 if (RT_SUCCESS(rc))602 {603 uint32_t cCpuidLeafs;604 rc = CFGMR3QueryU32Def(CFGMR3GetRoot(pVM), "CpuidLeafs", &cCpuidLeafs, 5);605 pVM->cCpuidLeafs = cCpuidLeafs;606 596 } 607 597 if (RT_SUCCESS(rc))
Note:
See TracChangeset
for help on using the changeset viewer.