VirtualBox

Changeset 9092 in vbox


Ignore:
Timestamp:
May 23, 2008 4:03:14 PM (17 years ago)
Author:
vboxsync
Message:

We need a real shadow paging backend for PGMHandlerPhysicalPageTempOff (e.g. VGA optimization).

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

Legend:

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

    r9030 r9092  
    25782578    rc = PGM_BTH_NAME_AMD64_AMD64(InitData)( pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
    25792579
     2580    /* The nested paging mode. */
    25802581    pModeData = &pVM->pgm.s.paModeData[pgmModeDataIndex(PGM_TYPE_NESTED, PGM_TYPE_REAL)];
    25812582    pModeData->uShwType = PGM_TYPE_NESTED;
    25822583    pModeData->uGstType = PGM_TYPE_REAL;
    2583     rc = PGM_SHW_NAME_NESTED(InitData)(      pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
    25842584    rc = PGM_GST_NAME_REAL(InitData)(        pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
    25852585    rc = PGM_BTH_NAME_NESTED_REAL(InitData)( pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
     
    25882588    pModeData->uShwType = PGM_TYPE_NESTED;
    25892589    pModeData->uGstType = PGM_TYPE_PROT;
    2590     rc = PGM_SHW_NAME_NESTED(InitData)(      pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
    25912590    rc = PGM_GST_NAME_PROT(InitData)(        pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
    25922591    rc = PGM_BTH_NAME_NESTED_PROT(InitData)( pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
     
    25952594    pModeData->uShwType = PGM_TYPE_NESTED;
    25962595    pModeData->uGstType = PGM_TYPE_32BIT;
    2597     rc = PGM_SHW_NAME_NESTED(InitData)(      pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
    25982596    rc = PGM_GST_NAME_32BIT(InitData)(       pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
    25992597    rc = PGM_BTH_NAME_NESTED_32BIT(InitData)(pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
     
    26022600    pModeData->uShwType = PGM_TYPE_NESTED;
    26032601    pModeData->uGstType = PGM_TYPE_PAE;
    2604     rc = PGM_SHW_NAME_NESTED(InitData)(      pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
    26052602    rc = PGM_GST_NAME_PAE(InitData)(         pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
    26062603    rc = PGM_BTH_NAME_NESTED_PAE(InitData)(  pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
     
    26092606    pModeData->uShwType = PGM_TYPE_NESTED;
    26102607    pModeData->uGstType = PGM_TYPE_AMD64;
    2611     rc = PGM_SHW_NAME_NESTED(InitData)(       pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
    26122608    rc = PGM_GST_NAME_AMD64(InitData)(        pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
    26132609    rc = PGM_BTH_NAME_NESTED_AMD64(InitData)( pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
    26142610
     2611    /* The shadow part of the nested callback mode depends on the host paging mode (AMD-V only). */
     2612    switch(pVM->pgm.s.enmHostMode)
     2613    {
     2614    case SUPPAGINGMODE_32_BIT:
     2615    case SUPPAGINGMODE_32_BIT_GLOBAL:
     2616        for (unsigned i=PGM_TYPE_REAL;i<=PGM_TYPE_AMD64;i++)
     2617        {
     2618            pModeData = &pVM->pgm.s.paModeData[pgmModeDataIndex(PGM_TYPE_NESTED, i)];
     2619            rc = PGM_SHW_NAME_32BIT(InitData)(      pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
     2620        }
     2621        break;
     2622
     2623    case SUPPAGINGMODE_PAE:
     2624    case SUPPAGINGMODE_PAE_NX:
     2625    case SUPPAGINGMODE_PAE_GLOBAL:
     2626    case SUPPAGINGMODE_PAE_GLOBAL_NX:
     2627        for (unsigned i=PGM_TYPE_REAL;i<=PGM_TYPE_AMD64;i++)
     2628        {
     2629            pModeData = &pVM->pgm.s.paModeData[pgmModeDataIndex(PGM_TYPE_NESTED, i)];
     2630            rc = PGM_SHW_NAME_PAE(InitData)(      pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
     2631        }
     2632        break;
     2633
     2634    case SUPPAGINGMODE_AMD64:
     2635    case SUPPAGINGMODE_AMD64_GLOBAL:
     2636    case SUPPAGINGMODE_AMD64_NX:
     2637    case SUPPAGINGMODE_AMD64_GLOBAL_NX:
     2638        for (unsigned i=PGM_TYPE_REAL;i<=PGM_TYPE_AMD64;i++)
     2639        {
     2640            pModeData = &pVM->pgm.s.paModeData[pgmModeDataIndex(PGM_TYPE_NESTED, i)];
     2641            rc = PGM_SHW_NAME_AMD64(InitData)(      pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc);
     2642        }
     2643        break;
     2644    }
    26152645    return VINF_SUCCESS;
    26162646}
  • trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp

    r9082 r9092  
    14221422        Assert(!pVM->hwaccm.s.fNestedPaging);
    14231423
    1424         /* Truly a pita. Why can't SVM give the same information as VMX? */
     1424        /* Truly a pita. Why can't SVM give the same information as VT-x? */
    14251425        rc = SVMR0InterpretInvpg(pVM, CPUMCTX2CORE(pCtx), pVMCB->ctrl.TLBCtrl.n.u32ASID);
    14261426        if (rc == VINF_SUCCESS)
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