VirtualBox

Changeset 16428 in vbox


Ignore:
Timestamp:
Jan 30, 2009 4:49:19 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
42292
Message:

VBOX_WITH_PGMPOOL_PAGING_ONLY: cleaned up

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

Legend:

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

    r16422 r16428  
    685685#define PGM_BTH_NAME_R0_STR(name)   PGM_BTH_NAME_R0_32BIT_REAL_STR(name)
    686686#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_32BIT_PT_FOR_PHYS
    687 #define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_32BIT_PD_PHYS_REAL
     687#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_32BIT_PD_PHYS
    688688#include "PGMBth.h"
    689689#include "PGMGst.h"
     
    707707#define PGM_BTH_NAME_R0_STR(name)   PGM_BTH_NAME_R0_32BIT_PROT_STR(name)
    708708#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_32BIT_PT_FOR_PHYS
    709 #define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_32BIT_PD_PHYS_PROT
     709#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_32BIT_PD_PHYS
    710710#include "PGMBth.h"
    711711#include "PGMGst.h"
     
    769769#define PGM_BTH_NAME_R0_STR(name)   PGM_BTH_NAME_R0_PAE_REAL_STR(name)
    770770#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_PAE_PT_FOR_PHYS
    771 #define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_PAE_PDPT_PHYS_REAL
     771#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_PAE_PDPT_PHYS
    772772#include "PGMBth.h"
    773773#undef BTH_PGMPOOLKIND_PT_FOR_PT
     
    790790#define PGM_BTH_NAME_R0_STR(name)   PGM_BTH_NAME_R0_PAE_PROT_STR(name)
    791791#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_PAE_PT_FOR_PHYS
    792 #define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_PAE_PDPT_PHYS_PROT
     792#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_PAE_PDPT_PHYS
    793793#include "PGMBth.h"
    794794#undef BTH_PGMPOOLKIND_PT_FOR_PT
  • trunk/src/VBox/VMM/PGMInternal.h

    r16419 r16428  
    5757 * Enable to use the PGM pool for all levels in the paging chain in all paging modes.
    5858 */
    59 //#define VBOX_WITH_PGMPOOL_PAGING_ONLY
     59#define VBOX_WITH_PGMPOOL_PAGING_ONLY
    6060
    6161/**
     
    15141514    /** Shw: 32-bit page directory. Gst: 32-bit page directory. */
    15151515    PGMPOOLKIND_32BIT_PD,
    1516     /** Shw: 32-bit page directory. Gst: real mode. */
    1517     PGMPOOLKIND_32BIT_PD_PHYS_REAL,
    1518     /** Shw: 32-bit page directory. Gst: protected mode without paging. */
    1519     PGMPOOLKIND_32BIT_PD_PHYS_PROT,
     1516    /** Shw: 32-bit page directory. Gst: no paging. */
     1517    PGMPOOLKIND_32BIT_PD_PHYS,
    15201518    /** Shw: PAE page directory;    Gst: 32-bit page directory. */
    15211519    PGMPOOLKIND_PAE_PD_FOR_32BIT_PD,
    15221520    /** Shw: PAE page directory;    Gst: PAE page directory. */
    15231521    PGMPOOLKIND_PAE_PD_FOR_PAE_PD,
    1524     /** Shw: PAE page directory;    Gst: real mode. */
    1525     PGMPOOLKIND_PAE_PD_PHYS_REAL,
    1526     /** Shw: PAE page directory;    Gst: protected mode without paging. */
    1527     PGMPOOLKIND_PAE_PD_PHYS_PROT,
     1522    /** Shw: PAE page directory;    Gst: no paging. */
     1523    PGMPOOLKIND_PAE_PD_PHYS,
    15281524
    15291525    /** Shw: PAE page directory pointer table (legacy, 4 entries);  Gst 32 bits paging. */
     
    15311527    /** Shw: PAE page directory pointer table (legacy, 4 entries);  Gst PAE PDPT. */
    15321528    PGMPOOLKIND_PAE_PDPT,
    1533     /** Shw: PAE page directory pointer table (legacy, 4 entries);  Gst: real mode. */
    1534     PGMPOOLKIND_PAE_PDPT_PHYS_REAL,
    1535     /** Shw: PAE page directory pointer table (legacy, 4 entries);  Gst: protected mode without paging. */
    1536     PGMPOOLKIND_PAE_PDPT_PHYS_PROT,
     1529    /** Shw: PAE page directory pointer table (legacy, 4 entries);  Gst: no paging. */
     1530    PGMPOOLKIND_PAE_PDPT_PHYS,
    15371531
    15381532    /** Shw: 64-bit page directory pointer table;   Gst: 64-bit page directory pointer table. */
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r16321 r16428  
    9090#define PGM_BTH_NAME(name)          PGM_BTH_NAME_32BIT_REAL(name)
    9191#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_32BIT_PT_FOR_PHYS
    92 #define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_32BIT_PD_PHYS_REAL
     92#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_32BIT_PD_PHYS
    9393#include "PGMAllGst.h"
    9494#include "PGMAllBth.h"
     
    104104#define PGM_BTH_NAME(name)          PGM_BTH_NAME_32BIT_PROT(name)
    105105#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_32BIT_PT_FOR_PHYS
    106 #define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_32BIT_PD_PHYS_PROT
     106#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_32BIT_PD_PHYS
    107107#include "PGMAllGst.h"
    108108#include "PGMAllBth.h"
     
    146146#define PGM_BTH_NAME(name)          PGM_BTH_NAME_PAE_REAL(name)
    147147#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_PAE_PT_FOR_PHYS
    148 #define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_PAE_PDPT_PHYS_REAL
     148#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_PAE_PDPT_PHYS
    149149#include "PGMAllBth.h"
    150150#undef BTH_PGMPOOLKIND_PT_FOR_PT
     
    159159#define PGM_BTH_NAME(name)          PGM_BTH_NAME_PAE_PROT(name)
    160160#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_PAE_PT_FOR_PHYS
    161 #define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_PAE_PDPT_PHYS_PROT
     161#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_PAE_PDPT_PHYS
    162162#include "PGMAllBth.h"
    163163#undef BTH_PGMPOOLKIND_PT_FOR_PT
     
    216216# define PGM_BTH_NAME(name)         PGM_BTH_NAME_AMD64_PROT(name)
    217217# define BTH_PGMPOOLKIND_PT_FOR_PT  PGMPOOLKIND_PAE_PT_FOR_PHYS
    218 # define BTH_PGMPOOLKIND_ROOT       PGMPOOLKIND_PAE_PD_PHYS_PROT
     218# define BTH_PGMPOOLKIND_ROOT       PGMPOOLKIND_PAE_PD_PHYS
    219219# include "PGMAllBth.h"
    220220# undef BTH_PGMPOOLKIND_PT_FOR_PT
     
    877877    PPGMPOOL       pPool         = pVM->pgm.s.CTX_SUFF(pPool);
    878878    bool           fNestedPaging = HWACCMIsNestedPagingActive(pVM);
     879    bool           fPaging       = !!(CPUMGetGuestCR0(pVM) & X86_CR0_PG);
    879880    PPGMPOOLPAGE   pShwPage;
    880881    int            rc;
     
    893894        else
    894895        {
    895             /* AMD-V nested paging. (Intel EPT never comes here) */
     896            /* AMD-V nested paging or real/protected mode without paging */
    896897            RTGCPTR64 GCPdPt = (RTGCPTR64)iPdPt << EPT_PDPT_SHIFT;
    897898
    898             rc = pgmPoolAlloc(pVM, GCPdPt + RT_BIT_64(62) /* hack: make the address unique */, PGMPOOLKIND_PAE_PD_PHYS_PROT, pVM->pgm.s.CTX_SUFF(pShwPageCR3)->idx, iPdPt, &pShwPage);
     899            rc = pgmPoolAlloc(pVM, GCPdPt + RT_BIT_64(62) /* hack: make the address unique */, PGMPOOLKIND_PAE_PD_PHYS, pVM->pgm.s.CTX_SUFF(pShwPageCR3)->idx, iPdPt, &pShwPage);
    899900        }
    900901
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r16427 r16428  
    12781278        case PGMPOOLKIND_EPT_PD_FOR_PHYS:
    12791279        case PGMPOOLKIND_EPT_PT_FOR_PHYS:
    1280         case PGMPOOLKIND_PAE_PD_PHYS_PROT:
    1281         case PGMPOOLKIND_PAE_PD_PHYS_REAL:
    1282         case PGMPOOLKIND_PAE_PDPT_PHYS_REAL:
    1283         case PGMPOOLKIND_PAE_PDPT_PHYS_PROT:
    1284         case PGMPOOLKIND_32BIT_PD_PHYS_REAL:
    1285         case PGMPOOLKIND_32BIT_PD_PHYS_PROT:
     1280        case PGMPOOLKIND_PAE_PD_PHYS:
     1281        case PGMPOOLKIND_PAE_PDPT_PHYS:
     1282        case PGMPOOLKIND_32BIT_PD_PHYS:
    12861283            return true;
    12871284
     
    15721569                case PGMPOOLKIND_EPT_PT_FOR_PHYS:
    15731570                case PGMPOOLKIND_ROOT_NESTED:
    1574                 case PGMPOOLKIND_PAE_PD_PHYS_PROT:
    1575                 case PGMPOOLKIND_PAE_PD_PHYS_REAL:
    1576                 case PGMPOOLKIND_PAE_PDPT_PHYS_REAL:
    1577                 case PGMPOOLKIND_PAE_PDPT_PHYS_PROT:
    1578                 case PGMPOOLKIND_32BIT_PD_PHYS_REAL:
    1579                 case PGMPOOLKIND_32BIT_PD_PHYS_PROT:
     1571                case PGMPOOLKIND_PAE_PD_PHYS:
     1572                case PGMPOOLKIND_PAE_PDPT_PHYS:
     1573                case PGMPOOLKIND_32BIT_PD_PHYS:
    15801574                    break;
    15811575                default:
     
    16401634
    16411635#ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
    1642         case PGMPOOLKIND_32BIT_PD_PHYS_REAL:
    1643         case PGMPOOLKIND_32BIT_PD_PHYS_PROT:
    1644         case PGMPOOLKIND_PAE_PDPT_PHYS_REAL:
    1645         case PGMPOOLKIND_PAE_PDPT_PHYS_PROT:
    1646         case PGMPOOLKIND_PAE_PD_PHYS_PROT:
    1647         case PGMPOOLKIND_PAE_PD_PHYS_REAL:
     1636        case PGMPOOLKIND_32BIT_PD_PHYS:
     1637        case PGMPOOLKIND_PAE_PDPT_PHYS:
     1638        case PGMPOOLKIND_PAE_PD_PHYS:
    16481639            /* Nothing to monitor here. */
    16491640            return VINF_SUCCESS;
     
    17401731        case PGMPOOLKIND_EPT_PT_FOR_PHYS:
    17411732        case PGMPOOLKIND_ROOT_NESTED:
    1742         case PGMPOOLKIND_PAE_PD_PHYS_PROT:
    1743         case PGMPOOLKIND_PAE_PD_PHYS_REAL:
    1744         case PGMPOOLKIND_PAE_PDPT_PHYS_REAL:
    1745         case PGMPOOLKIND_PAE_PDPT_PHYS_PROT:
    1746         case PGMPOOLKIND_32BIT_PD_PHYS_REAL:
    1747         case PGMPOOLKIND_32BIT_PD_PHYS_PROT:
     1733        case PGMPOOLKIND_PAE_PD_PHYS:
     1734        case PGMPOOLKIND_PAE_PDPT_PHYS:
     1735        case PGMPOOLKIND_32BIT_PD_PHYS:
    17481736            /* Nothing to monitor here. */
    17491737            return VINF_SUCCESS;
     
    24622450#ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
    24632451        case PGMPOOLKIND_32BIT_PD:
    2464         case PGMPOOLKIND_32BIT_PD_PHYS_REAL:
    2465         case PGMPOOLKIND_32BIT_PD_PHYS_PROT:
     2452        case PGMPOOLKIND_32BIT_PD_PHYS:
    24662453#else
    24672454        case PGMPOOLKIND_ROOT_32BIT_PD:
     
    24902477        case PGMPOOLKIND_EPT_PD_FOR_PHYS:
    24912478        case PGMPOOLKIND_EPT_PT_FOR_PHYS:
    2492         case PGMPOOLKIND_PAE_PD_PHYS_PROT:
    2493         case PGMPOOLKIND_PAE_PD_PHYS_REAL:
    2494         case PGMPOOLKIND_PAE_PDPT_PHYS_REAL:
    2495         case PGMPOOLKIND_PAE_PDPT_PHYS_PROT:
     2479        case PGMPOOLKIND_PAE_PD_PHYS:
     2480        case PGMPOOLKIND_PAE_PDPT_PHYS:
    24962481            return 8;
    24972482
     
    25492534        case PGMPOOLKIND_EPT_PT_FOR_PHYS:
    25502535        case PGMPOOLKIND_ROOT_NESTED:
    2551         case PGMPOOLKIND_PAE_PD_PHYS_PROT:
    2552         case PGMPOOLKIND_PAE_PD_PHYS_REAL:
    2553         case PGMPOOLKIND_PAE_PDPT_PHYS_REAL:
    2554         case PGMPOOLKIND_PAE_PDPT_PHYS_PROT:
    2555         case PGMPOOLKIND_32BIT_PD_PHYS_REAL:
    2556         case PGMPOOLKIND_32BIT_PD_PHYS_PROT:
     2536        case PGMPOOLKIND_PAE_PD_PHYS:
     2537        case PGMPOOLKIND_PAE_PDPT_PHYS:
     2538        case PGMPOOLKIND_32BIT_PD_PHYS:
    25572539            /** @todo can we return 0? (nobody is calling this...) */
    25582540            AssertFailed();
     
    28882870# ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
    28892871        case PGMPOOLKIND_32BIT_PD:
    2890             case PGMPOOLKIND_32BIT_PD_PHYS_REAL:
    2891             case PGMPOOLKIND_32BIT_PD_PHYS_PROT:
     2872            case PGMPOOLKIND_32BIT_PD_PHYS:
    28922873            Assert(iUserTable < X86_PG_ENTRIES);
    28932874            break;
     
    29062887# ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
    29072888        case PGMPOOLKIND_PAE_PDPT:
    2908             case PGMPOOLKIND_PAE_PDPT_PHYS_REAL:
    2909             case PGMPOOLKIND_PAE_PDPT_PHYS_PROT:
     2889            case PGMPOOLKIND_PAE_PDPT_PHYS:
    29102890# else
    29112891        case PGMPOOLKIND_ROOT_PDPT:
     
    29162896        case PGMPOOLKIND_PAE_PD_FOR_32BIT_PD:
    29172897        case PGMPOOLKIND_PAE_PD_FOR_PAE_PD:
    2918         case PGMPOOLKIND_PAE_PD_PHYS_PROT:
    2919             case PGMPOOLKIND_PAE_PD_PHYS_REAL:
     2898        case PGMPOOLKIND_PAE_PD_PHYS:
    29202899            Assert(iUserTable < X86_PG_PAE_ENTRIES);
    29212900            break;
     
    29602939#ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
    29612940        case PGMPOOLKIND_32BIT_PD:
    2962             case PGMPOOLKIND_32BIT_PD_PHYS_REAL:
    2963             case PGMPOOLKIND_32BIT_PD_PHYS_PROT:
     2941            case PGMPOOLKIND_32BIT_PD_PHYS:
    29642942#else
    29652943        case PGMPOOLKIND_ROOT_32BIT_PD:
     
    29712949        case PGMPOOLKIND_PAE_PD_FOR_32BIT_PD:
    29722950        case PGMPOOLKIND_PAE_PD_FOR_PAE_PD:
    2973         case PGMPOOLKIND_PAE_PD_PHYS_PROT:
    2974             case PGMPOOLKIND_PAE_PD_PHYS_REAL:
    2975             case PGMPOOLKIND_PAE_PDPT_PHYS_REAL:
    2976             case PGMPOOLKIND_PAE_PDPT_PHYS_PROT:
     2951            case PGMPOOLKIND_PAE_PD_PHYS:
     2952            case PGMPOOLKIND_PAE_PDPT_PHYS:
    29772953        case PGMPOOLKIND_64BIT_PD_FOR_64BIT_PD:
    29782954        case PGMPOOLKIND_64BIT_PDPT_FOR_64BIT_PDPT:
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