VirtualBox

Changeset 7666 in vbox for trunk/src


Ignore:
Timestamp:
Mar 31, 2008 3:02:43 PM (17 years ago)
Author:
vboxsync
Message:

Put back the original PAE defines. AMD differs from Intel wrt valid pae & long mode physical address bits.

Location:
trunk/src/VBox/VMM/VMMAll
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r7664 r7666  
    864864            PPGMPOOLPAGE    pShwPage = pgmPoolGetPageByHCPhys(pVM, PdeDst.u & SHW_PDE_PG_MASK);
    865865            RTGCPHYS        GCPhys   = PdeSrc.u & GST_PDE_PG_MASK;
    866 #  if PGM_SHW_TYPE != PGM_TYPE_32BIT
     866#  if    PGM_SHW_TYPE != PGM_TYPE_32BIT \
     867      && PGM_GST_TYPE == PGM_TYPE_32BIT   
     868            /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */
    867869            GCPhys |= (iPDDst & 1) * (PAGE_SIZE/2);
    868870#  endif
     
    12691271    {
    12701272        GCPhys = PdeSrc.u & GST_PDE_PG_MASK;
    1271 # if PGM_SHW_TYPE != PGM_TYPE_32BIT
     1273#  if    PGM_SHW_TYPE != PGM_TYPE_32BIT \
     1274      && PGM_GST_TYPE == PGM_TYPE_32BIT   
     1275            /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */
     1276        /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */
    12721277        GCPhys |= (iPDDst & 1) * (PAGE_SIZE/2);
    12731278# endif
     
    12781283#  if    PGM_SHW_TYPE != PGM_TYPE_32BIT \
    12791284      && PGM_GST_TYPE == PGM_TYPE_32BIT
    1280         /* Select the right PDE as we're emulating a 4MB page with two 2 MB shadow PDEs */
     1285        /* Select the right PDE as we're emulating a 4MB page directory with two 2 MB shadow PDEs */
    12811286        GCPhys |= GCPtrPage & (1 << X86_PD_PAE_SHIFT);
    12821287# endif
  • trunk/src/VBox/VMM/VMMAll/PGMAllGst.h

    r7660 r7666  
    6262# define GST_PT_MASK                X86_PT_MASK
    6363# define GST_CR3_PAGE_MASK          X86_CR3_PAGE_MASK
    64 #elif PGM_GST_TYPE == PGM_TYPE_PAE
     64#elif   PGM_GST_TYPE == PGM_TYPE_PAE \
     65     || PGM_GST_TYPE == PGM_TYPE_AMD64
    6566# define GSTPT                      X86PTPAE
    6667# define PGSTPT                     PX86PTPAE
     
    7879# define GST_PD_MASK                X86_PD_PAE_MASK
    7980# define GST_TOTAL_PD_ENTRIES       (X86_PG_PAE_ENTRIES*4)
    80 # define GST_PTE_PG_MASK            X86_PTE_PAE_PG_MASK
    81 # define GST_PT_SHIFT               X86_PT_PAE_SHIFT
    82 # define GST_PT_MASK                X86_PT_PAE_MASK
    83 # define GST_CR3_PAGE_MASK          X86_CR3_PAE_PAGE_MASK
    84 #elif PGM_GST_TYPE == PGM_TYPE_AMD64
    85 /* @todo */
    86 # define GSTPT                      X86PTPAE
    87 # define PGSTPT                     PX86PTPAE
    88 # define GSTPTE                     X86PTEPAE
    89 # define PGSTPTE                    PX86PTEPAE
    90 # define GSTPD                      X86PDPAE
    91 # define PGSTPD                     PX86PDPAE
    92 # define GSTPDE                     X86PDEPAE
    93 # define PGSTPDE                    PX86PDEPAE
    94 # define GST_BIG_PAGE_SIZE          X86_PAGE_2M_SIZE
    95 # define GST_BIG_PAGE_OFFSET_MASK   X86_PAGE_2M_OFFSET_MASK
    96 # define GST_PDE_PG_MASK            X86_PDE_PAE_PG_MASK
    97 # define GST_PDE_BIG_PG_MASK        X86_PDE2M_AMD64_PG_MASK
    98 # define GST_PD_SHIFT               X86_PD_PAE_SHIFT
    99 # define GST_PD_MASK                X86_PD_PAE_MASK
    100 # define GST_TOTAL_PD_ENTRIES       (X86_PG_PAE_ENTRIES*512)
    10181# define GST_PTE_PG_MASK            X86_PTE_PAE_PG_MASK
    10282# define GST_PT_SHIFT               X86_PT_PAE_SHIFT
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