VirtualBox

忽略:
時間撮記:
2012-11-15 上午08:52:11 (12 年 以前)
作者:
vboxsync
訊息:

Make VBOX_WITH_RAW_MODE= link.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/VMM/VMMR3/PGMMap.cpp

    r43387 r43872  
    3737*   Internal Functions                                                         *
    3838*******************************************************************************/
     39#ifndef PGM_WITHOUT_MAPPINGS
    3940static void pgmR3MapClearPDEs(PVM pVM, PPGMMAPPING pMap, unsigned iOldPDE);
    4041static void pgmR3MapSetPDEs(PVM pVM, PPGMMAPPING pMap, unsigned iNewPDE);
    4142static int  pgmR3MapIntermediateCheckOne(PVM pVM, uintptr_t uAddress, unsigned cPages, PX86PT pPTDefault, PX86PTPAE pPTPaeDefault);
    4243static void pgmR3MapIntermediateDoOne(PVM pVM, uintptr_t uAddress, RTHCPHYS HCPhys, unsigned cPages, PX86PT pPTDefault, PX86PTPAE pPTPaeDefault);
     44#else
     45# define pgmR3MapClearPDEs(pVM, pMap, iNewPDE) do { } while (0)
     46# define pgmR3MapSetPDEs(pVM, pMap, iNewPDE)   do { } while (0)
     47#endif
    4348
    4449
     
    210215}
    211216
     217#ifdef VBOX_WITH_UNUSED_CODE
    212218
    213219/**
     
    280286    return VERR_INVALID_PARAMETER;
    281287}
     288
     289#endif /* unused */
    282290
    283291
     
    484492{
    485493    RTGCPTR cb = 0;
     494#ifndef PGM_WITHOUT_MAPPINGS
    486495    for (PPGMMAPPING pCur = pVM->pgm.s.pMappingsR3; pCur; pCur = pCur->pNextR3)
    487496        cb += pCur->cb;
     497#endif
    488498
    489499    *pcb = cb;
     
    507517         GCPtrBase, cb, pVM->pgm.s.fMappingsFixed, pVM->pgm.s.fMappingsDisabled));
    508518
    509     /*
    510      * Ignore the additions mapping fix call if disabled.
    511      */
    512     if (!pgmMapAreMappingsEnabled(pVM))
    513     {
    514         Assert(HMIsEnabled(pVM));
    515         return VINF_SUCCESS;
    516     }
    517 
    518     /*
    519      * Only applies to VCPU 0 as we don't support SMP guests with raw mode.
    520      */
    521     Assert(pVM->cCpus == 1);
    522     PVMCPU pVCpu = &pVM->aCpus[0];
    523 
    524     /*
    525      * Before we do anything we'll do a forced PD sync to try make sure any
    526      * pending relocations because of these mappings have been resolved.
    527      */
    528     PGMSyncCR3(pVCpu, CPUMGetGuestCR0(pVCpu), CPUMGetGuestCR3(pVCpu), CPUMGetGuestCR4(pVCpu), true);
    529 
    530     return pgmR3MappingsFixInternal(pVM, GCPtrBase, cb);
    531 }
    532 
    533 
     519#ifndef PGM_WITHOUT_MAPPINGS
     520    if (pgmMapAreMappingsEnabled(pVM))
     521    {
     522        /*
     523         * Only applies to VCPU 0 as we don't support SMP guests with raw mode.
     524         */
     525        Assert(pVM->cCpus == 1);
     526        PVMCPU pVCpu = &pVM->aCpus[0];
     527
     528        /*
     529         * Before we do anything we'll do a forced PD sync to try make sure any
     530         * pending relocations because of these mappings have been resolved.
     531         */
     532        PGMSyncCR3(pVCpu, CPUMGetGuestCR0(pVCpu), CPUMGetGuestCR3(pVCpu), CPUMGetGuestCR4(pVCpu), true);
     533
     534        return pgmR3MappingsFixInternal(pVM, GCPtrBase, cb);
     535    }
     536#endif /* !PGM_WITHOUT_MAPPINGS */
     537
     538    Assert(HMIsEnabled(pVM));
     539    return VINF_SUCCESS;
     540}
     541
     542
     543#ifndef PGM_WITHOUT_MAPPINGS
    534544/**
    535545 * Internal worker for PGMR3MappingsFix and pgmR3Load.
     
    671681    return VINF_SUCCESS;
    672682}
     683#endif /*!PGM_WITHOUT_MAPPINGS*/
     684
    673685
    674686
     
    689701        return VINF_SUCCESS;
    690702
     703#ifdef VBOX_WITH_RAW_MODE
    691704    /*
    692705     * Deactivate (only applies to Virtual CPU #0).
     
    699712        AssertRCReturn(rc, rc);
    700713    }
     714#endif /* VBOX_WITH_RAW_MODE */
    701715
    702716    /*
     
    758772}
    759773
     774#ifndef PGM_WITHOUT_MAPPINGS
    760775
    761776/**
     
    13451360}
    13461361
     1362#endif /* !PGM_WITHOUT_MAPPINGS */
    13471363
    13481364/**
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette