VirtualBox

vbox的更動 17371 路徑 trunk/src/VBox/VMM/PGM.cpp


忽略:
時間撮記:
2009-3-5 上午01:37:58 (16 年 以前)
作者:
vboxsync
訊息:

PGM,GMM: Hacking on the new phys code.

檔案:
修改 1 筆資料

圖例:

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

    r17305 r17371  
    11601160{
    11611161    LogFlow(("PGMR3Init:\n"));
     1162    PCFGMNODE pCfgPGM = CFGMR3GetChild(CFGMR3GetRoot(pVM), "/PGM");
     1163    int rc;
    11621164
    11631165    /*
     
    11691171     * Init the structure.
    11701172     */
    1171     pVM->pgm.s.offVM = RT_OFFSETOF(VM, pgm.s);
    1172     pVM->pgm.s.offVCpu = RT_OFFSETOF(VMCPU, pgm.s);
     1173    pVM->pgm.s.offVM            = RT_OFFSETOF(VM, pgm.s);
     1174    pVM->pgm.s.offVCpu          = RT_OFFSETOF(VMCPU, pgm.s);
    11731175    pVM->pgm.s.enmShadowMode    = PGMMODE_INVALID;
    11741176    pVM->pgm.s.enmGuestMode     = PGMMODE_INVALID;
     
    11961198    }
    11971199
    1198 #ifdef VBOX_STRICT
    1199     VMR3AtStateRegister(pVM, pgmR3ResetNoMorePhysWritesFlag, NULL);
    1200 #endif
    1201     PGMRegisterStringFormatTypes();
     1200    rc = CFGMR3QueryBoolDef(pCfgPGM, "RamPreAlloc", &pVM->pgm.s.fRamPreAlloc, false);
     1201    AssertLogRelRCReturn(rc, rc);
     1202
     1203#if HC_ARCH_BITS == 64
     1204    rc = CFGMR3QueryU32Def(pCfgPGM, "MaxRing3Chunks", &pVM->pgm.s.ChunkR3Map.cMax, UINT32_MAX);
     1205#else
     1206    rc = CFGMR3QueryU32Def(pCfgPGM, "MaxRing3Chunks", &pVM->pgm.s.ChunkR3Map.cMax, _1G / GMM_CHUNK_SIZE);
     1207#endif
     1208    AssertLogRelRCReturn(rc, rc);
     1209    for (uint32_t i = 0; i < RT_ELEMENTS(pVM->pgm.s.ChunkR3Map.Tlb.aEntries); i++)
     1210        pVM->pgm.s.ChunkR3Map.Tlb.aEntries[i].idChunk = NIL_GMM_CHUNKID;
    12021211
    12031212    /*
     
    12051214     */
    12061215    uint64_t    cbRam;
    1207     int rc = CFGMR3QueryU64(CFGMR3GetRoot(pVM), "RamSize", &cbRam);
     1216    rc = CFGMR3QueryU64(CFGMR3GetRoot(pVM), "RamSize", &cbRam);
    12081217    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    12091218        cbRam = pVM->pgm.s.cbRamSize = 0;
     
    12221231
    12231232    /*
    1224      * Register saved state data unit.
    1225      */
     1233     * Register callbacks, string formatters and the saved state data unit.
     1234     */
     1235#ifdef VBOX_STRICT
     1236    VMR3AtStateRegister(pVM, pgmR3ResetNoMorePhysWritesFlag, NULL);
     1237#endif
     1238    PGMRegisterStringFormatTypes();
     1239
    12261240    rc = SSMR3RegisterInternal(pVM, "pgm", 1, PGM_SAVED_STATE_VERSION, (size_t)cbRam + sizeof(PGM),
    12271241                               NULL, pgmR3Save, NULL,
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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