VirtualBox

Changeset 13106 in vbox for trunk/src


Ignore:
Timestamp:
Oct 9, 2008 8:46:19 AM (16 years ago)
Author:
vboxsync
Message:

leave some modes out if 64-bit guests are not enabled (so far on 32-bit hosts)

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

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

    r13099 r13106  
    846846#include "PGMShw.h"
    847847
     848#ifdef VBOX_WITH_64_BITS_GUESTS
    848849/* Guest - AMD64 mode */
    849850#define PGM_GST_TYPE                PGM_TYPE_AMD64
     
    867868#undef PGM_GST_NAME_RC_STR
    868869#undef PGM_GST_NAME_R0_STR
     870#endif
    869871
    870872#undef PGM_SHW_TYPE
     
    962964#undef PGM_GST_NAME_R0_STR
    963965
     966#ifdef VBOX_WITH_64_BITS_GUESTS
    964967/* Guest - AMD64 mode */
    965968#define PGM_GST_TYPE                PGM_TYPE_AMD64
     
    982985#undef PGM_GST_NAME_RC_STR
    983986#undef PGM_GST_NAME_R0_STR
     987#endif
    984988
    985989#undef PGM_SHW_TYPE
     
    10771081#undef PGM_GST_NAME_R0_STR
    10781082
     1083#ifdef VBOX_WITH_64_BITS_GUESTS
    10791084/* Guest - AMD64 mode */
    10801085#define PGM_GST_TYPE                PGM_TYPE_AMD64
     
    10971102#undef PGM_GST_NAME_RC_STR
    10981103#undef PGM_GST_NAME_R0_STR
     1104#endif
    10991105
    11001106#undef PGM_SHW_TYPE
     
    27372743    rc = PGM_BTH_NAME_PAE_PAE(InitData)(    pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
    27382744
     2745#ifdef VBOX_WITH_64_BITS_GUESTS
    27392746    pModeData = &pVM->pgm.s.paModeData[pgmModeDataIndex(PGM_TYPE_AMD64, PGM_TYPE_AMD64)];
    27402747    pModeData->uShwType = PGM_TYPE_AMD64;
     
    27432750    rc = PGM_GST_NAME_AMD64(InitData)(       pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
    27442751    rc = PGM_BTH_NAME_AMD64_AMD64(InitData)( pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
     2752#endif
    27452753
    27462754    /* The nested paging mode. */
     
    27692777    rc = PGM_BTH_NAME_NESTED_PAE(InitData)(  pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
    27702778
     2779#ifdef VBOX_WITH_64_BITS_GUESTS
    27712780    pModeData = &pVM->pgm.s.paModeData[pgmModeDataIndex(PGM_TYPE_NESTED, PGM_TYPE_AMD64)];
    27722781    pModeData->uShwType = PGM_TYPE_NESTED;
     
    27742783    rc = PGM_GST_NAME_AMD64(InitData)(        pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
    27752784    rc = PGM_BTH_NAME_NESTED_AMD64(InitData)( pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
     2785#endif
     2786
     2787#ifdef VBOX_WITH_64_BITS_GUESTS
     2788# define PGM_TYPE_MAX_SHADOW  PGM_TYPE_AMD64
     2789#else
     2790# define PGM_TYPE_MAX_SHADOW  PGM_TYPE_PAE
     2791#endif
    27762792
    27772793    /* The shadow part of the nested callback mode depends on the host paging mode (AMD-V only). */
     
    27802796    case SUPPAGINGMODE_32_BIT:
    27812797    case SUPPAGINGMODE_32_BIT_GLOBAL:
    2782         for (unsigned i=PGM_TYPE_REAL;i<=PGM_TYPE_AMD64;i++)
     2798        for (unsigned i=PGM_TYPE_REAL;i<=PGM_TYPE_MAX_SHADOW;i++)
    27832799        {
    27842800            pModeData = &pVM->pgm.s.paModeData[pgmModeDataIndex(PGM_TYPE_NESTED, i)];
     
    27912807    case SUPPAGINGMODE_PAE_GLOBAL:
    27922808    case SUPPAGINGMODE_PAE_GLOBAL_NX:
    2793         for (unsigned i=PGM_TYPE_REAL;i<=PGM_TYPE_AMD64;i++)
     2809        for (unsigned i=PGM_TYPE_REAL;i<=PGM_TYPE_MAX_SHADOW;i++)
    27942810        {
    27952811            pModeData = &pVM->pgm.s.paModeData[pgmModeDataIndex(PGM_TYPE_NESTED, i)];
     
    28022818    case SUPPAGINGMODE_AMD64_NX:
    28032819    case SUPPAGINGMODE_AMD64_GLOBAL_NX:
    2804         for (unsigned i=PGM_TYPE_REAL;i<=PGM_TYPE_AMD64;i++)
     2820        for (unsigned i=PGM_TYPE_REAL;i<=PGM_TYPE_MAX_SHADOW;i++)
    28052821        {
    28062822            pModeData = &pVM->pgm.s.paModeData[pgmModeDataIndex(PGM_TYPE_NESTED, i)];
     
    28422858    rc = PGM_BTH_NAME_EPT_PAE(InitData)(    pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
    28432859
     2860#ifdef VBOX_WITH_64_BITS_GUESTS
    28442861    pModeData = &pVM->pgm.s.paModeData[pgmModeDataIndex(PGM_TYPE_EPT, PGM_TYPE_AMD64)];
    28452862    pModeData->uShwType = PGM_TYPE_EPT;
     
    28482865    rc = PGM_GST_NAME_AMD64(InitData)(      pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
    28492866    rc = PGM_BTH_NAME_EPT_AMD64(InitData)(  pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
     2867#endif
    28502868    return VINF_SUCCESS;
    28512869}
     
    33763394        }
    33773395
     3396#ifdef VBOX_WITH_64_BITS_GUESTS
    33783397        case PGMMODE_AMD64_NX:
    33793398        case PGMMODE_AMD64:
     
    33993418            }
    34003419            break;
     3420#endif
    34013421
    34023422        default:
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r13099 r13106  
    200200#undef PGM_GST_NAME
    201201
     202#ifdef VBOX_WITH_64_BITS_GUESTS
    202203/* Guest - AMD64 mode */
    203204#define PGM_GST_TYPE                PGM_TYPE_AMD64
     
    213214#undef PGM_GST_TYPE
    214215#undef PGM_GST_NAME
     216#endif
    215217
    216218#undef PGM_SHW_TYPE
     
    260262#undef PGM_GST_NAME
    261263
     264#ifdef VBOX_WITH_64_BITS_GUESTS
    262265/* Guest - AMD64 mode */
    263266#define PGM_GST_TYPE                PGM_TYPE_AMD64
     
    268271#undef PGM_GST_TYPE
    269272#undef PGM_GST_NAME
     273#endif
    270274
    271275#undef PGM_SHW_TYPE
     
    323327#undef PGM_GST_NAME
    324328
     329#ifdef VBOX_WITH_64_BITS_GUESTS
    325330/* Guest - AMD64 mode */
    326331#define PGM_GST_TYPE                PGM_TYPE_AMD64
     
    333338#undef PGM_GST_TYPE
    334339#undef PGM_GST_NAME
     340#endif
    335341
    336342#undef PGM_SHW_TYPE
  • trunk/src/VBox/VMM/VMMGC/PGMGC.cpp

    r13087 r13106  
    151151#include "PGMGCShw.h"
    152152
     153#ifdef VBOX_WITH_64_BITS_GUESTS
    153154/* Guest - AMD64 mode */
    154155#define PGM_GST_TYPE                PGM_TYPE_AMD64
     
    160161#undef PGM_GST_TYPE
    161162#undef PGM_GST_NAME
     163#endif
    162164
    163165#undef PGM_SHW_TYPE
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