Changeset 10833 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jul 23, 2008 2:27:42 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 33618
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r10832 r10833 280 280 /** @note VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_MWAIT_EXIT might cause a vmlaunch failure with an invalid control fields error. (combined with some other exit reasons) */ 281 281 282 #if HC_ARCH_BITS == 64 283 if (pVM->hwaccm.s.vmx.msr.vmx_proc_ctls.n.allowed1 & VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_USE_TPR_SHADOW) 284 { 285 /* CR8 reads from the APIC shadow page; writes cause an exit is they lower the TPR below the threshold */ 286 val |= VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_USE_TPR_SHADOW; 287 Assert(pVM->hwaccm.s.vmx.pAPIC); 288 } 289 else 290 /* Exit on CR8 reads & writes in case the TPR shadow feature isn't present. */ 291 val |= VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_CR8_STORE_EXIT | VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_CR8_LOAD_EXIT; 292 #endif 282 293 /* Mask away the bits that the CPU doesn't support */ 283 294 /** @todo make sure they don't conflict with the above requirements. */ … … 991 1002 rc = VMXWriteVMCS(VMX_VMCS_GUEST_GS_BASE, pCtx->gsHid.u64Base); 992 1003 AssertRC(rc); 993 994 #if HC_ARCH_BITS == 64995 if (!(pVM->hwaccm.s.vmx.proc_ctls & (VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_USE_TPR_SHADOW | VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_CR8_STORE_EXIT | VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_CR8_LOAD_EXIT)))996 {997 if (pVM->hwaccm.s.vmx.msr.vmx_proc_ctls.n.allowed1 & VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_USE_TPR_SHADOW)998 {999 /* CR8 reads from the APIC shadow page; writes cause an exit is they lower the TPR below the threshold */1000 pVM->hwaccm.s.vmx.proc_ctls |= VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_USE_TPR_SHADOW;1001 Assert(pVM->hwaccm.s.vmx.pAPIC);1002 }1003 else1004 /* Exit on CR8 reads & writes in case the TPR shadow feature isn't present. */1005 pVM->hwaccm.s.vmx.proc_ctls |= VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_CR8_STORE_EXIT | VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_CR8_LOAD_EXIT;1006 1007 rc = VMXWriteVMCS(VMX_VMCS_CTRL_PROC_EXEC_CONTROLS, pVM->hwaccm.s.vmx.proc_ctls);1008 AssertRC(rc);1009 }1010 #endif1011 1012 1004 } 1013 1005 else 1014 1006 { 1015 #if HC_ARCH_BITS == 641016 if (pVM->hwaccm.s.vmx.proc_ctls & (VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_USE_TPR_SHADOW | VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_CR8_STORE_EXIT | VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_CR8_LOAD_EXIT))1017 {1018 pVM->hwaccm.s.vmx.proc_ctls &= ~(VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_USE_TPR_SHADOW | VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_CR8_STORE_EXIT | VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_CR8_LOAD_EXIT);1019 1020 rc = VMXWriteVMCS(VMX_VMCS_CTRL_PROC_EXEC_CONTROLS, pVM->hwaccm.s.vmx.proc_ctls);1021 AssertRC(rc);1022 }1023 #endif1024 1007 pVM->hwaccm.s.vmx.pfnStartVM = VMXR0StartVM32; 1025 1008 }
Note:
See TracChangeset
for help on using the changeset viewer.