VirtualBox

Changeset 16194 in vbox for trunk/src


Ignore:
Timestamp:
Jan 23, 2009 10:51:24 AM (16 years ago)
Author:
vboxsync
Message:

pgmShwSyncLongModePDPtr: removed redudant code.

File:
1 edited

Legend:

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

    r16172 r16194  
    918918    bool           fNestedPaging = HWACCMIsNestedPagingActive(pVM);
    919919    PPGMPOOLPAGE   pShwPage;
    920     X86PML4E       Pml4eGst;
    921920    int            rc;
    922921
     
    928927        if (!fNestedPaging)
    929928        {
    930             /** @todo why are we looking up the guest PML4E here?  Isn't pGstPml4e
    931              *        trustworthy? (Remove pgmGstGetLongModePML4E if pGstPml4e and pGstPdpe
    932              *        are fine.) */
     929            Assert(pGstPml4e && pGstPdpe);
    933930            Assert(pVM->pgm.s.CTX_SUFF(pShwPageCR3));
    934             Pml4eGst = pgmGstGetLongModePML4E(&pVM->pgm.s, iPml4);
    935 
    936             rc = pgmPoolAlloc(pVM, Pml4eGst.u & X86_PML4E_PG_MASK,
     931
     932            rc = pgmPoolAlloc(pVM, pGstPml4e->u & X86_PML4E_PG_MASK,
    937933                              PGMPOOLKIND_64BIT_PDPT_FOR_64BIT_PDPT, pVM->pgm.s.CTX_SUFF(pShwPageCR3)->idx, iPml4, &pShwPage);
    938934        }
    939935        else
    940936        {
     937            /* AMD-V nested paging. (Intel EPT never comes here) */
    941938            RTGCPTR64 GCPml4 = (RTGCPTR64)iPml4 << EPT_PML4_SHIFT;
    942939            rc = pgmPoolAlloc(pVM, GCPml4 + RT_BIT_64(63) /* hack: make the address unique */,
     
    972969        if (!fNestedPaging)
    973970        {
    974             /** @todo why are we looking up the guest PDPTE here?  Isn't pGstPdpe
    975              *        trustworthy? */
    976             Pml4eGst = pgmGstGetLongModePML4E(&pVM->pgm.s, iPml4);
    977             PX86PDPT pPdptGst;
    978             rc = PGM_GCPHYS_2_PTR(pVM, Pml4eGst.u & X86_PML4E_PG_MASK, &pPdptGst);
    979             AssertRCReturn(rc, rc);
    980 
     971            Assert(pGstPml4e && pGstPdpe);
    981972            Assert(!(pPdpe->u & X86_PDPE_PG_MASK));
    982973            /* Create a reference back to the PDPT by using the index in its shadow page. */
    983             rc = pgmPoolAlloc(pVM, pPdptGst->a[iPdPt].u & X86_PDPE_PG_MASK, PGMPOOLKIND_64BIT_PD_FOR_64BIT_PD, pShwPage->idx, iPdPt, &pShwPage);
     974            rc = pgmPoolAlloc(pVM, pGstPdpe->u & X86_PDPE_PG_MASK, PGMPOOLKIND_64BIT_PD_FOR_64BIT_PD, pShwPage->idx, iPdPt, &pShwPage);
    984975        }
    985976        else
    986977        {
     978            /* AMD-V nested paging. (Intel EPT never comes here) */
    987979            RTGCPTR64 GCPdPt = (RTGCPTR64)iPdPt << EPT_PDPT_SHIFT;
    988980
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