VirtualBox

儲存庫 vbox 的更動 49879


忽略:
時間撮記:
2013-12-11 下午06:10:03 (11 年 以前)
作者:
vboxsync
訊息:

VMM/HMSVMR0: Update CPL and its corresponding VMCB Clean bit when SS changes.

檔案:
修改 1 筆資料

圖例:

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

    r49876 r49879  
    138138/** @name VMCB Clean Bits.
    139139 *
    140  * These flags are used for VMCB-state caching. A set VMCB Clean Bit indicates
     140 * These flags are used for VMCB-state caching. A set VMCB Clean bit indicates
    141141 * AMD-V doesn't need to reload the corresponding value(s) from the VMCB in
    142142 * memory.
     
    10541054/**
    10551055 * Adds an exception to the intercept exception bitmap in the VMCB and updates
    1056  * the corresponding VMCB Clean Bit.
     1056 * the corresponding VMCB Clean bit.
    10571057 *
    10581058 * @param   pVmcb       Pointer to the VM control block.
     
    10711071/**
    10721072 * Removes an exception from the intercept-exception bitmap in the VMCB and
    1073  * updates the corresponding VMCB Clean Bit.
     1073 * updates the corresponding VMCB Clean bit.
    10741074 *
    10751075 * @param   pVmcb       Pointer to the VM control block.
     
    12031203                enmShwPagingMode = PGMGetHostMode(pVM);
    12041204
    1205             pVmcb->ctrl.u64NestedPagingCR3  = PGMGetNestedCR3(pVCpu, enmShwPagingMode);
     1205            pVmcb->ctrl.u64NestedPagingCR3 = PGMGetNestedCR3(pVCpu, enmShwPagingMode);
    12061206            pVmcb->ctrl.u64VmcbCleanBits &= ~HMSVM_VMCB_CLEAN_NP;
    12071207            Assert(pVmcb->ctrl.u64NestedPagingCR3);
     
    12861286        HMSVM_LOAD_SEG_REG(GS, gs);
    12871287
     1288        pVmcb->guest.u8CPL = pCtx->ss.Attr.n.u2Dpl;
    12881289        pVmcb->ctrl.u64VmcbCleanBits &= ~HMSVM_VMCB_CLEAN_SEG;
    12891290        HMCPU_CF_CLEAR(pVCpu, HM_CHANGED_GUEST_SEGMENT_REGS);
     
    17841785    pVmcb->guest.u64RSP    = pCtx->rsp;
    17851786    pVmcb->guest.u64RFlags = pCtx->eflags.u32;
    1786     pVmcb->guest.u8CPL     = pCtx->ss.Attr.n.u2Dpl;
    17871787    pVmcb->guest.u64RAX    = pCtx->rax;
    17881788
     
    28362836    /*
    28372837     * Re-enable nested paging (automatically disabled on every VM-exit). See AMD spec. 15.25.3 "Enabling Nested Paging".
    2838      * We avoid changing the corresponding VMCB Clean Bit as we're not changing it to a different value since the previous run.
     2838     * We avoid changing the corresponding VMCB Clean bit as we're not changing it to a different value since the previous run.
    28392839     */
    28402840    /** @todo The above assumption could be wrong. It's not documented what
    2841      *        should be done wrt to the VMCB Clean Bit, but we'll find out the
     2841     *        should be done wrt to the VMCB Clean bit, but we'll find out the
    28422842     *        hard way. */
    28432843    PSVMVMCB pVmcb = (PSVMVMCB)pVCpu->hm.s.svm.pvVmcb;
     
    29492949    }
    29502950
    2951     /* If we've migrating CPUs, mark the VMCB clean bits as dirty. */
     2951    /* If we've migrating CPUs, mark the VMCB Clean bits as dirty. */
    29522952    if (HMR0GetCurrentCpu()->idCpu != pVCpu->hm.s.idLastCpu)
    29532953        pVmcb->ctrl.u64VmcbCleanBits = 0;
     
    30003000        hmR0SvmSetMsrPermission(pVCpu, MSR_K8_TSC_AUX, SVMMSREXIT_INTERCEPT_READ, SVMMSREXIT_INTERCEPT_WRITE);
    30013001
    3002     /* If VMCB Clean Bits isn't supported by the CPU, simply mark all state-bits as dirty, indicating (re)load-from-VMCB. */
     3002    /* If VMCB Clean bits isn't supported by the CPU, simply mark all state-bits as dirty, indicating (re)load-from-VMCB. */
    30033003    if (!(pVM->hm.s.svm.u32Features & AMD_CPUID_SVM_FEATURE_EDX_VMCB_CLEAN))
    30043004        pVmcb->ctrl.u64VmcbCleanBits = 0;
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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