vbox的更動 54714 路徑 trunk/src/VBox/VMM/VMMAll
- 時間撮記:
- 2015-3-11 下午02:00:23 (10 年 以前)
- 位置:
- trunk/src/VBox/VMM/VMMAll
- 檔案:
-
- 修改 2 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp
r54674 r54714 1328 1328 PVM pVM = pVCpu->CTX_SUFF(pVM); 1329 1329 uint64_t const uOldEfer = pVCpu->cpum.s.Guest.msrEFER; 1330 uint32_t const fExtFeatures = pVM->cpum.s.aGuestCpuIdPatmExt[0]. eax >= 0x800000011331 ? pVM->cpum.s.aGuestCpuIdPatmExt[1]. edx1330 uint32_t const fExtFeatures = pVM->cpum.s.aGuestCpuIdPatmExt[0].uEax >= 0x80000001 1331 ? pVM->cpum.s.aGuestCpuIdPatmExt[1].uEdx 1332 1332 : 0; 1333 1333 uint64_t fMask = 0; -
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r54674 r54714 1179 1179 if (uSubLeaf < paLeaves[i].uSubLeaf) 1180 1180 while ( i > 0 1181 && uLeaf == paLeaves[i ].uLeaf1182 && uSubLeaf < paLeaves[i].uSubLeaf)1181 && uLeaf == paLeaves[i - 1].uLeaf 1182 && uSubLeaf <= paLeaves[i - 1].uSubLeaf) 1183 1183 i--; 1184 1184 else … … 1217 1217 pCpuId = &pVM->cpum.s.aGuestCpuIdPatmExt[iLeaf - UINT32_C(0x80000000)]; 1218 1218 else if ( iLeaf - UINT32_C(0x40000000) < 0x100 /** @todo Fix this later: Hyper-V says 0x400000FF is the last valid leaf. */ 1219 && (pVCpu->CTX_SUFF(pVM)->cpum.s.aGuestCpuIdPatmStd[1]. ecx & X86_CPUID_FEATURE_ECX_HVP)) /* Only report if HVP bit set. */1219 && (pVCpu->CTX_SUFF(pVM)->cpum.s.aGuestCpuIdPatmStd[1].uEcx & X86_CPUID_FEATURE_ECX_HVP)) /* Only report if HVP bit set. */ 1220 1220 { 1221 1221 PCPUMCPUIDLEAF pHyperLeaf = cpumCpuIdGetLeaf(pVM, iLeaf, 0 /* uSubLeaf */); … … 1240 1240 uint32_t cCurrentCacheIndex = *pEcx; 1241 1241 1242 *pEax = pCpuId-> eax;1243 *pEbx = pCpuId-> ebx;1244 *pEcx = pCpuId-> ecx;1245 *pEdx = pCpuId-> edx;1242 *pEax = pCpuId->uEax; 1243 *pEbx = pCpuId->uEbx; 1244 *pEcx = pCpuId->uEcx; 1245 *pEdx = pCpuId->uEdx; 1246 1246 1247 1247 if ( iLeaf == 1) … … 1328 1328 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x00000001), 0); 1329 1329 if (pLeaf) 1330 pVM->cpum.s.aGuestCpuIdPatmStd[1]. edx = pLeaf->uEdx |= X86_CPUID_FEATURE_EDX_APIC;1330 pVM->cpum.s.aGuestCpuIdPatmStd[1].uEdx = pLeaf->uEdx |= X86_CPUID_FEATURE_EDX_APIC; 1331 1331 1332 1332 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x80000001), 0); 1333 1333 if ( pLeaf 1334 1334 && pVM->cpum.s.GuestFeatures.enmCpuVendor == CPUMCPUVENDOR_AMD) 1335 pVM->cpum.s.aGuestCpuIdPatmExt[1]. edx = pLeaf->uEdx |= X86_CPUID_AMD_FEATURE_EDX_APIC;1335 pVM->cpum.s.aGuestCpuIdPatmExt[1].uEdx = pLeaf->uEdx |= X86_CPUID_AMD_FEATURE_EDX_APIC; 1336 1336 1337 1337 pVM->cpum.s.GuestFeatures.fApic = 1; … … 1345 1345 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x00000001), 0); 1346 1346 if (pLeaf) 1347 pVM->cpum.s.aGuestCpuIdPatmStd[1]. ecx = pLeaf->uEcx |= X86_CPUID_FEATURE_ECX_X2APIC;1347 pVM->cpum.s.aGuestCpuIdPatmStd[1].uEcx = pLeaf->uEcx |= X86_CPUID_FEATURE_ECX_X2APIC; 1348 1348 pVM->cpum.s.GuestFeatures.fX2Apic = 1; 1349 1349 LogRel(("CPUM: SetGuestCpuIdFeature: Enabled x2APIC\n")); … … 1363 1363 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x00000001), 0); 1364 1364 if (pLeaf) 1365 pVM->cpum.s.aGuestCpuIdPatmStd[1]. edx = pLeaf->uEdx |= X86_CPUID_FEATURE_EDX_SEP;1365 pVM->cpum.s.aGuestCpuIdPatmStd[1].uEdx = pLeaf->uEdx |= X86_CPUID_FEATURE_EDX_SEP; 1366 1366 pVM->cpum.s.GuestFeatures.fSysEnter = 1; 1367 1367 LogRel(("CPUM: SetGuestCpuIdFeature: Enabled SYSENTER/EXIT\n")); … … 1390 1390 1391 1391 /* Valid for both Intel and AMD CPUs, although only in 64 bits mode for Intel. */ 1392 pVM->cpum.s.aGuestCpuIdPatmExt[1]. edx = pLeaf->uEdx |= X86_CPUID_EXT_FEATURE_EDX_SYSCALL;1392 pVM->cpum.s.aGuestCpuIdPatmExt[1].uEdx = pLeaf->uEdx |= X86_CPUID_EXT_FEATURE_EDX_SYSCALL; 1393 1393 pVM->cpum.s.GuestFeatures.fSysCall = 1; 1394 1394 LogRel(("CPUM: SetGuestCpuIdFeature: Enabled SYSCALL/RET\n")); … … 1408 1408 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x00000001), 0); 1409 1409 if (pLeaf) 1410 pVM->cpum.s.aGuestCpuIdPatmStd[1]. edx = pLeaf->uEdx |= X86_CPUID_FEATURE_EDX_PAE;1410 pVM->cpum.s.aGuestCpuIdPatmStd[1].uEdx = pLeaf->uEdx |= X86_CPUID_FEATURE_EDX_PAE; 1411 1411 1412 1412 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x80000001), 0); 1413 1413 if ( pLeaf 1414 1414 && pVM->cpum.s.GuestFeatures.enmCpuVendor == CPUMCPUVENDOR_AMD) 1415 pVM->cpum.s.aGuestCpuIdPatmExt[1]. edx = pLeaf->uEdx |= X86_CPUID_AMD_FEATURE_EDX_PAE;1415 pVM->cpum.s.aGuestCpuIdPatmExt[1].uEdx = pLeaf->uEdx |= X86_CPUID_AMD_FEATURE_EDX_PAE; 1416 1416 1417 1417 pVM->cpum.s.GuestFeatures.fPae = 1; … … 1433 1433 1434 1434 /* Valid for both Intel and AMD. */ 1435 pVM->cpum.s.aGuestCpuIdPatmExt[1]. edx = pLeaf->uEdx |= X86_CPUID_EXT_FEATURE_EDX_LONG_MODE;1435 pVM->cpum.s.aGuestCpuIdPatmExt[1].uEdx = pLeaf->uEdx |= X86_CPUID_EXT_FEATURE_EDX_LONG_MODE; 1436 1436 pVM->cpum.s.GuestFeatures.fLongMode = 1; 1437 1437 LogRel(("CPUM: SetGuestCpuIdFeature: Enabled LONG MODE\n")); … … 1452 1452 1453 1453 /* Valid for both Intel and AMD. */ 1454 pVM->cpum.s.aGuestCpuIdPatmExt[1]. edx = pLeaf->uEdx |= X86_CPUID_EXT_FEATURE_EDX_NX;1454 pVM->cpum.s.aGuestCpuIdPatmExt[1].uEdx = pLeaf->uEdx |= X86_CPUID_EXT_FEATURE_EDX_NX; 1455 1455 pVM->cpum.s.GuestFeatures.fNoExecute = 1; 1456 1456 LogRel(("CPUM: SetGuestCpuIdFeature: Enabled NX\n")); … … 1472 1472 1473 1473 /* Valid for both Intel and AMD. */ 1474 pVM->cpum.s.aGuestCpuIdPatmExt[1]. ecx = pLeaf->uEcx |= X86_CPUID_EXT_FEATURE_ECX_LAHF_SAHF;1474 pVM->cpum.s.aGuestCpuIdPatmExt[1].uEcx = pLeaf->uEcx |= X86_CPUID_EXT_FEATURE_ECX_LAHF_SAHF; 1475 1475 pVM->cpum.s.GuestFeatures.fLahfSahf = 1; 1476 1476 LogRel(("CPUM: SetGuestCpuIdFeature: Enabled LAHF/SAHF\n")); … … 1485 1485 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x00000001), 0); 1486 1486 if (pLeaf) 1487 pVM->cpum.s.aGuestCpuIdPatmStd[1]. edx = pLeaf->uEdx |= X86_CPUID_FEATURE_EDX_PAT;1487 pVM->cpum.s.aGuestCpuIdPatmStd[1].uEdx = pLeaf->uEdx |= X86_CPUID_FEATURE_EDX_PAT; 1488 1488 1489 1489 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x80000001), 0); 1490 1490 if ( pLeaf 1491 1491 && pVM->cpum.s.GuestFeatures.enmCpuVendor == CPUMCPUVENDOR_AMD) 1492 pVM->cpum.s.aGuestCpuIdPatmExt[1]. edx = pLeaf->uEdx |= X86_CPUID_AMD_FEATURE_EDX_PAT;1492 pVM->cpum.s.aGuestCpuIdPatmExt[1].uEdx = pLeaf->uEdx |= X86_CPUID_AMD_FEATURE_EDX_PAT; 1493 1493 1494 1494 pVM->cpum.s.GuestFeatures.fPat = 1; … … 1512 1512 1513 1513 /* Valid for both Intel and AMD. */ 1514 pVM->cpum.s.aGuestCpuIdPatmExt[1]. edx = pLeaf->uEdx |= X86_CPUID_EXT_FEATURE_EDX_RDTSCP;1514 pVM->cpum.s.aGuestCpuIdPatmExt[1].uEdx = pLeaf->uEdx |= X86_CPUID_EXT_FEATURE_EDX_RDTSCP; 1515 1515 pVM->cpum.s.HostFeatures.fRdTscP = 1; 1516 1516 LogRel(("CPUM: SetGuestCpuIdFeature: Enabled RDTSCP.\n")); … … 1523 1523 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x00000001), 0); 1524 1524 if (pLeaf) 1525 pVM->cpum.s.aGuestCpuIdPatmStd[1]. ecx = pLeaf->uEcx |= X86_CPUID_FEATURE_ECX_HVP;1525 pVM->cpum.s.aGuestCpuIdPatmStd[1].uEcx = pLeaf->uEcx |= X86_CPUID_FEATURE_ECX_HVP; 1526 1526 pVM->cpum.s.GuestFeatures.fHypervisorPresent = 1; 1527 1527 LogRel(("CPUM: SetGuestCpuIdFeature: Enabled Hypervisor Present bit\n")); … … 1542 1542 1543 1543 /* Valid for both Intel and AMD. */ 1544 pVM->cpum.s.aGuestCpuIdPatmStd[5]. ecx = pLeaf->uEcx |= X86_CPUID_MWAIT_ECX_EXT | X86_CPUID_MWAIT_ECX_BREAKIRQIF0;1544 pVM->cpum.s.aGuestCpuIdPatmStd[5].uEcx = pLeaf->uEcx |= X86_CPUID_MWAIT_ECX_EXT | X86_CPUID_MWAIT_ECX_BREAKIRQIF0; 1545 1545 pVM->cpum.s.GuestFeatures.fMWaitExtensions = 1; 1546 1546 LogRel(("CPUM: SetGuestCpuIdFeature: Enabled MWAIT Extensions.\n")); … … 1607 1607 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x00000001), 0); 1608 1608 if (pLeaf) 1609 pVM->cpum.s.aGuestCpuIdPatmStd[1]. edx = pLeaf->uEdx &= ~X86_CPUID_FEATURE_EDX_APIC;1609 pVM->cpum.s.aGuestCpuIdPatmStd[1].uEdx = pLeaf->uEdx &= ~X86_CPUID_FEATURE_EDX_APIC; 1610 1610 1611 1611 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x80000001), 0); 1612 1612 if ( pLeaf 1613 1613 && pVM->cpum.s.GuestFeatures.enmCpuVendor == CPUMCPUVENDOR_AMD) 1614 pVM->cpum.s.aGuestCpuIdPatmExt[1]. edx = pLeaf->uEdx &= ~X86_CPUID_AMD_FEATURE_EDX_APIC;1614 pVM->cpum.s.aGuestCpuIdPatmExt[1].uEdx = pLeaf->uEdx &= ~X86_CPUID_AMD_FEATURE_EDX_APIC; 1615 1615 1616 1616 pVM->cpum.s.GuestFeatures.fApic = 0; … … 1621 1621 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x00000001), 0); 1622 1622 if (pLeaf) 1623 pVM->cpum.s.aGuestCpuIdPatmStd[1]. ecx = pLeaf->uEcx &= ~X86_CPUID_FEATURE_ECX_X2APIC;1623 pVM->cpum.s.aGuestCpuIdPatmStd[1].uEcx = pLeaf->uEcx &= ~X86_CPUID_FEATURE_ECX_X2APIC; 1624 1624 pVM->cpum.s.GuestFeatures.fX2Apic = 0; 1625 1625 Log(("CPUM: ClearGuestCpuIdFeature: Disabled x2APIC\n")); … … 1629 1629 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x00000001), 0); 1630 1630 if (pLeaf) 1631 pVM->cpum.s.aGuestCpuIdPatmStd[1]. edx = pLeaf->uEdx &= ~X86_CPUID_FEATURE_EDX_PAE;1631 pVM->cpum.s.aGuestCpuIdPatmStd[1].uEdx = pLeaf->uEdx &= ~X86_CPUID_FEATURE_EDX_PAE; 1632 1632 1633 1633 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x80000001), 0); 1634 1634 if ( pLeaf 1635 1635 && pVM->cpum.s.GuestFeatures.enmCpuVendor == CPUMCPUVENDOR_AMD) 1636 pVM->cpum.s.aGuestCpuIdPatmExt[1]. edx = pLeaf->uEdx &= ~X86_CPUID_AMD_FEATURE_EDX_PAE;1636 pVM->cpum.s.aGuestCpuIdPatmExt[1].uEdx = pLeaf->uEdx &= ~X86_CPUID_AMD_FEATURE_EDX_PAE; 1637 1637 1638 1638 pVM->cpum.s.GuestFeatures.fPae = 0; … … 1643 1643 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x00000001), 0); 1644 1644 if (pLeaf) 1645 pVM->cpum.s.aGuestCpuIdPatmStd[1]. edx = pLeaf->uEdx &= ~X86_CPUID_FEATURE_EDX_PAT;1645 pVM->cpum.s.aGuestCpuIdPatmStd[1].uEdx = pLeaf->uEdx &= ~X86_CPUID_FEATURE_EDX_PAT; 1646 1646 1647 1647 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x80000001), 0); 1648 1648 if ( pLeaf 1649 1649 && pVM->cpum.s.GuestFeatures.enmCpuVendor == CPUMCPUVENDOR_AMD) 1650 pVM->cpum.s.aGuestCpuIdPatmExt[1]. edx = pLeaf->uEdx &= ~X86_CPUID_AMD_FEATURE_EDX_PAT;1650 pVM->cpum.s.aGuestCpuIdPatmExt[1].uEdx = pLeaf->uEdx &= ~X86_CPUID_AMD_FEATURE_EDX_PAT; 1651 1651 1652 1652 pVM->cpum.s.GuestFeatures.fPat = 0; … … 1657 1657 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x80000001), 0); 1658 1658 if (pLeaf) 1659 pVM->cpum.s.aGuestCpuIdPatmExt[1]. edx = pLeaf->uEdx &= ~X86_CPUID_EXT_FEATURE_EDX_LONG_MODE;1659 pVM->cpum.s.aGuestCpuIdPatmExt[1].uEdx = pLeaf->uEdx &= ~X86_CPUID_EXT_FEATURE_EDX_LONG_MODE; 1660 1660 pVM->cpum.s.GuestFeatures.fLongMode = 0; 1661 1661 break; … … 1664 1664 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x80000001), 0); 1665 1665 if (pLeaf) 1666 pVM->cpum.s.aGuestCpuIdPatmExt[1]. ecx = pLeaf->uEcx &= ~X86_CPUID_EXT_FEATURE_ECX_LAHF_SAHF;1666 pVM->cpum.s.aGuestCpuIdPatmExt[1].uEcx = pLeaf->uEcx &= ~X86_CPUID_EXT_FEATURE_ECX_LAHF_SAHF; 1667 1667 pVM->cpum.s.GuestFeatures.fLahfSahf = 0; 1668 1668 break; … … 1671 1671 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x80000001), 0); 1672 1672 if (pLeaf) 1673 pVM->cpum.s.aGuestCpuIdPatmExt[1]. edx = pLeaf->uEdx &= ~X86_CPUID_EXT_FEATURE_EDX_RDTSCP;1673 pVM->cpum.s.aGuestCpuIdPatmExt[1].uEdx = pLeaf->uEdx &= ~X86_CPUID_EXT_FEATURE_EDX_RDTSCP; 1674 1674 pVM->cpum.s.GuestFeatures.fRdTscP = 0; 1675 1675 Log(("CPUM: ClearGuestCpuIdFeature: Disabled RDTSCP!\n")); … … 1679 1679 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x00000001), 0); 1680 1680 if (pLeaf) 1681 pVM->cpum.s.aGuestCpuIdPatmStd[1]. ecx = pLeaf->uEcx &= ~X86_CPUID_FEATURE_ECX_HVP;1681 pVM->cpum.s.aGuestCpuIdPatmStd[1].uEcx = pLeaf->uEcx &= ~X86_CPUID_FEATURE_ECX_HVP; 1682 1682 pVM->cpum.s.GuestFeatures.fHypervisorPresent = 0; 1683 1683 break; … … 1686 1686 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x00000005), 0); 1687 1687 if (pLeaf) 1688 pVM->cpum.s.aGuestCpuIdPatmStd[5]. ecx = pLeaf->uEcx &= ~(X86_CPUID_MWAIT_ECX_EXT | X86_CPUID_MWAIT_ECX_BREAKIRQIF0);1688 pVM->cpum.s.aGuestCpuIdPatmStd[5].uEcx = pLeaf->uEcx &= ~(X86_CPUID_MWAIT_ECX_EXT | X86_CPUID_MWAIT_ECX_BREAKIRQIF0); 1689 1689 pVM->cpum.s.GuestFeatures.fMWaitExtensions = 0; 1690 1690 Log(("CPUM: ClearGuestCpuIdFeature: Disabled MWAIT Extensions!\n"));
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器