Changeset 91266 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Sep 15, 2021 10:26:50 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 146925
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp
r85183 r91266 5517 5517 * Binary lookup. 5518 5518 */ 5519 uint32_t cRanges = pVM->cpum.s.GuestInfo.cMsrRanges;5519 uint32_t cRanges = RT_MIN(pVM->cpum.s.GuestInfo.cMsrRanges, RT_ELEMENTS(pVM->cpum.s.GuestInfo.aMsrRanges)); 5520 5520 if (!cRanges) 5521 5521 return NULL; 5522 PCPUMMSRRANGE paRanges = pVM->cpum.s.GuestInfo. CTX_SUFF(paMsrRanges);5522 PCPUMMSRRANGE paRanges = pVM->cpum.s.GuestInfo.aMsrRanges; 5523 5523 for (;;) 5524 5524 { … … 5550 5550 * Linear lookup to verify the above binary search. 5551 5551 */ 5552 uint32_t cLeft = pVM->cpum.s.GuestInfo.cMsrRanges;5553 PCPUMMSRRANGE pCur = pVM->cpum.s.GuestInfo. CTX_SUFF(paMsrRanges);5552 uint32_t cLeft = RT_MIN(pVM->cpum.s.GuestInfo.cMsrRanges, RT_ELEMENTS(pVM->cpum.s.GuestInfo.aMsrRanges)); 5553 PCPUMMSRRANGE pCur = pVM->cpum.s.GuestInfo.aMsrRanges; 5554 5554 while (cLeft-- > 0) 5555 5555 { -
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r91037 r91266 781 781 PCPUMCPUIDLEAF cpumCpuIdGetLeaf(PVM pVM, uint32_t uLeaf) 782 782 { 783 unsigned iEnd = pVM->cpum.s.GuestInfo.cCpuIdLeaves;783 unsigned iEnd = RT_MIN(pVM->cpum.s.GuestInfo.cCpuIdLeaves, RT_ELEMENTS(pVM->cpum.s.GuestInfo.aCpuIdLeaves)); 784 784 if (iEnd) 785 785 { 786 786 unsigned iStart = 0; 787 PCPUMCPUIDLEAF paLeaves = pVM->cpum.s.GuestInfo. CTX_SUFF(paCpuIdLeaves);787 PCPUMCPUIDLEAF paLeaves = pVM->cpum.s.GuestInfo.aCpuIdLeaves; 788 788 for (;;) 789 789 { … … 838 838 PCPUMCPUIDLEAF cpumCpuIdGetLeafEx(PVM pVM, uint32_t uLeaf, uint32_t uSubLeaf, bool *pfExactSubLeafHit) 839 839 { 840 unsigned iEnd = pVM->cpum.s.GuestInfo.cCpuIdLeaves;840 unsigned iEnd = RT_MIN(pVM->cpum.s.GuestInfo.cCpuIdLeaves, RT_ELEMENTS(pVM->cpum.s.GuestInfo.aCpuIdLeaves)); 841 841 if (iEnd) 842 842 { 843 843 unsigned iStart = 0; 844 PCPUMCPUIDLEAF paLeaves = pVM->cpum.s.GuestInfo. CTX_SUFF(paCpuIdLeaves);844 PCPUMCPUIDLEAF paLeaves = pVM->cpum.s.GuestInfo.aCpuIdLeaves; 845 845 for (;;) 846 846 { -
trunk/src/VBox/VMM/VMMAll/MMAllHyper.cpp
r90991 r91266 338 338 339 339 340 #if 0 340 341 /** 341 342 * Duplicates a block of memory. … … 359 360 return rc; 360 361 } 362 #endif 361 363 362 364
Note:
See TracChangeset
for help on using the changeset viewer.