Changeset 5285 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Oct 13, 2007 11:55:58 PM (17 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/CPUM.cpp
r5054 r5285 46 46 *******************************************************************************/ 47 47 /** The saved state version. */ 48 #define CPUM_SAVED_STATE_VERSION 348 #define CPUM_SAVED_STATE_VERSION 4 49 49 50 50 … … 194 194 * Get the host CPUIDs. 195 195 */ 196 for (i = 0; i < ELEMENTS(pVM->cpum.s.aGuestCpuIdStd); i++)196 for (i = 0; i < RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdStd); i++) 197 197 ASMCpuId(i, 198 198 &pCPUM->aGuestCpuIdStd[i].eax, &pCPUM->aGuestCpuIdStd[i].ebx, 199 199 &pCPUM->aGuestCpuIdStd[i].ecx, &pCPUM->aGuestCpuIdStd[i].edx); 200 for (i = 0; i < ELEMENTS(pCPUM->aGuestCpuIdExt); i++)200 for (i = 0; i < RT_ELEMENTS(pCPUM->aGuestCpuIdExt); i++) 201 201 ASMCpuId(0x80000000 + i, 202 202 &pCPUM->aGuestCpuIdExt[i].eax, &pCPUM->aGuestCpuIdExt[i].ebx, 203 203 &pCPUM->aGuestCpuIdExt[i].ecx, &pCPUM->aGuestCpuIdExt[i].edx); 204 for (i = 0; i < RT_ELEMENTS(pCPUM->aGuestCpuIdCentaur); i++) 205 ASMCpuId(0xc0000000 + i, 206 &pCPUM->aGuestCpuIdCentaur[i].eax, &pCPUM->aGuestCpuIdCentaur[i].ebx, 207 &pCPUM->aGuestCpuIdCentaur[i].ecx, &pCPUM->aGuestCpuIdCentaur[i].edx); 208 204 209 205 210 /* … … 246 251 | 0; 247 252 248 #if 1 /* we didn't used to do this, but I guess we should */249 253 /* ASSUMES that this is ALWAYS the AMD define feature set if present. */ 250 254 pCPUM->aGuestCpuIdExt[1].edx &= X86_CPUID_AMD_FEATURE_EDX_FPU … … 270 274 | X86_CPUID_AMD_FEATURE_EDX_FXSR 271 275 | X86_CPUID_AMD_FEATURE_EDX_FFXSR 272 //| X86_CPUID_AMD_FEATURE_EDX_LONG_MODE - definitely not.276 //| X86_CPUID_AMD_FEATURE_EDX_LONG_MODE - not yet. 273 277 | X86_CPUID_AMD_FEATURE_EDX_3DNOW_EX 274 278 | X86_CPUID_AMD_FEATURE_EDX_3DNOW … … 276 280 pCPUM->aGuestCpuIdExt[1].ecx &= 0//X86_CPUID_AMD_FEATURE_ECX_SVM - not virtualized. 277 281 | 0; 278 #endif 279 280 #if 0 /* this is what we used to do. */ 281 /* 282 * Set BrandIndex=0, CLFLUSH-line-size=0, Num-Logical-Cpus=0 and APIC-ID=0. 283 */ 284 pCPUM->aGuestCpuIdStd[1].ebx = 0; 285 286 /* 287 * Set the max standard index to 2. 288 */ 289 pCPUM->aGuestCpuIdStd[0].eax = 2; 290 pCPUM->GuestCpuIdDef = pCPUM->aGuestCpuIdStd[2]; /** @todo this default is *NOT* right for AMD, only Intel CPUs. (see tstInlineAsm) */ 291 292 #else /* this is what we probably should do */ 282 293 283 /* 294 284 * Hide HTT, multicode, SMP, whatever. … … 298 288 299 289 /* 300 * Determin the default value and limit it the number of entries. 301 * Intel returns values of the highest standard function, while AMD returns zeros. 290 * Determin the default. 291 * 292 * Intel returns values of the highest standard function, while AMD 293 * returns zeros. VIA on the other hand seems to returning nothing or 294 * perhaps some random garbage, we don't try duplicate this behavior. 302 295 */ 303 296 ASMCpuId(pCPUM->aGuestCpuIdStd[0].eax + 10, … … 305 298 &pCPUM->GuestCpuIdDef.ecx, &pCPUM->GuestCpuIdDef.edx); 306 299 300 /* 301 * Limit it the number of entries and fill the remaining with the defaults. 302 * 303 * The limits are masking off stuff about power saving and similar, this 304 * is perhaps a bit crudely done as there is probably some relatively harmless 305 * info too in these leaves (like words about having a constant TSC). 306 */ 307 307 if (pCPUM->aGuestCpuIdStd[0].eax > 2) 308 308 pCPUM->aGuestCpuIdStd[0].eax = 2; 309 310 if (pCPUM->aGuestCpuIdExt[0].eax > 0x80000004) 311 pCPUM->aGuestCpuIdExt[0].eax = 0x80000004; 312 313 #endif 314 315 /* 316 * Assign defaults to the entries we chopped off. 317 */ 318 for (i = pCPUM->aGuestCpuIdStd[0].eax + 1; i < ELEMENTS(pCPUM->aGuestCpuIdStd); i++) 309 for (i = pCPUM->aGuestCpuIdStd[0].eax + 1; i < RT_ELEMENTS(pCPUM->aGuestCpuIdStd); i++) 319 310 pCPUM->aGuestCpuIdStd[i] = pCPUM->GuestCpuIdDef; 320 for (i = pCPUM->aGuestCpuIdExt[0].eax - 0x80000000 + 1; i < ELEMENTS(pCPUM->aGuestCpuIdExt); i++) 311 312 if (pCPUM->aGuestCpuIdExt[0].eax > UINT32_C(0x80000004)) 313 pCPUM->aGuestCpuIdExt[0].eax = UINT32_C(0x80000004); 314 for (i = pCPUM->aGuestCpuIdExt[0].eax >= UINT32_C(0x80000000) 315 ? pCPUM->aGuestCpuIdExt[0].eax - UINT32_C(0x80000000) + 1 316 : 0; 317 i < RT_ELEMENTS(pCPUM->aGuestCpuIdExt); i++) 321 318 pCPUM->aGuestCpuIdExt[i] = pCPUM->GuestCpuIdDef; 319 320 /* 321 * Centaur stuff (VIA). 322 * 323 * The important part here (we think) is to make sure the 0xc0000000 324 * function returns 0xc0000001. As for the features, we don't currently 325 * let on about any of those... 326 */ 327 if ( pCPUM->aGuestCpuIdCentaur[0].eax >= UINT32_C(0xc0000000) 328 && pCPUM->aGuestCpuIdCentaur[0].eax <= UINT32_C(0xc0000004)) 329 { 330 pCPUM->aGuestCpuIdCentaur[0].eax = UINT32_C(0xc0000001); 331 pCPUM->aGuestCpuIdCentaur[1].edx = 0; /* all features hidden */ 332 for (i = 2; i < RT_ELEMENTS(pCPUM->aGuestCpuIdCentaur); i++) 333 pCPUM->aGuestCpuIdCentaur[i] = pCPUM->GuestCpuIdDef; 334 } 335 else 336 for (i = 0; i < RT_ELEMENTS(pCPUM->aGuestCpuIdCentaur); i++) 337 pCPUM->aGuestCpuIdCentaur[i] = pCPUM->GuestCpuIdDef; 338 322 339 323 340 /* … … 361 378 362 379 /* next */ 363 if (i & 0x80000000) 380 if ((i & UINT32_C(0xc0000000)) == 0) 381 { 382 pCpuId = &pCPUM->aGuestCpuIdExt[0]; 383 cElements = RT_ELEMENTS(pCPUM->aGuestCpuIdExt); 384 i = UINT32_C(0x80000000); 385 } 386 else if ((i & UINT32_C(0xc0000000)) == UINT32_C(0x80000000)) 387 { 388 pCpuId = &pCPUM->aGuestCpuIdCentaur[0]; 389 cElements = RT_ELEMENTS(pCPUM->aGuestCpuIdCentaur); 390 i = UINT32_C(0xc0000000); 391 } 392 else 364 393 break; 365 pCpuId = &pCPUM->aGuestCpuIdExt[0];366 cElements = ELEMENTS(pCPUM->aGuestCpuIdExt);367 i = 0x80000000;368 394 } 369 395 … … 536 562 SSMR3PutMem(pSSM, &pVM->cpum.s.aGuestCpuIdExt[0], sizeof(pVM->cpum.s.aGuestCpuIdExt)); 537 563 564 SSMR3PutU32(pSSM, ELEMENTS(pVM->cpum.s.aGuestCpuIdCentaur)); 565 SSMR3PutMem(pSSM, &pVM->cpum.s.aGuestCpuIdCentaur[0], sizeof(pVM->cpum.s.aGuestCpuIdCentaur)); 566 538 567 SSMR3PutMem(pSSM, &pVM->cpum.s.GuestCpuIdDef, sizeof(pVM->cpum.s.GuestCpuIdDef)); 539 568 … … 587 616 return VERR_SSM_DATA_UNIT_FORMAT_CHANGED; 588 617 SSMR3GetMem(pSSM, &pVM->cpum.s.aGuestCpuIdExt[0], sizeof(pVM->cpum.s.aGuestCpuIdExt)); 618 619 rc = SSMR3GetU32(pSSM, &cElements); AssertRCReturn(rc, rc); 620 if (cElements != RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdCentaur)) 621 return VERR_SSM_DATA_UNIT_FORMAT_CHANGED; 622 SSMR3GetMem(pSSM, &pVM->cpum.s.aGuestCpuIdCentaur[0], sizeof(pVM->cpum.s.aGuestCpuIdCentaur)); 589 623 590 624 SSMR3GetMem(pSSM, &pVM->cpum.s.GuestCpuIdDef, sizeof(pVM->cpum.s.GuestCpuIdDef)); … … 1491 1525 (uECX >> 0) & 0xff); 1492 1526 } 1527 1528 1529 /* 1530 * Centaur. 1531 */ 1532 unsigned cCentaurMax = pVM->cpum.s.aGuestCpuIdCentaur[0].eax & 0xffff; 1533 1534 pHlp->pfnPrintf(pHlp, 1535 "\n" 1536 " RAW Centaur CPUIDs\n" 1537 " Function eax ebx ecx edx\n"); 1538 for (unsigned i = 0; i <= RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdCentaur); i++) 1539 { 1540 Guest = pVM->cpum.s.aGuestCpuIdCentaur[i]; 1541 ASMCpuId(0xc0000000 | i, &Host.eax, &Host.ebx, &Host.ecx, &Host.edx); 1542 1543 pHlp->pfnPrintf(pHlp, 1544 "Gst: %08x %08x %08x %08x %08x%s\n" 1545 "Hst: %08x %08x %08x %08x\n", 1546 0xc0000000 | i, Guest.eax, Guest.ebx, Guest.ecx, Guest.edx, 1547 i <= cCentaurMax ? "" : "*", 1548 Host.eax, Host.ebx, Host.ecx, Host.edx); 1549 } 1550 1551 /* 1552 * Understandable output 1553 */ 1554 if (iVerbosity && cCentaurMax >= 0) 1555 { 1556 Guest = pVM->cpum.s.aGuestCpuIdCentaur[0]; 1557 pHlp->pfnPrintf(pHlp, 1558 "Centaur Supports: 0xc0000000-%#010x\n", 1559 Guest.eax); 1560 } 1561 1562 if (iVerbosity && cCentaurMax >= 1) 1563 { 1564 ASMCpuId(0xc0000001, &Host.eax, &Host.ebx, &Host.ecx, &Host.edx); 1565 uint32_t uEdxGst = pVM->cpum.s.aGuestCpuIdExt[1].edx; 1566 uint32_t uEdxHst = Host.edx; 1567 1568 if (iVerbosity == 1) 1569 { 1570 pHlp->pfnPrintf(pHlp, "Centaur Features EDX: "); 1571 if (uEdxGst & RT_BIT(0)) pHlp->pfnPrintf(pHlp, " AIS"); 1572 if (uEdxGst & RT_BIT(1)) pHlp->pfnPrintf(pHlp, " AIS-E"); 1573 if (uEdxGst & RT_BIT(2)) pHlp->pfnPrintf(pHlp, " RNG"); 1574 if (uEdxGst & RT_BIT(3)) pHlp->pfnPrintf(pHlp, " RNG-E"); 1575 if (uEdxGst & RT_BIT(4)) pHlp->pfnPrintf(pHlp, " LH"); 1576 if (uEdxGst & RT_BIT(5)) pHlp->pfnPrintf(pHlp, " FEMMS"); 1577 if (uEdxGst & RT_BIT(6)) pHlp->pfnPrintf(pHlp, " ACE"); 1578 if (uEdxGst & RT_BIT(7)) pHlp->pfnPrintf(pHlp, " ACE-E"); 1579 /* possibly indicating MM/HE and MM/HE-E on older chips... */ 1580 if (uEdxGst & RT_BIT(8)) pHlp->pfnPrintf(pHlp, " ACE2"); 1581 if (uEdxGst & RT_BIT(9)) pHlp->pfnPrintf(pHlp, " ACE2-E"); 1582 if (uEdxGst & RT_BIT(10)) pHlp->pfnPrintf(pHlp, " PHE"); 1583 if (uEdxGst & RT_BIT(11)) pHlp->pfnPrintf(pHlp, " PHE-E"); 1584 if (uEdxGst & RT_BIT(12)) pHlp->pfnPrintf(pHlp, " PMM"); 1585 if (uEdxGst & RT_BIT(13)) pHlp->pfnPrintf(pHlp, " PMM-E"); 1586 for (unsigned iBit = 14; iBit < 32; iBit++) 1587 if (uEdxGst & RT_BIT(iBit)) 1588 pHlp->pfnPrintf(pHlp, " %d", iBit); 1589 pHlp->pfnPrintf(pHlp, "\n"); 1590 } 1591 else 1592 { 1593 pHlp->pfnPrintf(pHlp, "Mnemonic - Description = guest (host)\n"); 1594 pHlp->pfnPrintf(pHlp, "AIS - Alternate Instruction Set = %d (%d)\n", !!(uEdxGst & RT_BIT( 0)), !!(uEdxHst & RT_BIT( 0))); 1595 pHlp->pfnPrintf(pHlp, "AIS-E - AIS enabled = %d (%d)\n", !!(uEdxGst & RT_BIT( 1)), !!(uEdxHst & RT_BIT( 1))); 1596 pHlp->pfnPrintf(pHlp, "RNG - Random Number Generator = %d (%d)\n", !!(uEdxGst & RT_BIT( 2)), !!(uEdxHst & RT_BIT( 2))); 1597 pHlp->pfnPrintf(pHlp, "RNG-E - RNG enabled = %d (%d)\n", !!(uEdxGst & RT_BIT( 3)), !!(uEdxHst & RT_BIT( 3))); 1598 pHlp->pfnPrintf(pHlp, "LH - LongHaul MSR 0000_110Ah = %d (%d)\n", !!(uEdxGst & RT_BIT( 4)), !!(uEdxHst & RT_BIT( 4))); 1599 pHlp->pfnPrintf(pHlp, "FEMMS - FEMMS = %d (%d)\n", !!(uEdxGst & RT_BIT( 5)), !!(uEdxHst & RT_BIT( 5))); 1600 pHlp->pfnPrintf(pHlp, "ACE - Advanced Cryptography Engine = %d (%d)\n", !!(uEdxGst & RT_BIT( 6)), !!(uEdxHst & RT_BIT( 6))); 1601 pHlp->pfnPrintf(pHlp, "ACE-E - ACE enabled = %d (%d)\n", !!(uEdxGst & RT_BIT( 7)), !!(uEdxHst & RT_BIT( 7))); 1602 /* possibly indicating MM/HE and MM/HE-E on older chips... */ 1603 pHlp->pfnPrintf(pHlp, "ACE2 - Advanced Cryptography Engine 2 = %d (%d)\n", !!(uEdxGst & RT_BIT( 8)), !!(uEdxHst & RT_BIT( 8))); 1604 pHlp->pfnPrintf(pHlp, "ACE2-E - ACE enabled = %d (%d)\n", !!(uEdxGst & RT_BIT( 9)), !!(uEdxHst & RT_BIT( 9))); 1605 pHlp->pfnPrintf(pHlp, "PHE - Hash Engine = %d (%d)\n", !!(uEdxGst & RT_BIT(10)), !!(uEdxHst & RT_BIT(10))); 1606 pHlp->pfnPrintf(pHlp, "PHE-E - PHE enabled = %d (%d)\n", !!(uEdxGst & RT_BIT(11)), !!(uEdxHst & RT_BIT(11))); 1607 pHlp->pfnPrintf(pHlp, "PMM - Montgomery Multiplier = %d (%d)\n", !!(uEdxGst & RT_BIT(12)), !!(uEdxHst & RT_BIT(12))); 1608 pHlp->pfnPrintf(pHlp, "PMM-E - PMM enabled = %d (%d)\n", !!(uEdxGst & RT_BIT(13)), !!(uEdxHst & RT_BIT(13))); 1609 for (unsigned iBit = 14; iBit < 32; iBit++) 1610 if ((uEdxGst | uEdxHst) & RT_BIT(iBit)) 1611 pHlp->pfnPrintf(pHlp, "Bit %d = %d (%d)\n", !!(uEdxGst & RT_BIT(iBit)), !!(uEdxHst & RT_BIT(iBit))); 1612 pHlp->pfnPrintf(pHlp, "\n"); 1613 } 1614 } 1493 1615 } 1494 1616 -
trunk/src/VBox/VMM/CPUMInternal.h
r4958 r5285 332 332 /** The extended set of CpuId leafs. */ 333 333 CPUMCPUID aGuestCpuIdExt[10]; 334 /** The centaur set of CpuId leafs. */ 335 CPUMCPUID aGuestCpuIdCentaur[2]; 334 336 /** The default set of CpuId leafs. */ 335 337 CPUMCPUID GuestCpuIdDef; -
trunk/src/VBox/VMM/CPUMInternal.mac
r4958 r5285 6 6 ; 7 7 ; Copyright (C) 2006-2007 innotek GmbH 8 ; 8 ; 9 9 ; This file is part of VirtualBox Open Source Edition (OSE), as 10 10 ; available from http://www.virtualbox.org. This file is free software; … … 382 382 .aGuestCpuIdStd resb 16*5 383 383 .aGuestCpuIdExt resb 16*10 384 .aGuestCpuIdCentaur resb 16*2 384 385 .GuestCpuIdDef resb 16 385 386 -
trunk/src/VBox/VMM/PATM/PATMA.asm
r4071 r5285 5 5 6 6 ; Copyright (C) 2006-2007 innotek GmbH 7 ; 7 ; 8 8 ; This file is part of VirtualBox Open Source Edition (OSE), as 9 9 ; available from http://www.virtualbox.org. This file is free software; … … 1533 1533 cmp eax, PATM_CPUID_EXT_MAX 1534 1534 jb cpuid_ext 1535 cmp eax, 0xc0000000 1536 jb cpuid_def 1537 cmp eax, PATM_CPUID_CENTAUR_MAX 1538 jb cpuid_centaur 1535 1539 1536 1540 cpuid_def: … … 1541 1545 mov edx, PATM_CPUID_STD_PTR 1542 1546 jmp cpuid_calc 1547 1543 1548 cpuid_ext: 1544 1549 and eax, 0ffh ; strictly speaking not necessary. 1545 1550 mov edx, PATM_CPUID_EXT_PTR 1551 jmp cpuid_calc 1552 1553 cpuid_centaur: 1554 and eax, 0ffh ; strictly speaking not necessary. 1555 mov edx, PATM_CPUID_CENTAUR_PTR 1556 1546 1557 cpuid_calc: 1547 1558 lea eax, [ss:eax * 4] ; 4 entries... -
trunk/src/VBox/VMM/PATM/PATMA.h
r4071 r5285 50 50 #define PATM_CALL_PATCH_TARGET_ADDR 0xF1ABCD18 51 51 #define PATM_CALL_RETURN_ADDR 0xF1ABCD19 52 #define PATM_CPUID_CENTAUR_PTR 0xF1ABCD1a 52 53 53 54 /* Anything larger doesn't require a fixup */ … … 64 65 #define PATM_LOOKUP_AND_JUMP_FUNCTION 0xF1ABCE09 /** Relative address of global PATM lookup and jump function. */ 65 66 #define PATM_IRET_FUNCTION 0xF1ABCE0A /** Relative address of global PATM iret function. */ 67 #define PATM_CPUID_CENTAUR_MAX 0xF1ABCE0B 66 68 67 69 // everything except IOPL, NT, IF, VM, VIF, VIP and RF -
trunk/src/VBox/VMM/PATM/PATMA.mac
r4071 r5285 6 6 ; 7 7 ; Copyright (C) 2006-2007 innotek GmbH 8 ; 8 ; 9 9 ; This file is part of VirtualBox Open Source Edition (OSE), as 10 10 ; available from http://www.virtualbox.org. This file is free software; … … 48 48 %define PATM_CALL_PATCH_TARGET_ADDR 0xF1ABCD18 49 49 %define PATM_CALL_RETURN_ADDR 0xF1ABCD19 50 %define PATM_CPUID_CENTAUR_PTR 0xF1ABCD1A 50 51 51 52 ;/* Anything larger doesn't require a fixup */ … … 62 63 %define PATM_LOOKUP_AND_JUMP_FUNCTION 0xF1ABCE09 ; /** Relative address of global PATM lookup and jump function. */ 63 64 %define PATM_IRET_FUNCTION 0xF1ABCE0A ; /** Relative address of global PATM iret function. */ 65 %define PATM_CPUID_CENTAUR_MAX 0xF1ABCE0B 64 66 65 67 -
trunk/src/VBox/VMM/PATM/PATMPatch.cpp
r4071 r5285 234 234 break; 235 235 236 case PATM_CPUID_CENTAUR_PTR: 237 dest = CPUMGetGuestCpuIdCentaurGCPtr(pVM); 238 break; 239 236 240 case PATM_CPUID_DEF_PTR: 237 241 dest = CPUMGetGuestCpuIdDefGCPtr(pVM); … … 244 248 case PATM_CPUID_EXT_MAX: 245 249 dest = CPUMGetGuestCpuIdExtMax(pVM); 250 break; 251 252 case PATM_CPUID_CENTAUR_MAX: 253 dest = CPUMGetGuestCpuIdCentaurMax(pVM); 246 254 break; 247 255 … … 1282 1290 1283 1291 Log(("patmPatchGenMovFromSS %VGv\n", pCurInstrGC)); 1284 1292 1285 1293 Assert(pPatch->flags & PATMFL_CODE32); 1286 1294 -
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r4958 r5285 801 801 if (iLeaf < ELEMENTS(pVM->cpum.s.aGuestCpuIdStd)) 802 802 pCpuId = &pVM->cpum.s.aGuestCpuIdStd[iLeaf]; 803 else if (iLeaf - UINT32_C(0x80000000) < ELEMENTS(pVM->cpum.s.aGuestCpuIdExt))803 else if (iLeaf - UINT32_C(0x80000000) < RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdExt)) 804 804 pCpuId = &pVM->cpum.s.aGuestCpuIdExt[iLeaf - UINT32_C(0x80000000)]; 805 else if (iLeaf - UINT32_C(0xc0000000) < RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdCentaur)) 806 pCpuId = &pVM->cpum.s.aGuestCpuIdCentaur[iLeaf - UINT32_C(0xc0000000)]; 805 807 else 806 808 pCpuId = &pVM->cpum.s.GuestCpuIdDef; … … 842 844 843 845 /** 846 * Gets a pointer to the array of centaur CPUID leafs. 847 * 848 * CPUMGetGuestCpuIdCentaurMax() give the size of the array. 849 * 850 * @returns Pointer to the centaur CPUID leafs (read-only). 851 * @param pVM The VM handle. 852 * @remark Intended for PATM. 853 */ 854 CPUMDECL(GCPTRTYPE(PCCPUMCPUID)) CPUMGetGuestCpuIdCentaurGCPtr(PVM pVM) 855 { 856 return GCPTRTYPE(PCCPUMCPUID)VM_GUEST_ADDR(pVM, &pVM->cpum.s.aGuestCpuIdCentaur[0]); 857 } 858 859 /** 844 860 * Gets a pointer to the default CPUID leaf. 845 861 * … … 860 876 * @remark Intended for PATM. 861 877 */ 862 CPUMDECL(uint32_t) 863 { 864 return ELEMENTS(pVM->cpum.s.aGuestCpuIdStd);878 CPUMDECL(uint32_t) CPUMGetGuestCpuIdStdMax(PVM pVM) 879 { 880 return RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdStd); 865 881 } 866 882 … … 872 888 * @remark Intended for PATM. 873 889 */ 874 CPUMDECL(uint32_t) CPUMGetGuestCpuIdExtMax(PVM pVM) 875 { 876 return ELEMENTS(pVM->cpum.s.aGuestCpuIdStd); 890 CPUMDECL(uint32_t) CPUMGetGuestCpuIdExtMax(PVM pVM) 891 { 892 return RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdExt); 893 } 894 895 /** 896 * Gets a number of centaur CPUID leafs. 897 * 898 * @returns Number of leafs. 899 * @param pVM The VM handle. 900 * @remark Intended for PATM. 901 */ 902 CPUMDECL(uint32_t) CPUMGetGuestCpuIdCentaurMax(PVM pVM) 903 { 904 return RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdCentaur); 877 905 } 878 906
Note:
See TracChangeset
for help on using the changeset viewer.