Changeset 73252 in vbox for trunk/src/VBox/VMM/VMMR3/PGM.cpp
- Timestamp:
- Jul 19, 2018 7:46:47 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PGM.cpp
r73250 r73252 3255 3255 3256 3256 /** 3257 * Gets the index into the paging mode data array of a SHW+GST mode.3258 *3259 * @returns PGM::paPagingData index.3260 * @param uShwType The shadow paging mode type.3261 * @param uGstType The guest paging mode type.3262 */3263 DECLINLINE(unsigned) pgmModeDataIndex(unsigned uShwType, unsigned uGstType)3264 {3265 Assert(uShwType >= PGM_TYPE_32BIT && uShwType <= PGM_TYPE_MAX);3266 Assert(uGstType >= PGM_TYPE_REAL && uGstType <= PGM_TYPE_AMD64);3267 return (uShwType - PGM_TYPE_32BIT) * (PGM_TYPE_AMD64 - PGM_TYPE_REAL + 1)3268 + (uGstType - PGM_TYPE_REAL);3269 }3270 3271 3272 /**3273 * Gets the index into the paging mode data array of a SHW+GST mode.3274 *3275 * @returns PGM::paPagingData index.3276 * @param enmShw The shadow paging mode.3277 * @param enmGst The guest paging mode.3278 */3279 DECLINLINE(unsigned) pgmModeDataIndexByMode(PGMMODE enmShw, PGMMODE enmGst)3280 {3281 Assert(enmShw >= PGMMODE_32_BIT && enmShw <= PGMMODE_MAX);3282 Assert(enmGst > PGMMODE_INVALID && enmGst < PGMMODE_MAX);3283 return pgmModeDataIndex(pgmModeToType(enmShw), pgmModeToType(enmGst));3284 }3285 3286 3287 /**3288 * Calculates the max data index.3289 * @returns The number of entries in the paging data array.3290 */3291 DECLINLINE(unsigned) pgmModeDataMaxIndex(void)3292 {3293 return pgmModeDataIndex(PGM_TYPE_MAX, PGM_TYPE_AMD64) + 1;3294 }3295 3296 3297 /**3298 3257 * Switch to different (or relocated in the relocate case) mode data. 3299 3258 *
Note:
See TracChangeset
for help on using the changeset viewer.