Changeset 43803 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Nov 5, 2012 1:50:57 PM (12 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMR0.cpp
r43494 r43803 136 136 uint64_t vmx_cr4_fixed1; 137 137 uint64_t vmx_vmcs_enum; 138 uint64_t vmx_ept caps;138 uint64_t vmx_ept_vpid_caps; 139 139 } msr; 140 140 /* Last instruction error */ … … 426 426 if ( g_HvmR0.vmx.msr.vmx_proc_ctls2.n.allowed1 427 427 & (VMX_VMCS_CTRL_PROC_EXEC2_EPT | VMX_VMCS_CTRL_PROC_EXEC2_VPID)) 428 g_HvmR0.vmx.msr.vmx_eptcaps = ASMRdMsr(MSR_IA32_VMX_EPT_CAPS); 428 { 429 g_HvmR0.vmx.msr.vmx_ept_vpid_caps = ASMRdMsr(MSR_IA32_VMX_EPT_VPID_CAP); 430 } 429 431 } 430 432 … … 1213 1215 pVM->hm.s.vmx.msr.vmx_cr4_fixed1 = g_HvmR0.vmx.msr.vmx_cr4_fixed1; 1214 1216 pVM->hm.s.vmx.msr.vmx_vmcs_enum = g_HvmR0.vmx.msr.vmx_vmcs_enum; 1215 pVM->hm.s.vmx.msr.vmx_ept caps = g_HvmR0.vmx.msr.vmx_eptcaps;1217 pVM->hm.s.vmx.msr.vmx_ept_vpid_caps = g_HvmR0.vmx.msr.vmx_ept_vpid_caps; 1216 1218 pVM->hm.s.svm.msrHwcr = g_HvmR0.svm.msrHwcr; 1217 1219 pVM->hm.s.svm.u32Rev = g_HvmR0.svm.u32Rev; -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r43798 r43803 166 166 if ( pVM 167 167 && pVM->hm.s.vmx.fVpid 168 && (pVM->hm.s.vmx.msr.vmx_ept caps & MSR_IA32_VMX_EPT_CAPS_INVVPID_CAPS_ALL_CONTEXTS))168 && (pVM->hm.s.vmx.msr.vmx_ept_vpid_caps & MSR_IA32_VMX_EPT_VPID_CAP_INVVPID_ALL_CONTEXTS)) 169 169 { 170 170 hmR0VmxFlushVPID(pVM, NULL /* pvCpu */, VMX_FLUSH_VPID_ALL_CONTEXTS, 0 /* GCPtr */); … … 431 431 if (pVM->hm.s.fNestedPaging) 432 432 { 433 if (pVM->hm.s.vmx.msr.vmx_ept caps & MSR_IA32_VMX_EPT_CAPS_INVEPT)434 { 435 if (pVM->hm.s.vmx.msr.vmx_ept caps & MSR_IA32_VMX_EPT_CAPS_INVEPT_CAPS_SINGLE_CONTEXT)433 if (pVM->hm.s.vmx.msr.vmx_ept_vpid_caps & MSR_IA32_VMX_EPT_VPID_CAP_INVEPT) 434 { 435 if (pVM->hm.s.vmx.msr.vmx_ept_vpid_caps & MSR_IA32_VMX_EPT_VPID_CAP_INVEPT_SINGLE_CONTEXT) 436 436 pVM->hm.s.vmx.enmFlushEpt = VMX_FLUSH_EPT_SINGLE_CONTEXT; 437 else if (pVM->hm.s.vmx.msr.vmx_ept caps & MSR_IA32_VMX_EPT_CAPS_INVEPT_CAPS_ALL_CONTEXTS)437 else if (pVM->hm.s.vmx.msr.vmx_ept_vpid_caps & MSR_IA32_VMX_EPT_VPID_CAP_INVEPT_ALL_CONTEXTS) 438 438 pVM->hm.s.vmx.enmFlushEpt = VMX_FLUSH_EPT_ALL_CONTEXTS; 439 439 else … … 460 460 if (pVM->hm.s.vmx.fVpid) 461 461 { 462 if (pVM->hm.s.vmx.msr.vmx_ept caps & MSR_IA32_VMX_EPT_CAPS_INVVPID)463 { 464 if (pVM->hm.s.vmx.msr.vmx_ept caps & MSR_IA32_VMX_EPT_CAPS_INVVPID_CAPS_SINGLE_CONTEXT)462 if (pVM->hm.s.vmx.msr.vmx_ept_vpid_caps & MSR_IA32_VMX_EPT_VPID_CAP_INVVPID) 463 { 464 if (pVM->hm.s.vmx.msr.vmx_ept_vpid_caps & MSR_IA32_VMX_EPT_VPID_CAP_INVVPID_SINGLE_CONTEXT) 465 465 pVM->hm.s.vmx.enmFlushVpid = VMX_FLUSH_VPID_SINGLE_CONTEXT; 466 else if (pVM->hm.s.vmx.msr.vmx_ept caps & MSR_IA32_VMX_EPT_CAPS_INVVPID_CAPS_ALL_CONTEXTS)466 else if (pVM->hm.s.vmx.msr.vmx_ept_vpid_caps & MSR_IA32_VMX_EPT_VPID_CAP_INVVPID_ALL_CONTEXTS) 467 467 pVM->hm.s.vmx.enmFlushVpid = VMX_FLUSH_VPID_ALL_CONTEXTS; 468 468 else … … 472 472 * We do not handle other flush type combinations, ignore VPID capabilities. 473 473 */ 474 if (pVM->hm.s.vmx.msr.vmx_ept caps & MSR_IA32_VMX_EPT_CAPS_INVVPID_CAPS_INDIV_ADDR)474 if (pVM->hm.s.vmx.msr.vmx_ept_vpid_caps & MSR_IA32_VMX_EPT_VPID_CAP_INVVPID_INDIV_ADDR) 475 475 Log(("VMXR0SetupVM: Only VMX_FLUSH_VPID_INDIV_ADDR supported. Ignoring VPID.\n")); 476 if (pVM->hm.s.vmx.msr.vmx_ept caps & MSR_IA32_VMX_EPT_CAPS_INVVPID_CAPS_SINGLE_CONTEXT_RETAIN_GLOBALS)476 if (pVM->hm.s.vmx.msr.vmx_ept_vpid_caps & MSR_IA32_VMX_EPT_VPID_CAP_INVVPID_SINGLE_CONTEXT_RETAIN_GLOBALS) 477 477 Log(("VMXR0SetupVM: Only VMX_FLUSH_VPID_SINGLE_CONTEXT_RETAIN_GLOBALS supported. Ignoring VPID.\n")); 478 478 pVM->hm.s.vmx.enmFlushVpid = VMX_FLUSH_VPID_NOT_SUPPORTED; … … 2552 2552 else 2553 2553 { 2554 if (pVM->hm.s.vmx.msr.vmx_ept caps & MSR_IA32_VMX_EPT_CAPS_INVVPID_CAPS_SINGLE_CONTEXT)2554 if (pVM->hm.s.vmx.msr.vmx_ept_vpid_caps & MSR_IA32_VMX_EPT_VPID_CAP_INVVPID_SINGLE_CONTEXT) 2555 2555 hmR0VmxFlushVPID(pVM, pVCpu, VMX_FLUSH_VPID_SINGLE_CONTEXT, 0 /* GCPtr */); 2556 2556 else … … 2579 2579 * as supported by the CPU. 2580 2580 */ 2581 if (pVM->hm.s.vmx.msr.vmx_ept caps & MSR_IA32_VMX_EPT_CAPS_INVVPID_CAPS_INDIV_ADDR)2581 if (pVM->hm.s.vmx.msr.vmx_ept_vpid_caps & MSR_IA32_VMX_EPT_VPID_CAP_INVVPID_INDIV_ADDR) 2582 2582 { 2583 2583 for (unsigned i = 0; i < pVCpu->hm.s.TlbShootdown.cPages; i++) … … 2742 2742 * as supported by the CPU. 2743 2743 */ 2744 if (pVM->hm.s.vmx.msr.vmx_ept caps & MSR_IA32_VMX_EPT_CAPS_INVVPID_CAPS_INDIV_ADDR)2744 if (pVM->hm.s.vmx.msr.vmx_ept_vpid_caps & MSR_IA32_VMX_EPT_VPID_CAP_INVVPID_INDIV_ADDR) 2745 2745 { 2746 2746 for (unsigned i = 0; i < pVCpu->hm.s.TlbShootdown.cPages; i++) … … 5101 5101 { 5102 5102 /* If we can flush just this page do it, otherwise flush as little as possible. */ 5103 if (pVM->hm.s.vmx.msr.vmx_ept caps & MSR_IA32_VMX_EPT_CAPS_INVVPID_CAPS_INDIV_ADDR)5103 if (pVM->hm.s.vmx.msr.vmx_ept_vpid_caps & MSR_IA32_VMX_EPT_VPID_CAP_INVVPID_INDIV_ADDR) 5104 5104 hmR0VmxFlushVPID(pVM, pVCpu, VMX_FLUSH_VPID_INDIV_ADDR, GCVirt); 5105 5105 else
Note:
See TracChangeset
for help on using the changeset viewer.