Changeset 49977 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Dec 18, 2013 5:51:13 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 91407
- Location:
- trunk/src/VBox/VMM/VMMR3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/CPUM.cpp
r49972 r49977 1677 1677 } 1678 1678 1679 /* 1680 * MSR fudging. 1681 */ 1682 /** @cfgm{CPUM/FudgeMSRs, boolean, true} 1683 * Fudges some common MSRs if not present in the selected CPU database entry. 1684 * This is for trying to keep VMs running when moved between different hosts 1685 * and different CPU vendors. */ 1686 bool fEnable; 1687 rc = CFGMR3QueryBoolDef(pCpumCfg, "FudgeMSRs", &fEnable, true); AssertRCReturn(rc, rc); 1688 if (fEnable) 1689 { 1690 rc = cpumR3MsrApplyFudge(pVM); 1691 AssertLogRelRCReturn(rc, rc); 1692 } 1679 1693 1680 1694 /* … … 1704 1718 1705 1719 /* Check if PAE was explicitely enabled by the user. */ 1706 bool fEnable;1707 1720 rc = CFGMR3QueryBoolDef(CFGMR3GetRoot(pVM), "EnablePAE", &fEnable, false); AssertRCReturn(rc, rc); 1708 1721 if (fEnable) -
trunk/src/VBox/VMM/VMMR3/CPUMR3Db.cpp
r49972 r49977 439 439 440 440 441 /** 442 * Fudges the MSRs that guest are known to access in some odd cases. 443 * 444 * A typical example is a VM that has been moved between different hosts where 445 * for instance the cpu vendor differs. 446 * 447 * @returns VBox status code. 448 * @param pVM Pointer to the cross context VM structure. 449 */ 450 int cpumR3MsrApplyFudge(PVM pVM) 451 { 452 static CPUMMSRRANGE const s_aFudgeMsrs[] = 453 { 454 MFO(0x00000099, "IA32_P5_MC_ADDR", Ia32P5McAddr), 455 MFX(0x00000001, "IA32_P5_MC_TYPE", Ia32P5McType, Ia32P5McType, 0, 0, UINT64_MAX), 456 MVO(0x00000017, "IA32_PLATFORM_ID", 0), 457 MFN(0x0000001b, "IA32_APIC_BASE", Ia32ApicBase, Ia32ApicBase), 458 MVI(0x0000008b, "BIOS_SIGN", 0), 459 MFX(0x000000fe, "IA32_MTRRCAP", Ia32MtrrCap, ReadOnly, 0x508, 0, 0), 460 MFX(0x00000179, "IA32_MCG_CAP", Ia32McgCap, ReadOnly, 0x005, 0, 0), 461 MFX(0x0000017a, "IA32_MCG_STATUS", Ia32McgStatus, Ia32McgStatus, 0, ~(uint64_t)UINT32_MAX, 0), 462 MFN(0x000001a0, "IA32_MISC_ENABLE", Ia32MiscEnable, Ia32MiscEnable), 463 MFN(0x000001d9, "IA32_DEBUGCTL", Ia32DebugCtl, Ia32DebugCtl), 464 MFO(0x000001db, "P6_LAST_BRANCH_FROM_IP", P6LastBranchFromIp), 465 MFO(0x000001dc, "P6_LAST_BRANCH_TO_IP", P6LastBranchToIp), 466 MFO(0x000001dd, "P6_LAST_INT_FROM_IP", P6LastIntFromIp), 467 MFO(0x000001de, "P6_LAST_INT_TO_IP", P6LastIntToIp), 468 MFS(0x00000277, "IA32_PAT", Ia32Pat, Ia32Pat, Guest.msrPAT), 469 MFZ(0x000002ff, "IA32_MTRR_DEF_TYPE", Ia32MtrrDefType, Ia32MtrrDefType, GuestMsrs.msr.MtrrDefType, 0, ~(uint64_t)0xc07), 470 MFN(0x00000400, "IA32_MCi_CTL_STATUS_ADDR_MISC", Ia32McCtlStatusAddrMiscN, Ia32McCtlStatusAddrMiscN), 471 }; 472 473 for (uint32_t i = 0; i < RT_ELEMENTS(s_aFudgeMsrs); i++) 474 if (!cpumLookupMsrRange(pVM, s_aFudgeMsrs[i].uFirst)) 475 { 476 LogRel(("CPUM: MSR fudge: %#010x %s\n", s_aFudgeMsrs[i].uFirst, s_aFudgeMsrs[i].szName)); 477 int rc = cpumR3MsrRangesInsert(&pVM->cpum.s.GuestInfo.paMsrRangesR3, &pVM->cpum.s.GuestInfo.cMsrRanges, 478 &s_aFudgeMsrs[i]); 479 if (RT_FAILURE(rc)) 480 return rc; 481 } 482 483 return VINF_SUCCESS; 484 } 485 486 441 487 int cpumR3DbGetCpuInfo(const char *pszName, PCPUMINFO pInfo) 442 488 {
Note:
See TracChangeset
for help on using the changeset viewer.