VirtualBox

Changeset 73252 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 19, 2018 7:46:47 PM (6 years ago)
Author:
vboxsync
Message:

PGM: Working on eliminating PGMMODEDATA and the corresponding PGMCPU section so we can do mode switching in ring-0. This forth part dealing with shadow+guest paging pointers and finally removing the PGMMODEDATA type. bugref:9044 [build fix]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/PGM.cpp

    r73250 r73252  
    32553255
    32563256/**
    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 /**
    32983257 * Switch to different (or relocated in the relocate case) mode data.
    32993258 *
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette