儲存庫 vbox 的更動 50157
- 時間撮記:
- 2014-1-22 上午02:07:16 (11 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/VMM/VMMR3/CPUMR3Db.cpp
r49993 r50157 191 191 * The database entries. 192 192 * 193 * Warning! The first entry is special. It is the fallback for unknown 194 * processors. Thus, it better be pretty representative. 193 * 1. The first entry is special. It is the fallback for unknown 194 * processors. Thus, it better be pretty representative. 195 * 196 * 2. The first entry for a CPU vendor is likewise important as it is 197 * the default entry for that vendor. 198 * 199 * Generally we put the most recent CPUs first, since these tend to have the 200 * most complicated and backwards compatible list of MSRs. 195 201 */ 196 202 static CPUMDBENTRY const * const g_apCpumDbEntries[] = … … 557 563 if ((CPUMCPUVENDOR)pCur->enmVendor == enmVendor) 558 564 { 559 /* Anything from the same vendor is better than nothing: */ 560 if (!pEntry) 561 pEntry = pCur; 562 /* Newer micro arch is better than an older one: */ 563 else if ( pEntry->enmMicroarch < enmMicroarch 564 && pCur->enmMicroarch >= enmMicroarch) 565 pEntry = pCur; 566 /* Prefer a micro arch match: */ 567 else if ( pEntry->enmMicroarch != enmMicroarch 568 && pCur->enmMicroarch == enmMicroarch) 569 pEntry = pCur; 570 /* If the micro arch matches, check model and stepping. Stop 571 looping if we get an exact match. */ 572 else if ( pEntry->enmMicroarch == enmMicroarch 573 && pCur->enmMicroarch == enmMicroarch) 565 /* Match against Family, Microarch, model and stepping. Except 566 for family, always match the closer with preference given to 567 the later/older ones. */ 568 if (pCur->uFamily == uFamily) 574 569 { 575 if (pCur-> uModel == uModel)570 if (pCur->enmMicroarch == enmMicroarch) 576 571 { 577 /* Perfect match? */ 578 if (pCur->uStepping == uStepping) 572 if (pCur->uModel == uModel) 579 573 { 574 if (pCur->uStepping == uStepping) 575 { 576 /* Perfect match. */ 577 pEntry = pCur; 578 break; 579 } 580 581 if ( !pEntry 582 || pEntry->uModel != uModel 583 || pEntry->enmMicroarch != enmMicroarch 584 || pEntry->uFamily != uFamily) 585 pEntry = pCur; 586 else if ( pCur->uStepping >= uStepping 587 ? pCur->uStepping < pEntry->uStepping || pEntry->uStepping < uStepping 588 : pCur->uStepping > pEntry->uStepping) 589 pEntry = pCur; 590 } 591 else if ( !pEntry 592 || pEntry->enmMicroarch != enmMicroarch 593 || pEntry->uFamily != uFamily) 580 594 pEntry = pCur; 581 break; 582 } 583 584 /* Better model match? */ 585 if (pEntry->uModel != uModel) 586 pEntry = pCur; 587 /* The one with the closest stepping, prefering ones over earlier ones. */ 588 else if ( pCur->uStepping > uStepping 589 ? pCur->uStepping < pEntry->uStepping || pEntry->uStepping < uStepping 590 : pCur->uStepping > pEntry->uStepping) 595 else if ( pCur->uModel >= uModel 596 ? pCur->uModel < pEntry->uModel || pEntry->uModel < uModel 597 : pCur->uModel > pEntry->uModel) 591 598 pEntry = pCur; 592 599 } 593 /* The one with the closest model, prefering later ones over earlier ones. */ 594 else if ( pCur->uModel > uModel 595 ? pCur->uModel < pEntry->uModel || pEntry->uModel < uModel 596 : pCur->uModel > pEntry->uModel) 600 else if ( !pEntry 601 || pEntry->uFamily != uFamily) 602 pEntry = pCur; 603 else if ( pCur->enmMicroarch >= enmMicroarch 604 ? pCur->enmMicroarch < pEntry->enmMicroarch || pEntry->enmMicroarch < enmMicroarch 605 : pCur->enmMicroarch > pEntry->enmMicroarch) 597 606 pEntry = pCur; 598 607 } 608 /* We don't do closeness matching on family, we use the first 609 entry for the CPU vendor instead. (P4 workaround.) */ 610 else if (!pEntry) 611 pEntry = pCur; 599 612 } 600 613 }
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器