VirtualBox

vbox的更動 19141 路徑 trunk/src/VBox/VMM/SELM.cpp


忽略:
時間撮記:
2009-4-23 下午01:52:18 (16 年 以前)
作者:
vboxsync
訊息:

Action flags breakup.
Fixed PGM saved state loading of 2.2.2 images.
Reduced hacks in PATM state loading (fixups).

檔案:
修改 1 筆資料

圖例:

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

    r18988 r19141  
    223223     * Default action when entering raw mode for the first time
    224224     */
    225     VM_FF_SET(pVM, VM_FF_SELM_SYNC_TSS);
    226     VM_FF_SET(pVM, VM_FF_SELM_SYNC_GDT);
    227     VM_FF_SET(pVM, VM_FF_SELM_SYNC_LDT);
     225    PVMCPU pVCpu = &pVM->aCpus[0];  /* raw mode implies on VCPU */
     226    VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_TSS);
     227    VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_GDT);
     228    VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_LDT);
    228229
    229230    /*
     
    579580     * Default action when entering raw mode for the first time
    580581     */
    581     VM_FF_SET(pVM, VM_FF_SELM_SYNC_TSS);
    582     VM_FF_SET(pVM, VM_FF_SELM_SYNC_GDT);
    583     VM_FF_SET(pVM, VM_FF_SELM_SYNC_LDT);
     582    PVMCPU pVCpu = &pVM->aCpus[0];  /* raw mode implies on VCPU */
     583    VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_TSS);
     584    VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_GDT);
     585    VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_LDT);
    584586}
    585587
     
    651653#endif
    652654
    653     VM_FF_CLEAR(pVM, VM_FF_SELM_SYNC_TSS);
    654     VM_FF_CLEAR(pVM, VM_FF_SELM_SYNC_GDT);
    655     VM_FF_CLEAR(pVM, VM_FF_SELM_SYNC_LDT);
     655    PVMCPU pVCpu = &pVM->aCpus[0];  /* raw mode implies on VCPU */
     656    VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_TSS);
     657    VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_GDT);
     658    VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_LDT);
    656659
    657660    pVM->selm.s.fDisableMonitoring = true;
     
    774777    if (PGMGetGuestMode(pVCpu) != PGMMODE_REAL)
    775778    {
    776         VM_FF_SET(pVM, VM_FF_SELM_SYNC_GDT);
    777         VM_FF_SET(pVM, VM_FF_SELM_SYNC_LDT);
    778         VM_FF_SET(pVM, VM_FF_SELM_SYNC_TSS);
     779        VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_GDT);
     780        VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_LDT);
     781        VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_TSS);
    779782        SELMR3UpdateFromCPUM(pVM, pVCpu);
    780783    }
     
    783786     * Flag everything for resync on next raw mode entry.
    784787     */
    785     VM_FF_SET(pVM, VM_FF_SELM_SYNC_GDT);
    786     VM_FF_SET(pVM, VM_FF_SELM_SYNC_LDT);
    787     VM_FF_SET(pVM, VM_FF_SELM_SYNC_TSS);
     788    VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_GDT);
     789    VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_LDT);
     790    VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_TSS);
    788791
    789792    return VINF_SUCCESS;
     
    804807    if (pVM->selm.s.fDisableMonitoring)
    805808    {
    806         VM_FF_CLEAR(pVM, VM_FF_SELM_SYNC_GDT);
    807         VM_FF_CLEAR(pVM, VM_FF_SELM_SYNC_LDT);
    808         VM_FF_CLEAR(pVM, VM_FF_SELM_SYNC_TSS);
     809        VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_GDT);
     810        VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_LDT);
     811        VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_TSS);
    809812
    810813        return VINF_SUCCESS;
     
    816819     * GDT sync
    817820     */
    818     if (VM_FF_ISSET(pVM, VM_FF_SELM_SYNC_GDT))
     821    if (VMCPU_FF_ISSET(pVCpu, VMCPU_FF_SELM_SYNC_GDT))
    819822    {
    820823        /*
    821824         * Always assume the best
    822825         */
    823         VM_FF_CLEAR(pVM, VM_FF_SELM_SYNC_GDT);
     826        VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_GDT);
    824827
    825828        /* If the GDT was changed, then make sure the LDT is checked too */
    826829        /** @todo only do this if the actual ldtr selector was changed; this is a bit excessive */
    827         VM_FF_SET(pVM, VM_FF_SELM_SYNC_LDT);
     830        VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_LDT);
    828831        /* Same goes for the TSS selector */
    829         VM_FF_SET(pVM, VM_FF_SELM_SYNC_TSS);
     832        VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_TSS);
    830833
    831834        /*
     
    10741077     * TSS sync
    10751078     */
    1076     if (VM_FF_ISSET(pVM, VM_FF_SELM_SYNC_TSS))
     1079    if (VMCPU_FF_ISSET(pVCpu, VMCPU_FF_SELM_SYNC_TSS))
    10771080    {
    10781081        SELMR3SyncTSS(pVM, pVCpu);
     
    10821085     * LDT sync
    10831086     */
    1084     if (VM_FF_ISSET(pVM, VM_FF_SELM_SYNC_LDT))
     1087    if (VMCPU_FF_ISSET(pVCpu, VMCPU_FF_SELM_SYNC_LDT))
    10851088    {
    10861089        /*
    10871090         * Always assume the best
    10881091         */
    1089         VM_FF_CLEAR(pVM, VM_FF_SELM_SYNC_LDT);
     1092        VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_LDT);
    10901093
    10911094        /*
     
    13681371    Assert(enmAccessType == PGMACCESSTYPE_WRITE);
    13691372    Log(("selmR3GuestGDTWriteHandler: write to %RGv size %d\n", GCPtr, cbBuf));
    1370     VM_FF_SET(pVM, VM_FF_SELM_SYNC_GDT);
    1371 
     1373
     1374    VMCPU_FF_SET(VMMGetCpu(pVM), VMCPU_FF_SELM_SYNC_GDT);
    13721375    return VINF_PGM_HANDLER_DO_DEFAULT;
    13731376}
     
    13941397    Assert(enmAccessType == PGMACCESSTYPE_WRITE);
    13951398    Log(("selmR3GuestLDTWriteHandler: write to %RGv size %d\n", GCPtr, cbBuf));
    1396     VM_FF_SET(pVM, VM_FF_SELM_SYNC_LDT);
     1399    VMCPU_FF_SET(VMMGetCpu(pVM), VMCPU_FF_SELM_SYNC_LDT);
    13971400    return VINF_PGM_HANDLER_DO_DEFAULT;
    13981401}
     
    14251428     *        changes while we're in REM. */
    14261429
    1427     VM_FF_SET(pVM, VM_FF_SELM_SYNC_TSS);
     1430    VMCPU_FF_SET(VMMGetCpu(pVM), VMCPU_FF_SELM_SYNC_TSS);
    14281431
    14291432    return VINF_PGM_HANDLER_DO_DEFAULT;
     
    14491452    if (pVM->selm.s.fDisableMonitoring)
    14501453    {
    1451         VM_FF_CLEAR(pVM, VM_FF_SELM_SYNC_TSS);
     1454        VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_TSS);
    14521455        return VINF_SUCCESS;
    14531456    }
    14541457
    14551458    STAM_PROFILE_START(&pVM->selm.s.StatTSSSync, a);
    1456     Assert(VM_FF_ISSET(pVM, VM_FF_SELM_SYNC_TSS));
     1459    Assert(VMCPU_FF_ISSET(pVCpu, VMCPU_FF_SELM_SYNC_TSS));
    14571460
    14581461    /*
     
    16321635    }
    16331636
    1634     VM_FF_CLEAR(pVM, VM_FF_SELM_SYNC_TSS);
     1637    VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_TSS);
    16351638
    16361639    STAM_PROFILE_STOP(&pVM->selm.s.StatTSSSync, a);
     
    17891792    PVMCPU pVCpu = VMMGetCpu(pVM);
    17901793
    1791     if (VM_FF_ISSET(pVM, VM_FF_SELM_SYNC_TSS))
     1794    if (VMCPU_FF_ISSET(pVCpu, VMCPU_FF_SELM_SYNC_TSS))
    17921795        return true;
    17931796
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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