Changeset 24416 in vbox for trunk/src/VBox
- Timestamp:
- Nov 5, 2009 9:17:56 PM (15 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r24404 r24416 257 257 RTPrintf("CPUID overrides: "); 258 258 ULONG cFound = 0; 259 static uint32_t const s_auCpuIdRanges[ 4] =259 static uint32_t const s_auCpuIdRanges[] = 260 260 { 261 261 UINT32_C(0x00000000), UINT32_C(0x0000000a), 262 UINT32_C(0x80000000), UINT32_C(0x 0000000a)262 UINT32_C(0x80000000), UINT32_C(0x8000000a) 263 263 }; 264 264 for (unsigned i = 0; i < RT_ELEMENTS(s_auCpuIdRanges); i += 2) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r24404 r24416 444 444 RTPrintf("Host CPUIDs:\n\nLeaf no. EAX EBX ECX EDX\n"); 445 445 ULONG uCpuNo = 0; /* ASSUMES that CPU#0 is online. */ 446 ULONG uEAX, uEBX, uECX, uEDX; 447 ULONG cLeafs; 448 449 /* Standard */ 450 CHECK_ERROR(Host, GetProcessorCpuIdLeaf(uCpuNo, 0, 0, &cLeafs, &uEBX, &uECX, &uEDX)); 451 if (cLeafs > UINT32_C(0x00000000) && cLeafs <= UINT32_C(0x0000007f)) 452 for (ULONG iLeaf = 0; iLeaf < cLeafs; iLeaf++) 446 static uint32_t const s_auCpuIdRanges[] = 447 { 448 UINT32_C(0x00000000), UINT32_C(0x0000007f), 449 UINT32_C(0x80000000), UINT32_C(0x8000007f), 450 UINT32_C(0xc0000000), UINT32_C(0xc000007f) 451 }; 452 for (unsigned i = 0; i < RT_ELEMENTS(s_auCpuIdRanges); i += 2) 453 { 454 ULONG uEAX, uEBX, uECX, uEDX, cLeafs; 455 CHECK_ERROR(Host, GetProcessorCpuIdLeaf(uCpuNo, s_auCpuIdRanges[i], 0, &cLeafs, &uEBX, &uECX, &uEDX)); 456 if (cLeafs < s_auCpuIdRanges[i] || cLeafs > s_auCpuIdRanges[i+1]) 457 continue; 458 cLeafs++; 459 for (ULONG iLeaf = s_auCpuIdRanges[i]; iLeaf <= cLeafs; iLeaf++) 453 460 { 454 461 CHECK_ERROR(Host, GetProcessorCpuIdLeaf(uCpuNo, iLeaf, 0, &uEAX, &uEBX, &uECX, &uEDX)); 455 462 RTPrintf("%08x %08x %08x %08x %08x\n", iLeaf, uEAX, uEBX, uECX, uEDX); 456 463 } 457 458 /* Extended */ 459 CHECK_ERROR(Host, GetProcessorCpuIdLeaf(uCpuNo, UINT32_C(0x80000000), 0, &cLeafs, &uEBX, &uECX, &uEDX)); 460 if (cLeafs > UINT32_C(0x80000000) && cLeafs <= UINT32_C(0x8000007f)) 461 for (ULONG iLeaf = UINT32_C(0x80000000); iLeaf < cLeafs; iLeaf++) 462 { 463 CHECK_ERROR(Host, GetProcessorCpuIdLeaf(uCpuNo, iLeaf, 0, &uEAX, &uEBX, &uECX, &uEDX)); 464 RTPrintf("%08x %08x %08x %08x %08x\n", iLeaf, uEAX, uEBX, uECX, uEDX); 465 } 464 } 466 465 } 467 466 break; -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r24413 r24416 245 245 rc = CFGMR3InsertInteger(pRoot, "CSAMEnabled", 1); /* boolean */ RC_CHECK(); 246 246 247 /* Standard cpuid leaf overrides. */ 248 for (uint32_t leaf = 0; leaf < 0xA; leaf++) 249 { 250 ULONG ulEax, ulEbx, ulEcx, ulEdx; 251 hrc = pMachine->GetCpuIdLeaf(leaf, &ulEax, &ulEbx, &ulEcx, &ulEdx); 252 if (SUCCEEDED(hrc)) 253 { 254 PCFGMNODE pLeaf; 255 rc = CFGMR3InsertNodeF(pRoot, &pLeaf, "CPUM/HostCPUID/%RX32", leaf); RC_CHECK(); 256 257 rc = CFGMR3InsertInteger(pLeaf, "eax", ulEax); RC_CHECK(); 258 rc = CFGMR3InsertInteger(pLeaf, "ebx", ulEbx); RC_CHECK(); 259 rc = CFGMR3InsertInteger(pLeaf, "ecx", ulEcx); RC_CHECK(); 260 rc = CFGMR3InsertInteger(pLeaf, "edx", ulEdx); RC_CHECK(); 261 } 262 else if (hrc != E_INVALIDARG) H(); 263 } 264 265 /* Extended cpuid leaf overrides. */ 266 for (uint32_t leaf = 0x80000000; leaf < 0x8000000A; leaf++) 267 { 268 ULONG ulEax, ulEbx, ulEcx, ulEdx; 269 hrc = pMachine->GetCpuIdLeaf(leaf, &ulEax, &ulEbx, &ulEcx, &ulEdx); 270 if (SUCCEEDED(hrc)) 271 { 272 PCFGMNODE pLeaf; 273 rc = CFGMR3InsertNodeF(pRoot, &pLeaf, "CPUM/HostCPUID/%RX32", leaf); RC_CHECK(); 274 275 rc = CFGMR3InsertInteger(pLeaf, "eax", ulEax); RC_CHECK(); 276 rc = CFGMR3InsertInteger(pLeaf, "ebx", ulEbx); RC_CHECK(); 277 rc = CFGMR3InsertInteger(pLeaf, "ecx", ulEcx); RC_CHECK(); 278 rc = CFGMR3InsertInteger(pLeaf, "edx", ulEdx); RC_CHECK(); 279 } 280 else if (hrc != E_INVALIDARG) H(); 281 } 247 /* cpuid leaf overrides. */ 248 static uint32_t const s_auCpuIdRanges[] = 249 { 250 UINT32_C(0x00000000), UINT32_C(0x0000000a), 251 UINT32_C(0x80000000), UINT32_C(0x8000000a) 252 }; 253 for (unsigned i = 0; i < RT_ELEMENTS(s_auCpuIdRanges); i += 2) 254 for (uint32_t uLeaf = s_auCpuIdRanges[i]; uLeaf < s_auCpuIdRanges[i + 1]; uLeaf++) 255 { 256 ULONG ulEax, ulEbx, ulEcx, ulEdx; 257 hrc = pMachine->GetCpuIdLeaf(uLeaf, &ulEax, &ulEbx, &ulEcx, &ulEdx); 258 if (SUCCEEDED(hrc)) 259 { 260 PCFGMNODE pLeaf; 261 rc = CFGMR3InsertNodeF(pRoot, &pLeaf, "CPUM/HostCPUID/%RX32", uLeaf); RC_CHECK(); 262 263 rc = CFGMR3InsertInteger(pLeaf, "eax", ulEax); RC_CHECK(); 264 rc = CFGMR3InsertInteger(pLeaf, "ebx", ulEbx); RC_CHECK(); 265 rc = CFGMR3InsertInteger(pLeaf, "ecx", ulEcx); RC_CHECK(); 266 rc = CFGMR3InsertInteger(pLeaf, "edx", ulEdx); RC_CHECK(); 267 } 268 else if (hrc != E_INVALIDARG) H(); 269 } 282 270 283 271 if (osTypeId == "WindowsNT4") -
trunk/src/VBox/VMM/CPUM.cpp
r24406 r24416 1383 1383 1384 1384 #ifdef VBOX_WITH_LIVE_MIGRATION 1385 /* 1386 * Guest CPU config and CPUID. 1387 */ 1388 /** @todo config. */ 1389 1385 1390 if (uVersion > CPUM_SAVED_STATE_VERSION_VER3_0) 1386 1391 return cpumR3LoadCpuId(pVM, pSSM, uVersion);
Note:
See TracChangeset
for help on using the changeset viewer.