Changeset 46399 in vbox
- Timestamp:
- Jun 5, 2013 4:57:05 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r46393 r46399 677 677 678 678 /* If we're for some reason not in VMX root mode, then don't leave it. */ 679 if (ASMGetCR4() & X86_CR4_VMXE) 680 { 681 /* Exit VMX root mode and clear the VMX bit in CR4 */ 679 RTCCUINTREG uHostCR4 = ASMGetCR4(); 680 if (uHostCR4 & X86_CR4_VMXE) 681 { 682 /* Exit VMX root mode and clear the VMX bit in CR4. */ 682 683 VMXDisable(); 683 ASMSetCR4( ASMGetCR4()& ~X86_CR4_VMXE);684 ASMSetCR4(uHostCR4 & ~X86_CR4_VMXE); 684 685 return VINF_SUCCESS; 685 686 } … … 928 929 * @a fEnabledByHost is true). 929 930 * @param fEnabledByHost Set if SUPR0EnableVTx() or similar was used to 930 * enable VT-x /AMD-Von the host.931 * enable VT-x on the host. 931 932 */ 932 933 VMMR0DECL(int) VMXR0EnableCpu(PHMGLOBLCPUINFO pCpu, PVM pVM, void *pvCpuPage, RTHCPHYS HCPhysCpuPage, bool fEnabledByHost) … … 971 972 * @param pvCpuPage Pointer to the VMXON region. 972 973 * @param HCPhysCpuPage Physical address of the VMXON region. 974 * 975 * @remarks This function should never be called when SUPR0EnableVTx() or 976 * similar was used to enable VT-x on the host. 973 977 */ 974 978 VMMR0DECL(int) VMXR0DisableCpu(PHMGLOBLCPUINFO pCpu, void *pvCpuPage, RTHCPHYS HCPhysCpuPage) … … 978 982 NOREF(HCPhysCpuPage); 979 983 984 Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD)); 980 985 return hmR0VmxLeaveRootMode(); 981 986 }
Note:
See TracChangeset
for help on using the changeset viewer.