VirtualBox

Changeset 17215 in vbox


Ignore:
Timestamp:
Feb 27, 2009 4:33:19 PM (16 years ago)
Author:
vboxsync
Message:

Split up the definitions and the guest code. Otherwise we'll end up using e.g. wrong masks in Bth code.

Location:
trunk/src/VBox/VMM
Files:
5 edited
1 moved

Legend:

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

    r16918 r17215  
    687687#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_32BIT_PD_PHYS
    688688#include "PGMBth.h"
     689#include "PGMGstDefs.h"
    689690#include "PGMGst.h"
    690691#undef BTH_PGMPOOLKIND_PT_FOR_PT
     
    709710#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_32BIT_PD_PHYS
    710711#include "PGMBth.h"
     712#include "PGMGstDefs.h"
    711713#include "PGMGst.h"
    712714#undef BTH_PGMPOOLKIND_PT_FOR_PT
     
    732734#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_32BIT_PD
    733735#include "PGMBth.h"
     736#include "PGMGstDefs.h"
    734737#include "PGMGst.h"
    735738#undef BTH_PGMPOOLKIND_PT_FOR_BIG
     
    770773#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_PAE_PT_FOR_PHYS
    771774#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_PAE_PDPT_PHYS
     775#include "PGMGstDefs.h"
    772776#include "PGMBth.h"
    773777#undef BTH_PGMPOOLKIND_PT_FOR_PT
     
    791795#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_PAE_PT_FOR_PHYS
    792796#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_PAE_PDPT_PHYS
     797#include "PGMGstDefs.h"
    793798#include "PGMBth.h"
    794799#undef BTH_PGMPOOLKIND_PT_FOR_PT
     
    813818#define BTH_PGMPOOLKIND_PT_FOR_BIG  PGMPOOLKIND_PAE_PT_FOR_32BIT_4MB
    814819#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_PAE_PDPT_FOR_32BIT
     820#include "PGMGstDefs.h"
    815821#include "PGMBth.h"
    816822#undef BTH_PGMPOOLKIND_PT_FOR_BIG
     
    837843#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_PAE_PDPT
    838844#include "PGMBth.h"
     845#include "PGMGstDefs.h"
    839846#include "PGMGst.h"
    840847#undef BTH_PGMPOOLKIND_PT_FOR_BIG
     
    877884# define BTH_PGMPOOLKIND_ROOT       PGMPOOLKIND_64BIT_PML4
    878885# include "PGMBth.h"
     886# include "PGMGstDefs.h"
    879887# include "PGMGst.h"
    880888# undef BTH_PGMPOOLKIND_PT_FOR_BIG
     
    914922#define PGM_BTH_NAME_R0_STR(name)   PGM_BTH_NAME_R0_NESTED_REAL_STR(name)
    915923#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_PAE_PT_FOR_PHYS
     924#include "PGMGstDefs.h"
    916925#include "PGMBth.h"
    917926#undef BTH_PGMPOOLKIND_PT_FOR_PT
     
    933942#define PGM_BTH_NAME_R0_STR(name)   PGM_BTH_NAME_R0_NESTED_PROT_STR(name)
    934943#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_PAE_PT_FOR_PHYS
     944#include "PGMGstDefs.h"
    935945#include "PGMBth.h"
    936946#undef BTH_PGMPOOLKIND_PT_FOR_PT
     
    953963#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_PAE_PT_FOR_32BIT_PT
    954964#define BTH_PGMPOOLKIND_PT_FOR_BIG  PGMPOOLKIND_PAE_PT_FOR_32BIT_4MB
     965#include "PGMGstDefs.h"
    955966#include "PGMBth.h"
    956967#undef BTH_PGMPOOLKIND_PT_FOR_BIG
     
    974985#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_PAE_PT_FOR_PAE_PT
    975986#define BTH_PGMPOOLKIND_PT_FOR_BIG  PGMPOOLKIND_PAE_PT_FOR_PAE_2MB
     987#include "PGMGstDefs.h"
    976988#include "PGMBth.h"
    977989#undef BTH_PGMPOOLKIND_PT_FOR_BIG
     
    9961008# define BTH_PGMPOOLKIND_PT_FOR_PT  PGMPOOLKIND_PAE_PT_FOR_PAE_PT
    9971009# define BTH_PGMPOOLKIND_PT_FOR_BIG PGMPOOLKIND_PAE_PT_FOR_PAE_2MB
     1010# include "PGMGstDefs.h"
    9981011# include "PGMBth.h"
    9991012# undef BTH_PGMPOOLKIND_PT_FOR_BIG
     
    10321045#define PGM_BTH_NAME_R0_STR(name)   PGM_BTH_NAME_R0_EPT_REAL_STR(name)
    10331046#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_PAE_PT_FOR_PHYS
     1047#include "PGMGstDefs.h"
    10341048#include "PGMBth.h"
    10351049#undef BTH_PGMPOOLKIND_PT_FOR_PT
     
    10511065#define PGM_BTH_NAME_R0_STR(name)   PGM_BTH_NAME_R0_EPT_PROT_STR(name)
    10521066#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_PAE_PT_FOR_PHYS
     1067#include "PGMGstDefs.h"
    10531068#include "PGMBth.h"
    10541069#undef BTH_PGMPOOLKIND_PT_FOR_PT
     
    10711086#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_PAE_PT_FOR_32BIT_PT
    10721087#define BTH_PGMPOOLKIND_PT_FOR_BIG  PGMPOOLKIND_PAE_PT_FOR_32BIT_4MB
     1088#include "PGMGstDefs.h"
    10731089#include "PGMBth.h"
    10741090#undef BTH_PGMPOOLKIND_PT_FOR_BIG
     
    10921108#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_PAE_PT_FOR_PAE_PT
    10931109#define BTH_PGMPOOLKIND_PT_FOR_BIG  PGMPOOLKIND_PAE_PT_FOR_PAE_2MB
     1110#include "PGMGstDefs.h"
    10941111#include "PGMBth.h"
    10951112#undef BTH_PGMPOOLKIND_PT_FOR_BIG
     
    11141131# define BTH_PGMPOOLKIND_PT_FOR_PT  PGMPOOLKIND_PAE_PT_FOR_PAE_PT
    11151132# define BTH_PGMPOOLKIND_PT_FOR_BIG PGMPOOLKIND_PAE_PT_FOR_PAE_2MB
     1133# include "PGMGstDefs.h"
    11161134# include "PGMBth.h"
    11171135# undef BTH_PGMPOOLKIND_PT_FOR_BIG
  • trunk/src/VBox/VMM/PGMGst.h

    r16918 r17215  
    1919 * additional information or have any questions.
    2020 */
    21 
    22 /*******************************************************************************
    23 *   Defined Constants And Macros                                               *
    24 *******************************************************************************/
    25 #undef GSTPT
    26 #undef PGSTPT
    27 #undef GSTPTE
    28 #undef PGSTPTE
    29 #undef GSTPD
    30 #undef PGSTPD
    31 #undef GSTPDE
    32 #undef PGSTPDE
    33 #undef GST_BIG_PAGE_SIZE
    34 #undef GST_BIG_PAGE_OFFSET_MASK
    35 #undef GST_PDE_PG_MASK
    36 #undef GST_PDE_BIG_PG_MASK
    37 #undef GST_PD_SHIFT
    38 #undef GST_PD_MASK
    39 #undef GST_PTE_PG_MASK
    40 #undef GST_PT_SHIFT
    41 #undef GST_PT_MASK
    42 #undef GST_TOTAL_PD_ENTRIES
    43 #undef GST_CR3_PAGE_MASK
    44 #undef GST_PDPE_ENTRIES
    45 #undef GST_GET_PDE_BIG_PG_GCPHYS
    46 
    47 #if PGM_GST_TYPE == PGM_TYPE_32BIT \
    48  || PGM_GST_TYPE == PGM_TYPE_REAL \
    49  || PGM_GST_TYPE == PGM_TYPE_PROT
    50 # define GSTPT                      X86PT
    51 # define PGSTPT                     PX86PT
    52 # define GSTPTE                     X86PTE
    53 # define PGSTPTE                    PX86PTE
    54 # define GSTPD                      X86PD
    55 # define PGSTPD                     PX86PD
    56 # define GSTPDE                     X86PDE
    57 # define PGSTPDE                    PX86PDE
    58 # define GST_BIG_PAGE_SIZE          X86_PAGE_4M_SIZE
    59 # define GST_BIG_PAGE_OFFSET_MASK   X86_PAGE_4M_OFFSET_MASK
    60 # define GST_PDE_PG_MASK            X86_PDE_PG_MASK
    61 # define GST_PDE_BIG_PG_MASK        X86_PDE4M_PG_MASK
    62 # define GST_GET_PDE_BIG_PG_GCPHYS(PdeGst)  pgmGstGet4MBPhysPage(&pVM->pgm.s, PdeGst)
    63 # define GST_PD_SHIFT               X86_PD_SHIFT
    64 # define GST_PD_MASK                X86_PD_MASK
    65 # define GST_TOTAL_PD_ENTRIES       X86_PG_ENTRIES
    66 # define GST_PTE_PG_MASK            X86_PTE_PG_MASK
    67 # define GST_PT_SHIFT               X86_PT_SHIFT
    68 # define GST_PT_MASK                X86_PT_MASK
    69 # define GST_CR3_PAGE_MASK          X86_CR3_PAGE_MASK
    70 
    71 #elif   PGM_GST_TYPE == PGM_TYPE_PAE \
    72      || PGM_GST_TYPE == PGM_TYPE_AMD64
    73 # define GSTPT                      X86PTPAE
    74 # define PGSTPT                     PX86PTPAE
    75 # define GSTPTE                     X86PTEPAE
    76 # define PGSTPTE                    PX86PTEPAE
    77 # define GSTPD                      X86PDPAE
    78 # define PGSTPD                     PX86PDPAE
    79 # define GSTPDE                     X86PDEPAE
    80 # define PGSTPDE                    PX86PDEPAE
    81 # define GST_BIG_PAGE_SIZE          X86_PAGE_2M_SIZE
    82 # define GST_BIG_PAGE_OFFSET_MASK   X86_PAGE_2M_OFFSET_MASK
    83 # define GST_PDE_PG_MASK            X86_PDE_PAE_PG_MASK
    84 # define GST_PDE_BIG_PG_MASK        X86_PDE2M_PAE_PG_MASK
    85 # define GST_GET_PDE_BIG_PG_GCPHYS(PdeGst)  (PdeGst.u & GST_PDE_BIG_PG_MASK)
    86 # define GST_PD_SHIFT               X86_PD_PAE_SHIFT
    87 # define GST_PD_MASK                X86_PD_PAE_MASK
    88 # if PGM_GST_TYPE == PGM_TYPE_PAE
    89 #  define GST_TOTAL_PD_ENTRIES      (X86_PG_PAE_ENTRIES * X86_PG_PAE_PDPE_ENTRIES)
    90 #  define GST_PDPE_ENTRIES          X86_PG_PAE_PDPE_ENTRIES
    91 # else
    92 #  define GST_TOTAL_PD_ENTRIES      (X86_PG_AMD64_ENTRIES * X86_PG_AMD64_PDPE_ENTRIES)
    93 #  define GST_PDPE_ENTRIES          X86_PG_AMD64_PDPE_ENTRIES
    94 # endif
    95 # define GST_PTE_PG_MASK            X86_PTE_PAE_PG_MASK
    96 # define GST_PT_SHIFT               X86_PT_PAE_SHIFT
    97 # define GST_PT_MASK                X86_PT_PAE_MASK
    98 # define GST_CR3_PAGE_MASK          X86_CR3_PAE_PAGE_MASK
    99 #endif
    10021
    10122
  • trunk/src/VBox/VMM/PGMGstDefs.h

    r17212 r17215  
    5151#if PGM_GST_TYPE == PGM_TYPE_REAL \
    5252 || PGM_GST_TYPE == PGM_TYPE_PROT
    53 # define GSTPT                      SHWPT
    54 # define PGSTPT                     PSHWPT
    55 # define GSTPTE                     SHWPTE
    56 # define PGSTPTE                    PSHWPTE
    57 # define GSTPD                      SHWPD
    58 # define PGSTPD                     PSHWPD
    59 # define GSTPDE                     SHWPDE
    60 # define PGSTPDE                    PSHWPDE
    61 # define GST_PTE_PG_MASK            SHW_PTE_PG_MASK
    6253
     54# if PGM_SHW_TYPE == PGM_TYPE_EPT
     55#  define GSTPT                      X86PTPAE
     56#  define PGSTPT                     PX86PTPAE
     57#  define GSTPTE                     X86PTEPAE
     58#  define PGSTPTE                    PX86PTEPAE
     59#  define GSTPD                      X86PDPAE
     60#  define PGSTPD                     PX86PDPAE
     61#  define GSTPDE                     X86PDEPAE
     62#  define PGSTPDE                    PX86PDEPAE
     63#  define GST_PTE_PG_MASK            X86_PTE_PAE_PG_MASK
     64# else
     65#  define GSTPT                      SHWPT
     66#  define PGSTPT                     PSHWPT
     67#  define GSTPTE                     SHWPTE
     68#  define PGSTPTE                    PSHWPTE
     69#  define GSTPD                      SHWPD
     70#  define PGSTPD                     PSHWPD
     71#  define GSTPDE                     SHWPDE
     72#  define PGSTPDE                    PSHWPDE
     73#  define GST_PTE_PG_MASK            SHW_PTE_PG_MASK
     74# endif
    6375#elif PGM_GST_TYPE == PGM_TYPE_32BIT
    6476# define GSTPT                      X86PT
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r17195 r17215  
    8888#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_32BIT_PT_FOR_PHYS
    8989#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_32BIT_PD_PHYS
     90#include "PGMGstDefs.h"
    9091#include "PGMAllGst.h"
    9192#include "PGMAllBth.h"
     
    102103#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_32BIT_PT_FOR_PHYS
    103104#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_32BIT_PD_PHYS
     105#include "PGMGstDefs.h"
    104106#include "PGMAllGst.h"
    105107#include "PGMAllBth.h"
     
    117119#define BTH_PGMPOOLKIND_PT_FOR_BIG  PGMPOOLKIND_32BIT_PT_FOR_32BIT_4MB
    118120#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_32BIT_PD
     121#include "PGMGstDefs.h"
    119122#include "PGMAllGst.h"
    120123#include "PGMAllBth.h"
     
    144147#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_PAE_PT_FOR_PHYS
    145148#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_PAE_PDPT_PHYS
     149#include "PGMGstDefs.h"
    146150#include "PGMAllBth.h"
    147151#undef BTH_PGMPOOLKIND_PT_FOR_PT
     
    157161#define BTH_PGMPOOLKIND_PT_FOR_PT   PGMPOOLKIND_PAE_PT_FOR_PHYS
    158162#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_PAE_PDPT_PHYS
     163#include "PGMGstDefs.h"
    159164#include "PGMAllBth.h"
    160165#undef BTH_PGMPOOLKIND_PT_FOR_PT
     
    171176#define BTH_PGMPOOLKIND_PT_FOR_BIG  PGMPOOLKIND_PAE_PT_FOR_32BIT_4MB
    172177#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_PAE_PDPT_FOR_32BIT
     178#include "PGMGstDefs.h"
    173179#include "PGMAllBth.h"
    174180#undef BTH_PGMPOOLKIND_PT_FOR_BIG
     
    187193#define BTH_PGMPOOLKIND_PT_FOR_BIG  PGMPOOLKIND_PAE_PT_FOR_PAE_2MB
    188194#define BTH_PGMPOOLKIND_ROOT        PGMPOOLKIND_PAE_PDPT
     195#include "PGMGstDefs.h"
    189196#include "PGMAllGst.h"
    190197#include "PGMAllBth.h"
     
    214221# define BTH_PGMPOOLKIND_PT_FOR_PT  PGMPOOLKIND_PAE_PT_FOR_PHYS
    215222# define BTH_PGMPOOLKIND_ROOT       PGMPOOLKIND_PAE_PD_PHYS
     223# include "PGMGstDefs.h"
    216224# include "PGMAllBth.h"
    217225# undef BTH_PGMPOOLKIND_PT_FOR_PT
     
    229237#  define BTH_PGMPOOLKIND_PT_FOR_BIG PGMPOOLKIND_PAE_PT_FOR_PAE_2MB
    230238#  define BTH_PGMPOOLKIND_ROOT      PGMPOOLKIND_64BIT_PML4
     239#  include "PGMGstDefs.h"
    231240#  include "PGMAllGst.h"
    232241#  include "PGMAllBth.h"
     
    254263# define PGM_GST_NAME(name)         PGM_GST_NAME_REAL(name)
    255264# define PGM_BTH_NAME(name)         PGM_BTH_NAME_NESTED_REAL(name)
     265# include "PGMGstDefs.h"
    256266# include "PGMAllBth.h"
    257267# undef PGM_BTH_NAME
     
    263273# define PGM_GST_NAME(name)         PGM_GST_NAME_PROT(name)
    264274# define PGM_BTH_NAME(name)         PGM_BTH_NAME_NESTED_PROT(name)
     275# include "PGMGstDefs.h"
    265276# include "PGMAllBth.h"
    266277# undef PGM_BTH_NAME
     
    272283# define PGM_GST_NAME(name)         PGM_GST_NAME_32BIT(name)
    273284# define PGM_BTH_NAME(name)         PGM_BTH_NAME_NESTED_32BIT(name)
     285# include "PGMGstDefs.h"
    274286# include "PGMAllBth.h"
    275287# undef PGM_BTH_NAME
     
    281293# define PGM_GST_NAME(name)         PGM_GST_NAME_PAE(name)
    282294# define PGM_BTH_NAME(name)         PGM_BTH_NAME_NESTED_PAE(name)
     295# include "PGMGstDefs.h"
    283296# include "PGMAllBth.h"
    284297# undef PGM_BTH_NAME
     
    291304#  define PGM_GST_NAME(name)        PGM_GST_NAME_AMD64(name)
    292305#  define PGM_BTH_NAME(name)        PGM_BTH_NAME_NESTED_AMD64(name)
     306#  include "PGMGstDefs.h"
    293307#  include "PGMAllBth.h"
    294308#  undef PGM_BTH_NAME
     
    313327# define PGM_BTH_NAME(name)         PGM_BTH_NAME_EPT_REAL(name)
    314328# define BTH_PGMPOOLKIND_PT_FOR_PT  PGMPOOLKIND_EPT_PT_FOR_PHYS
     329# include "PGMGstDefs.h"
    315330# include "PGMAllBth.h"
    316331# undef BTH_PGMPOOLKIND_PT_FOR_PT
     
    324339# define PGM_BTH_NAME(name)         PGM_BTH_NAME_EPT_PROT(name)
    325340# define BTH_PGMPOOLKIND_PT_FOR_PT  PGMPOOLKIND_EPT_PT_FOR_PHYS
     341# include "PGMGstDefs.h"
    326342# include "PGMAllBth.h"
    327343# undef BTH_PGMPOOLKIND_PT_FOR_PT
     
    335351# define PGM_BTH_NAME(name)         PGM_BTH_NAME_EPT_32BIT(name)
    336352# define BTH_PGMPOOLKIND_PT_FOR_PT  PGMPOOLKIND_EPT_PT_FOR_PHYS
     353# include "PGMGstDefs.h"
    337354# include "PGMAllBth.h"
    338355# undef BTH_PGMPOOLKIND_PT_FOR_PT
     
    346363# define PGM_BTH_NAME(name)         PGM_BTH_NAME_EPT_PAE(name)
    347364# define BTH_PGMPOOLKIND_PT_FOR_PT  PGMPOOLKIND_EPT_PT_FOR_PHYS
     365# include "PGMGstDefs.h"
    348366# include "PGMAllBth.h"
    349367# undef BTH_PGMPOOLKIND_PT_FOR_PT
     
    358376#  define PGM_BTH_NAME(name)        PGM_BTH_NAME_EPT_AMD64(name)
    359377#  define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_EPT_PT_FOR_PHYS
     378#  include "PGMGstDefs.h"
    360379#  include "PGMAllBth.h"
    361380#  undef BTH_PGMPOOLKIND_PT_FOR_PT
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r17207 r17215  
    15721572             * Update statistics and commit the entry.
    15731573             */
     1574#if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE)
    15741575            if (!PteSrc.n.u1Global)
    15751576                pShwPage->fSeenNonGlobal = true;
     1577#endif
    15761578            *pPteDst = PteDst;
    15771579        }
  • trunk/src/VBox/VMM/VMMAll/PGMAllGst.h

    r16918 r17215  
    1919 * additional information or have any questions.
    2020 */
    21 
    22 
    23 /*******************************************************************************
    24 *   Defined Constants And Macros                                               *
    25 *******************************************************************************/
    26 #undef GSTPT
    27 #undef PGSTPT
    28 #undef GSTPTE
    29 #undef PGSTPTE
    30 #undef GSTPD
    31 #undef PGSTPD
    32 #undef GSTPDE
    33 #undef PGSTPDE
    34 #undef GST_BIG_PAGE_SIZE
    35 #undef GST_BIG_PAGE_OFFSET_MASK
    36 #undef GST_PDE_PG_MASK
    37 #undef GST_PDE_BIG_PG_MASK
    38 #undef GST_PD_SHIFT
    39 #undef GST_PD_MASK
    40 #undef GST_PTE_PG_MASK
    41 #undef GST_PT_SHIFT
    42 #undef GST_PT_MASK
    43 #undef GST_TOTAL_PD_ENTRIES
    44 #undef GST_CR3_PAGE_MASK
    45 #undef GST_PDPE_ENTRIES
    46 #undef GST_PDPT_SHIFT
    47 #undef GST_PDPT_MASK
    48 #undef GST_PDPE_PG_MASK
    49 #undef GST_GET_PDE_BIG_PG_GCPHYS
    50 
    51 #if PGM_GST_TYPE == PGM_TYPE_REAL \
    52  || PGM_GST_TYPE == PGM_TYPE_PROT
    53 # define GSTPT                      SHWPT
    54 # define PGSTPT                     PSHWPT
    55 # define GSTPTE                     SHWPTE
    56 # define PGSTPTE                    PSHWPTE
    57 # define GSTPD                      SHWPD
    58 # define PGSTPD                     PSHWPD
    59 # define GSTPDE                     SHWPDE
    60 # define PGSTPDE                    PSHWPDE
    61 # define GST_PTE_PG_MASK            SHW_PTE_PG_MASK
    62 
    63 #elif PGM_GST_TYPE == PGM_TYPE_32BIT
    64 # define GSTPT                      X86PT
    65 # define PGSTPT                     PX86PT
    66 # define GSTPTE                     X86PTE
    67 # define PGSTPTE                    PX86PTE
    68 # define GSTPD                      X86PD
    69 # define PGSTPD                     PX86PD
    70 # define GSTPDE                     X86PDE
    71 # define PGSTPDE                    PX86PDE
    72 # define GST_BIG_PAGE_SIZE          X86_PAGE_4M_SIZE
    73 # define GST_BIG_PAGE_OFFSET_MASK   X86_PAGE_4M_OFFSET_MASK
    74 # define GST_PDE_PG_MASK            X86_PDE_PG_MASK
    75 # define GST_PDE_BIG_PG_MASK        X86_PDE4M_PG_MASK
    76 # define GST_GET_PDE_BIG_PG_GCPHYS(PdeGst)  pgmGstGet4MBPhysPage(&pVM->pgm.s, PdeGst)
    77 # define GST_PD_SHIFT               X86_PD_SHIFT
    78 # define GST_PD_MASK                X86_PD_MASK
    79 # define GST_TOTAL_PD_ENTRIES       X86_PG_ENTRIES
    80 # define GST_PTE_PG_MASK            X86_PTE_PG_MASK
    81 # define GST_PT_SHIFT               X86_PT_SHIFT
    82 # define GST_PT_MASK                X86_PT_MASK
    83 # define GST_CR3_PAGE_MASK          X86_CR3_PAGE_MASK
    84 
    85 #elif   PGM_GST_TYPE == PGM_TYPE_PAE \
    86      || PGM_GST_TYPE == PGM_TYPE_AMD64
    87 # define GSTPT                      X86PTPAE
    88 # define PGSTPT                     PX86PTPAE
    89 # define GSTPTE                     X86PTEPAE
    90 # define PGSTPTE                    PX86PTEPAE
    91 # define GSTPD                      X86PDPAE
    92 # define PGSTPD                     PX86PDPAE
    93 # define GSTPDE                     X86PDEPAE
    94 # define PGSTPDE                    PX86PDEPAE
    95 # define GST_BIG_PAGE_SIZE          X86_PAGE_2M_SIZE
    96 # define GST_BIG_PAGE_OFFSET_MASK   X86_PAGE_2M_OFFSET_MASK
    97 # define GST_PDE_PG_MASK            X86_PDE_PAE_PG_MASK_FULL
    98 # define GST_PDE_BIG_PG_MASK        X86_PDE2M_PAE_PG_MASK
    99 # define GST_GET_PDE_BIG_PG_GCPHYS(PdeGst)  (PdeGst.u & GST_PDE_BIG_PG_MASK)
    100 # define GST_PD_SHIFT               X86_PD_PAE_SHIFT
    101 # define GST_PD_MASK                X86_PD_PAE_MASK
    102 # if PGM_GST_TYPE == PGM_TYPE_PAE
    103 #  define GST_TOTAL_PD_ENTRIES      (X86_PG_PAE_ENTRIES * X86_PG_PAE_PDPE_ENTRIES)
    104 #  define GST_PDPE_ENTRIES          X86_PG_PAE_PDPE_ENTRIES
    105 #  define GST_PDPE_PG_MASK          X86_PDPE_PG_MASK_FULL
    106 #  define GST_PDPT_SHIFT            X86_PDPT_SHIFT
    107 #  define GST_PDPT_MASK             X86_PDPT_MASK_PAE
    108 #  define GST_PTE_PG_MASK           X86_PTE_PAE_PG_MASK
    109 #  define GST_CR3_PAGE_MASK         X86_CR3_PAE_PAGE_MASK
    110 # else
    111 #  define GST_TOTAL_PD_ENTRIES      (X86_PG_AMD64_ENTRIES * X86_PG_AMD64_PDPE_ENTRIES)
    112 #  define GST_PDPE_ENTRIES          X86_PG_AMD64_PDPE_ENTRIES
    113 #  define GST_PDPT_SHIFT            X86_PDPT_SHIFT
    114 #  define GST_PDPE_PG_MASK          X86_PDPE_PG_MASK_FULL
    115 #  define GST_PDPT_MASK             X86_PDPT_MASK_AMD64
    116 #  define GST_PTE_PG_MASK           X86_PTE_PAE_PG_MASK_FULL
    117 #  define GST_CR3_PAGE_MASK         X86_CR3_AMD64_PAGE_MASK
    118 # endif
    119 # define GST_PT_SHIFT               X86_PT_PAE_SHIFT
    120 # define GST_PT_MASK                X86_PT_PAE_MASK
    121 #endif
    12221
    12322
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