Changeset 17622 in vbox for trunk/src/VBox/VMM/PGMMap.cpp
- Timestamp:
- Mar 10, 2009 12:32:23 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMMap.cpp
r17594 r17622 1070 1070 } 1071 1071 1072 /** 1073 * Checks if a new mapping address wasn't previously used and caused a clash with guest mappings. 1074 * 1075 * @returns VBox status code. 1076 * @param pMapping The mapping which conflicts. 1077 * @param GCPtr New mapping address to try 1078 */ 1079 bool pgmR3MapIsKnownConflictAddress(PPGMMAPPING pMapping, RTGCPTR GCPtr) 1080 { 1081 for (int i=0;i<RT_ELEMENTS(pMapping->GCPtrConflict);i++) 1082 { 1083 if (GCPtr == pMapping->GCPtrConflict[i]) 1084 return true; 1085 } 1086 return false; 1087 } 1072 1088 1073 1089 /** … … 1086 1102 STAM_PROFILE_START(&pVM->pgm.s.StatR3ResolveConflict, a); 1087 1103 1104 pMapping->GCPtrConflict[pMapping->cConflicts & (PGMMAPPING_CONFLICT_MAX-1)] = GCPtrOldMapping; 1105 pMapping->cConflicts++; 1106 1088 1107 /* 1089 1108 * Scan for free page directory entries. … … 1098 1117 if (pPDSrc->a[iPDNew].n.u1Present) 1099 1118 continue; 1119 1120 if (pgmR3MapIsKnownConflictAddress(pMapping, iPDNew << X86_PD_SHIFT)) 1121 continue; 1122 1100 1123 if (cPTs > 1) 1101 1124 { … … 1152 1175 STAM_PROFILE_START(&pVM->pgm.s.StatR3ResolveConflict, a); 1153 1176 1177 pMapping->GCPtrConflict[pMapping->cConflicts & (PGMMAPPING_CONFLICT_MAX-1)] = GCPtrOldMapping; 1178 pMapping->cConflicts++; 1179 1154 1180 for (int iPDPTE = X86_PG_PAE_PDPE_ENTRIES - 1; iPDPTE >= 0; iPDPTE--) 1155 1181 { … … 1171 1197 /* Ugly assumption that mappings start on a 4 MB boundary. */ 1172 1198 if (iPDNew & 1) 1199 continue; 1200 1201 if (pgmR3MapIsKnownConflictAddress(pMapping, ((RTGCPTR32)iPDPTE << X86_PDPT_SHIFT) + (iPDNew << X86_PD_PAE_SHIFT))) 1173 1202 continue; 1174 1203
Note:
See TracChangeset
for help on using the changeset viewer.