Changeset 23794 in vbox for trunk/src/VBox/VMM/CPUM.cpp
- Timestamp:
- Oct 15, 2009 11:50:03 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/CPUM.cpp
r23787 r23794 228 228 && uECX == X86_CPUID_VENDOR_AMD_ECX 229 229 && uEDX == X86_CPUID_VENDOR_AMD_EDX) 230 pVM->cpum.s.enmCPUVendor = CPUMCPUVENDOR_AMD; 230 { 231 pVM->cpum.s.enmGuestCpuVendor = pVM->cpum.s.enmHostCpuVendor = CPUMCPUVENDOR_AMD; 232 } 231 233 else if ( uEAX >= 1 232 234 && uEBX == X86_CPUID_VENDOR_INTEL_EBX 233 235 && uECX == X86_CPUID_VENDOR_INTEL_ECX 234 236 && uEDX == X86_CPUID_VENDOR_INTEL_EDX) 235 pVM->cpum.s.enmCPUVendor = CPUMCPUVENDOR_INTEL; 237 { 238 pVM->cpum.s.enmGuestCpuVendor = pVM->cpum.s.enmHostCpuVendor = CPUMCPUVENDOR_INTEL; 239 } 236 240 else /** @todo Via */ 237 pVM->cpum.s.enmCPUVendor = CPUMCPUVENDOR_UNKNOWN; 241 { 242 pVM->cpum.s.enmGuestCpuVendor = pVM->cpum.s.enmHostCpuVendor = CPUMCPUVENDOR_UNKNOWN; 243 } 238 244 239 245 /* … … 400 406 if (pCPUM->fSyntheticCpu) 401 407 { 408 const char szVendor[13] = "VirtualBox "; 409 const char szProcessor[48] = "VirtualBox SPARCx86 Processor v1000 "; /* includes null terminator */ 410 411 pCPUM->enmGuestCpuVendor = CPUMCPUVENDOR_SYNTHETIC; 412 413 /* Vendor */ 414 pCPUM->aGuestCpuIdStd[0].ebx = pCPUM->aGuestCpuIdExt[0].ebx = ((uint32_t *)szVendor)[0]; 415 pCPUM->aGuestCpuIdStd[0].ecx = pCPUM->aGuestCpuIdExt[0].ecx = ((uint32_t *)szVendor)[2]; 416 pCPUM->aGuestCpuIdStd[0].edx = pCPUM->aGuestCpuIdExt[0].edx = ((uint32_t *)szVendor)[1]; 417 418 /* Processor Name String Identifier. */ 419 pCPUM->aGuestCpuIdExt[2].eax = ((uint32_t *)szProcessor)[0]; 420 pCPUM->aGuestCpuIdExt[2].ebx = ((uint32_t *)szProcessor)[1]; 421 pCPUM->aGuestCpuIdExt[2].ecx = ((uint32_t *)szProcessor)[2]; 422 pCPUM->aGuestCpuIdExt[2].edx = ((uint32_t *)szProcessor)[3]; 423 pCPUM->aGuestCpuIdExt[3].eax = ((uint32_t *)szProcessor)[4]; 424 pCPUM->aGuestCpuIdExt[3].ebx = ((uint32_t *)szProcessor)[5]; 425 pCPUM->aGuestCpuIdExt[3].ecx = ((uint32_t *)szProcessor)[6]; 426 pCPUM->aGuestCpuIdExt[3].edx = ((uint32_t *)szProcessor)[7]; 427 pCPUM->aGuestCpuIdExt[4].eax = ((uint32_t *)szProcessor)[8]; 428 pCPUM->aGuestCpuIdExt[4].ebx = ((uint32_t *)szProcessor)[9]; 429 pCPUM->aGuestCpuIdExt[4].ecx = ((uint32_t *)szProcessor)[10]; 430 pCPUM->aGuestCpuIdExt[4].edx = ((uint32_t *)szProcessor)[11]; 431 402 432 /* AMD only; shared feature bits are set dynamically. */ 403 433 pCPUM->aGuestCpuIdExt[1].edx = 0; … … 449 479 #ifdef VBOX_WITH_MULTI_CORE 450 480 if ( pVM->cCpus > 1 451 && pVM->cpum.s.enm CPUVendor == CPUMCPUVENDOR_INTEL)481 && pVM->cpum.s.enmGuestCpuVendor == CPUMCPUVENDOR_INTEL) 452 482 { 453 483 AssertReturn(pVM->cCpus <= 64, VERR_TOO_MANY_CPUS); … … 498 528 if (pCPUM->aGuestCpuIdExt[0].eax >= UINT32_C(0x80000007)) 499 529 { 500 Assert(pVM->cpum.s.enm CPUVendor != CPUMCPUVENDOR_INVALID);530 Assert(pVM->cpum.s.enmGuestCpuVendor != CPUMCPUVENDOR_INVALID); 501 531 502 532 pCPUM->aGuestCpuIdExt[7].eax = pCPUM->aGuestCpuIdExt[7].ebx = pCPUM->aGuestCpuIdExt[7].ecx = 0; 503 533 504 if (pVM->cpum.s.enm CPUVendor == CPUMCPUVENDOR_AMD)534 if (pVM->cpum.s.enmGuestCpuVendor == CPUMCPUVENDOR_AMD) 505 535 { 506 536 /* Only expose the TSC invariant capability bit to the guest. */ … … 543 573 #ifdef VBOX_WITH_MULTI_CORE 544 574 if ( pVM->cCpus > 1 545 && pVM->cpum.s.enm CPUVendor == CPUMCPUVENDOR_AMD)575 && pVM->cpum.s.enmGuestCpuVendor == CPUMCPUVENDOR_AMD) 546 576 { 547 577 /* Legacy method to determine the number of cores. */
Note:
See TracChangeset
for help on using the changeset viewer.