- Timestamp:
- Dec 15, 2008 10:06:50 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r15440 r15490 994 994 AssertRC(rc); 995 995 996 #if 0 /* @todo deal with 32/64 */ 997 /* Restore the host EFER - on CPUs that support it. */ 998 if (pVM->hwaccm.s.vmx.msr.vmx_exit.n.allowed1 & VMX_VMCS_CTRL_EXIT_CONTROLS_LOAD_HOST_EFER_MSR) 999 { 1000 uint64_t msrEFER = ASMRdMsr(MSR_IA32_EFER); 1001 rc = VMXWriteVMCS64(VMX_VMCS_HOST_FIELD_EFER_FULL, msrEFER); 1002 AssertRC(rc); 1003 } 1004 #endif 996 1005 pVCpu->hwaccm.s.fContextUseFlags &= ~HWACCM_CHANGED_HOST_CONTEXT; 997 1006 } … … 1090 1099 /* Load guest debug controls (dr7 & IA32_DEBUGCTL_MSR) (forced to 1 on the 'first' VT-x capable CPUs; this actually includes the newest Nehalem CPUs) */ 1091 1100 val |= VMX_VMCS_CTRL_ENTRY_CONTROLS_LOAD_DEBUG; 1092 /* Required for the EFER write below, not supported on all CPUs. */ /** @todo Sander, check this. */ 1101 #if 0 /* @todo deal with 32/64 */ 1102 /* Required for the EFER write below, not supported on all CPUs. */ 1093 1103 val |= VMX_VMCS_CTRL_ENTRY_CONTROLS_LOAD_GUEST_EFER_MSR; 1094 1104 #endif 1095 1105 /* 64 bits guest mode? */ 1096 1106 if (pCtx->msrEFER & MSR_K6_EFER_LMA) … … 1109 1119 1110 1120 /* Save debug controls (dr7 & IA32_DEBUGCTL_MSR) (forced to 1 on the 'first' VT-x capable CPUs; this actually includes the newest Nehalem CPUs) */ 1121 #if 0 /* @todo deal with 32/64 */ 1122 val |= VMX_VMCS_CTRL_EXIT_CONTROLS_SAVE_DEBUG | VMX_VMCS_CTRL_EXIT_CONTROLS_LOAD_HOST_EFER_MSR; 1123 #else 1111 1124 val |= VMX_VMCS_CTRL_EXIT_CONTROLS_SAVE_DEBUG; 1125 #endif 1126 1112 1127 #if HC_ARCH_BITS == 64 || defined(VBOX_WITH_HYBRID_32BIT_KERNEL) 1113 1128 if (VMX_IS_64BIT_HOST_MODE()) … … 1118 1133 val |= VMX_VMCS_CTRL_EXIT_CONTROLS_HOST_AMD64; /* our switcher goes to long mode */ 1119 1134 else 1120 val &= ~VMX_VMCS_CTRL_EXIT_CONTROLS_HOST_AMD64;1135 Assert(!(val & VMX_VMCS_CTRL_EXIT_CONTROLS_HOST_AMD64)); 1121 1136 #endif 1122 1137 val &= pVM->hwaccm.s.vmx.msr.vmx_exit.n.allowed1; … … 1581 1596 } 1582 1597 1598 #if 0 /* @todo deal with 32/64 */ 1583 1599 /* Unconditionally update the guest EFER - on CPUs that supports it. */ 1584 1600 if (pVM->hwaccm.s.vmx.msr.vmx_entry.n.allowed1 & VMX_VMCS_CTRL_ENTRY_CONTROLS_LOAD_GUEST_EFER_MSR) … … 1587 1603 AssertRC(rc); 1588 1604 } 1605 #endif 1589 1606 1590 1607 vmxR0UpdateExceptionBitmap(pVM, pVCpu, pCtx);
Note:
See TracChangeset
for help on using the changeset viewer.