VirtualBox

Changeset 78258 in vbox for trunk/src


Ignore:
Timestamp:
Apr 23, 2019 9:17:44 AM (6 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: Assertions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r78257 r78258  
    28552855    hmR0VmxSetMsrPermission(pVCpu, pVmcsInfo, fIsNstGstVmcs, MSR_K8_FS_BASE,        VMXMSRPM_ALLOW_RD_WR);
    28562856
    2857 #ifdef VBOX_STRICT
    2858     /** @todo NSTVMX: Remove this later. */
    2859     uint32_t fMsrpm = HMGetVmxMsrPermission(pVmcsInfo->pvMsrBitmap, MSR_IA32_SYSENTER_CS);
    2860     Assert((fMsrpm & VMXMSRPM_ALLOW_RD_WR) == VMXMSRPM_ALLOW_RD_WR);
    2861 
    2862     fMsrpm = HMGetVmxMsrPermission(pVmcsInfo->pvMsrBitmap, MSR_K8_GS_BASE);
    2863     Assert((fMsrpm & VMXMSRPM_ALLOW_RD_WR) == VMXMSRPM_ALLOW_RD_WR);
    2864 #endif
    2865 
    28662857    /*
    28672858     * The IA32_PRED_CMD and IA32_FLUSH_CMD MSRs are write-only and has no state
     
    28802871        hmR0VmxSetMsrPermission(pVCpu, pVmcsInfo, fIsNstGstVmcs, MSR_IA32_SPEC_CTRL, VMXMSRPM_ALLOW_RD_WR);
    28812872
    2882     /*
    2883      * IA32_EFER MSR is always intercepted, see @bugref{9180#c37}.
    2884      */
    2885 
    28862873#if HC_ARCH_BITS == 64
    28872874    /*
     
    28952882        hmR0VmxSetMsrPermission(pVCpu, pVmcsInfo, fIsNstGstVmcs, MSR_K8_SF_MASK,        VMXMSRPM_ALLOW_RD_WR);
    28962883        hmR0VmxSetMsrPermission(pVCpu, pVmcsInfo, fIsNstGstVmcs, MSR_K8_KERNEL_GS_BASE, VMXMSRPM_ALLOW_RD_WR);
    2897 
    2898 # ifdef VBOX_STRICT
    2899         fMsrpm = HMGetVmxMsrPermission(pVmcsInfo->pvMsrBitmap, MSR_K8_GS_BASE);
    2900         Assert((fMsrpm & VMXMSRPM_ALLOW_RD_WR) == VMXMSRPM_ALLOW_RD_WR);
    2901 # endif
    2902     }
     2884    }
     2885#endif
     2886
     2887    /*
     2888     * IA32_EFER MSR is always intercepted, see @bugref{9180#c37}.
     2889     */
     2890#ifdef VBOX_STRICT
     2891    Assert(pVmcsInfo->pvMsrBitmap);
     2892    uint32_t const fMsrpmEfer = HMGetVmxMsrPermission(pVmcsInfo->pvMsrBitmap, MSR_K6_EFER);
     2893    Assert(fMsrpmEfer == VMXMSRPM_EXIT_RD_WR);
    29032894#endif
    29042895}
     
    49274918                 * the guest when it's not using paging.
    49284919                 */
    4929                 HMVMX_CPUMCTX_ASSERT(pVCpu, CPUMCTX_EXTRN_CR3);
    49304920                GCPhysGuestCR3 = pCtx->cr3;
    49314921            }
     
    75767566                    {
    75777567                        rc = VMXReadVmcsGstN(VMX_VMCS_GUEST_CR3, &u64Val);
     7568                        VMXLOCAL_BREAK_RC(rc);
    75787569                        if (pCtx->cr3 != u64Val)
    75797570                        {
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