VirtualBox

Changeset 17483 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Mar 6, 2009 3:59:52 PM (16 years ago)
Author:
vboxsync
Message:

Cleaned up nested paging init and removed obsolete structure members.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r17465 r17483  
    14281428{
    14291429#ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
    1430     PGMMODE enmShadowMode = pVM->pgm.s.enmShadowMode;
    1431     switch (enmShadowMode)
    1432     {
    1433         case PGMMODE_EPT:
    1434             return pVM->pgm.s.HCPhysShwNestedRoot;
    1435 
    1436         default:
    1437             return pVM->pgm.s.HCPhysShwCR3;
    1438     }
     1430    Assert(pVM->pgm.s.CTX_SUFF(pShwPageCR3));
     1431    return pVM->pgm.s.CTX_SUFF(pShwPageCR3)->Core.Key;
    14391432#else
    14401433    PGMMODE enmShadowMode = pVM->pgm.s.enmShadowMode;
     
    14741467{
    14751468#ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
    1476     return pVM->pgm.s.HCPhysShwCR3;
     1469    Assert(pVM->pgm.s.CTX_SUFF(pShwPageCR3));
     1470    return pVM->pgm.s.CTX_SUFF(pShwPageCR3)->Core.Key;
    14771471#else
    14781472    switch (enmShadowMode)
     
    15161510{
    15171511#ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
    1518     return pVM->pgm.s.HCPhysShwCR3;
     1512    Assert(pVM->pgm.s.CTX_SUFF(pShwPageCR3));
     1513    return pVM->pgm.s.CTX_SUFF(pShwPageCR3)->Core.Key;
    15191514#else
    15201515    return pVM->pgm.s.HCPhysShw32BitPD;
     
    15311526{
    15321527#ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
    1533     return pVM->pgm.s.HCPhysShwCR3;
     1528    Assert(pVM->pgm.s.CTX_SUFF(pShwPageCR3));
     1529    return pVM->pgm.s.CTX_SUFF(pShwPageCR3)->Core.Key;
    15341530#else
    15351531    return pVM->pgm.s.HCPhysShwPaePdpt;
     
    15451541VMMDECL(RTHCPHYS) PGMGetHyperAmd64CR3(PVM pVM)
    15461542{
     1543#ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
     1544    Assert(pVM->pgm.s.CTX_SUFF(pShwPageCR3));
     1545    return pVM->pgm.s.CTX_SUFF(pShwPageCR3)->Core.Key;
     1546#else
    15471547    return pVM->pgm.s.HCPhysShwCR3;
     1548#endif
    15481549}
    15491550
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r17438 r17483  
    973973# else /* PGM_SHW_TYPE == PGM_TYPE_AMD64 */
    974974    /* PML4 */
     975#  ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    975976    AssertReturn(pVM->pgm.s.pShwRootR3, VERR_INTERNAL_ERROR);
     977#  endif
    976978
    977979    const unsigned  iPml4     = (GCPtrPage >> X86_PML4_SHIFT) & X86_PML4_MASK;
     
    47744776    pVM->pgm.s.pShwPageCR3RC = MMHyperCCToRC(pVM, pVM->pgm.s.CTX_SUFF(pShwPageCR3));
    47754777#  endif
    4776     pVM->pgm.s.pShwRootR3    = (R3PTRTYPE(void *))pVM->pgm.s.CTX_SUFF(pShwPageCR3)->pvPageR3;
    4777     Assert(pVM->pgm.s.pShwRootR3);
    4778 #  ifndef VBOX_WITH_2X_4GB_ADDR_SPACE
    4779     pVM->pgm.s.pShwRootR0    = (R0PTRTYPE(void *))PGMPOOL_PAGE_2_PTR(pPool->CTX_SUFF(pVM), pVM->pgm.s.CTX_SUFF(pShwPageCR3));
    4780 #  endif
    4781     pVM->pgm.s.HCPhysShwCR3  = pVM->pgm.s.CTX_SUFF(pShwPageCR3)->Core.Key;
    47824778
    47834779#  ifndef PGM_WITHOUT_MAPPINGS
     
    48994895# endif
    49004896
    4901     pVM->pgm.s.pShwRootR3 = 0;
    4902 #  ifndef VBOX_WITH_2X_4GB_ADDR_SPACE
    4903     pVM->pgm.s.pShwRootR0 = 0;
    4904 #  endif
    4905     pVM->pgm.s.HCPhysShwCR3 = 0;
    49064897    if (pVM->pgm.s.CTX_SUFF(pShwPageCR3))
    49074898    {
    49084899        PPGMPOOL pPool = pVM->pgm.s.CTX_SUFF(pPool);
     4900
     4901        Assert(pVM->pgm.s.iShwUser != PGMPOOL_IDX_NESTED_ROOT);
    49094902
    49104903        /* Mark the page as unlocked; allow flushing again. */
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r17470 r17483  
    137137#endif
    138138
    139 #if defined(IN_RC) || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0)
     139#if !defined(VBOX_WITH_PGMPOOL_PAGING_ONLY) && (defined(IN_RC) || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0))
    140140/**
    141141 * Maps a pool page into the current context.
     
    156156    switch (pPage->idx)
    157157    {
    158 #  ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
    159         case PGMPOOL_IDX_PD:
    160         case PGMPOOL_IDX_PDPT:
    161         case PGMPOOL_IDX_AMD64_CR3:
    162             return pPGM->pShwRootRC;
    163 #  else
    164158        case PGMPOOL_IDX_PD:
    165159            return pPGM->pShw32BitPdRC;
     
    175169        case PGMPOOL_IDX_PDPT:
    176170            return pPGM->pShwPaePdptRC;
    177 #  endif
    178171        default:
    179172            AssertReleaseMsgFailed(("Invalid index %d\n", pPage->idx));
     
    185178    switch (pPage->idx)
    186179    {
    187 #  ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
    188         case PGMPOOL_IDX_PD:
    189         case PGMPOOL_IDX_PDPT:
    190         case PGMPOOL_IDX_AMD64_CR3:
    191             HCPhys = pPGM->HCPhysShwCR3;
    192             break;
    193 
    194         case PGMPOOL_IDX_NESTED_ROOT:
    195             HCPhys = pPGM->HCPhysShwNestedRoot;
    196             break;
    197 #  else
    198180        case PGMPOOL_IDX_PD:
    199181            HCPhys = pPGM->HCPhysShw32BitPD;
     
    220202            AssertReleaseMsgFailed(("PGMPOOL_IDX_PAE_PD is not usable in VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 context\n"));
    221203            return NULL;
    222 #  endif
    223204        default:
    224205            AssertReleaseMsgFailed(("Invalid index %d\n", pPage->idx));
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