VirtualBox

Changeset 10823 in vbox


Ignore:
Timestamp:
Jul 23, 2008 9:04:56 AM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
33608
Message:

Duplicate code

File:
1 edited

Legend:

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

    r10822 r10823  
    31123112}
    31133113
    3114 #ifdef LOG_ENABLED
    3115 /**
    3116  * Return the string corresponding to the guest mode
    3117  *
    3118  * @returns string
    3119  * @param   enmGuestMode    The guest mode.
    3120  */
    3121 const char *pgmr3GuestModeString(PGMMODE enmGuestMode)
    3122 {
    3123     switch(enmGuestMode)
    3124     {
    3125         case PGMMODE_REAL:
    3126             return "Real mode";
    3127 
    3128         case PGMMODE_PROTECTED:
    3129             return "Protected mode without paging";
    3130 
    3131         case PGMMODE_32_BIT:
    3132             return "32 bits protected mode";
    3133 
    3134         case PGMMODE_PAE:
    3135             return "PAE";
    3136 
    3137         case PGMMODE_PAE_NX:
    3138             return "PAE + NX";
    3139 
    3140         case PGMMODE_AMD64:
    3141             return "AMD64";
    3142 
    3143         case PGMMODE_AMD64_NX:
    3144             return "AMD64 + NX";
    3145 
    3146         case PGMMODE_NESTED:
    3147             return "Nested";
    3148 
    3149         case PGMMODE_EPT:
    3150             return "EPT";
    3151 
    3152         default:
    3153             return "Unknown";
    3154     }
    3155 }
    3156 #endif
    3157 
    31583114/**
    31593115 * Performs the actual mode change.
     
    31673123PGMR3DECL(int) PGMR3ChangeMode(PVM pVM, PGMMODE enmGuestMode)
    31683124{
    3169     LogFlow(("PGMR3ChangeMode: Guest mode: %s -> %s\n", pgmr3GuestModeString(pVM->pgm.s.enmGuestMode), pgmr3GuestModeString(enmGuestMode)));
     3125    LogFlow(("PGMR3ChangeMode: Guest mode: %s -> %s\n", PGMGetModeName(pVM->pgm.s.enmGuestMode), PGMGetModeName(enmGuestMode)));
    31703126    STAM_REL_COUNTER_INC(&pVM->pgm.s.cGuestModeChanges);
    31713127
     
    31943150    if (enmShadowMode != pVM->pgm.s.enmShadowMode)
    31953151    {
    3196         LogFlow(("PGMR3ChangeMode: Shadow mode: %s -> %s\n",  pgmr3GuestModeString(pVM->pgm.s.enmShadowMode), pgmr3GuestModeString(enmShadowMode)));
     3152        LogFlow(("PGMR3ChangeMode: Shadow mode: %s -> %s\n",  PGMGetModeName(pVM->pgm.s.enmShadowMode), PGMGetModeName(enmShadowMode)));
    31973153        if (PGM_SHW_PFN(Exit, pVM))
    31983154        {
Note: See TracChangeset for help on using the changeset viewer.

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