VirtualBox

Changeset 48328 in vbox for trunk/src


Ignore:
Timestamp:
Sep 5, 2013 10:20:18 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
88756
Message:

VMM: Assert, doxygen, todo question.

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPDrv.c

    r48268 r48328  
    33713371 * @returns VBox status code.
    33723372 * @retval  VERR_VMX_NO_VMX
    3373  * @retval  VERR_VMX_MSR_LOCKED_OR_DISABLED
     3373 * @retval  VERR_VMX_MSR_SMX_VMXON_DISABLED
     3374 * @retval  VERR_VMX_MSR_VMXON_DISABLED
    33743375 * @retval  VERR_SVM_NO_SVM
    33753376 * @retval  VERR_SVM_DISABLED
     
    33903391    *pfCaps = 0;
    33913392
     3393    /** @todo r=ramshankar: Although we're only reading CPUIDs/MSRs here which
     3394     *        should be identical on all CPUs on the system, it's probably
     3395     *        cleaner to prevent migration nonetheless? */
    33923396    if (ASMHasCpuId())
    33933397    {
     
    34003404
    34013405        if (   ASMIsValidStdRange(uMaxId)
    3402             && (   ASMIsIntelCpuEx(    uVendorEBX, uVendorECX, uVendorEDX)
     3406            && (   ASMIsIntelCpuEx(     uVendorEBX, uVendorECX, uVendorEDX)
    34033407                || ASMIsViaCentaurCpuEx(uVendorEBX, uVendorECX, uVendorEDX) )
    34043408           )
  • trunk/src/VBox/VMM/VMMR0/HMR0.cpp

    r48296 r48328  
    801801    PHMR0FIRSTRC pFirstRc = (PHMR0FIRSTRC)pvUser1;
    802802    Assert(idCpu == (RTCPUID)RTMpCpuIdToSetIndex(idCpu)); /// @todo fix idCpu == index assumption (rainy day)
     803    Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD));
    803804    NOREF(pvUser2);
    804805
    805     uint64_t fFC = ASMRdMsr(MSR_IA32_FEATURE_CONTROL);
    806     bool const fInSmxMode       = !!(ASMGetCR4() & X86_CR4_SMXE);
    807     bool       fMsrLocked       = !!(fFC & MSR_IA32_FEATURE_CONTROL_LOCK);
    808     bool       fSmxVmxAllowed   = !!(fFC & MSR_IA32_FEATURE_CONTROL_SMX_VMXON);
    809     bool       fVmxAllowed      = !!(fFC & MSR_IA32_FEATURE_CONTROL_VMXON);
     806    uint64_t   fFC            = ASMRdMsr(MSR_IA32_FEATURE_CONTROL);
     807    bool const fInSmxMode     = !!(ASMGetCR4() & X86_CR4_SMXE);
     808    bool       fMsrLocked     = !!(fFC & MSR_IA32_FEATURE_CONTROL_LOCK);
     809    bool       fSmxVmxAllowed = !!(fFC & MSR_IA32_FEATURE_CONTROL_SMX_VMXON);
     810    bool       fVmxAllowed    = !!(fFC & MSR_IA32_FEATURE_CONTROL_VMXON);
    810811
    811812    /* Check if the LOCK bit is set but excludes the required VMXON bit. */
     
    835836
    836837        /* Verify. */
    837         fFC = ASMRdMsr(MSR_IA32_FEATURE_CONTROL);
     838        fFC                 = ASMRdMsr(MSR_IA32_FEATURE_CONTROL);
    838839        fMsrLocked          = !!(fFC & MSR_IA32_FEATURE_CONTROL_LOCK);
    839840        fSmxVmxAllowed      = fMsrLocked && !!(fFC & MSR_IA32_FEATURE_CONTROL_SMX_VMXON);
Note: See TracChangeset for help on using the changeset viewer.

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