Changeset 54204 in vbox for trunk/src/VBox/HostDrivers/Support/SUPDrv.c
- Timestamp:
- Feb 13, 2015 5:23:15 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDrv.c
r54201 r54204 3754 3754 SUPR0DECL(int) SUPR0GetVmxUsability(bool *pfIsSmxModeAmbiguous) 3755 3755 { 3756 uint64_t u64FeatMsr; 3757 bool fMaybeSmxMode; 3758 bool fMsrLocked; 3759 bool fSmxVmxAllowed; 3760 bool fVmxAllowed; 3761 bool fIsSmxModeAmbiguous; 3762 int rc; 3763 3756 3764 Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD)); 3757 3765 3758 u int64_t u64FeatMsr = ASMRdMsr(MSR_IA32_FEATURE_CONTROL);3759 bool constfMaybeSmxMode = RT_BOOL(ASMGetCR4() & X86_CR4_SMXE);3760 boolfMsrLocked = RT_BOOL(u64FeatMsr & MSR_IA32_FEATURE_CONTROL_LOCK);3761 boolfSmxVmxAllowed = RT_BOOL(u64FeatMsr & MSR_IA32_FEATURE_CONTROL_SMX_VMXON);3762 boolfVmxAllowed = RT_BOOL(u64FeatMsr & MSR_IA32_FEATURE_CONTROL_VMXON);3763 boolfIsSmxModeAmbiguous = false;3764 intrc = VERR_INTERNAL_ERROR_5;3766 u64FeatMsr = ASMRdMsr(MSR_IA32_FEATURE_CONTROL); 3767 fMaybeSmxMode = RT_BOOL(ASMGetCR4() & X86_CR4_SMXE); 3768 fMsrLocked = RT_BOOL(u64FeatMsr & MSR_IA32_FEATURE_CONTROL_LOCK); 3769 fSmxVmxAllowed = RT_BOOL(u64FeatMsr & MSR_IA32_FEATURE_CONTROL_SMX_VMXON); 3770 fVmxAllowed = RT_BOOL(u64FeatMsr & MSR_IA32_FEATURE_CONTROL_VMXON); 3771 fIsSmxModeAmbiguous = false; 3772 rc = VERR_INTERNAL_ERROR_5; 3765 3773 3766 3774 /* Check if the LOCK bit is set but excludes the required VMXON bit. */
Note:
See TracChangeset
for help on using the changeset viewer.