Changeset 20007 in vbox for trunk/src/VBox/VMM
- Timestamp:
- May 25, 2009 3:56:44 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r20004 r20007 431 431 #endif /* HWACCM_VTX_WITH_VPID */ 432 432 433 if (PDMHasIoApic(pVM)) 434 val |= VMX_VMCS_CTRL_PROC_EXEC2_VIRT_APIC; 435 433 436 /* Mask away the bits that the CPU doesn't support */ 434 437 /** @todo make sure they don't conflict with the above requirements. */ … … 2484 2487 TRPMSetFaultAddress(pVCpu, exitQualification); 2485 2488 2486 /* Shortcut for APIC TPR reads and writes ; 32 bits guests only*/2489 /* Shortcut for APIC TPR reads and writes. */ 2487 2490 if ( (exitQualification & 0xfff) == 0x080 2488 2491 && !(errCode & X86_TRAP_PF_P) /* not present */ 2489 2492 && fSetupTPRCaching 2490 && !CPUMIsGuestInLongModeEx(pCtx))2493 && (pVM->hwaccm.s.vmx.msr.vmx_proc_ctls2.n.allowed1 & VMX_VMCS_CTRL_PROC_EXEC2_VIRT_APIC)) 2491 2494 { 2492 2495 RTGCPHYS GCPhysApicBase, GCPhys; … … 2499 2502 { 2500 2503 Log(("Enable VT-x virtual APIC access filtering\n")); 2501 pVCpu->hwaccm.s.vmx.proc_ctls2 |= VMX_VMCS_CTRL_PROC_EXEC2_VIRT_APIC;2502 rc = VMXWriteVMCS(VMX_VMCS_CTRL_PROC_EXEC_CONTROLS2, pVCpu->hwaccm.s.vmx.proc_ctls2);2503 AssertRC(rc);2504 2505 2504 rc = IOMMMIOMapMMIOHCPage(pVM, GCPhysApicBase, pVM->hwaccm.s.vmx.pAPICPhys, X86_PTE_RW | X86_PTE_P); 2506 2505 AssertRC(rc); … … 2966 2965 } 2967 2966 else { 2968 /* Shortcut for APIC TPR reads and writes ; 32 bits guests only*/2967 /* Shortcut for APIC TPR reads and writes. */ 2969 2968 if ( (GCPhys & 0xfff) == 0x080 2970 2969 && GCPhys > 0x1000000 /* to skip VGA frame buffer accesses */ 2971 && !CPUMIsGuestInLongModeEx(pCtx)2972 && fSetupTPRCaching)2970 && fSetupTPRCaching 2971 && (pVM->hwaccm.s.vmx.msr.vmx_proc_ctls2.n.allowed1 & VMX_VMCS_CTRL_PROC_EXEC2_VIRT_APIC)) 2973 2972 { 2974 2973 RTGCPHYS GCPhysApicBase; … … 2978 2977 { 2979 2978 Log(("Enable VT-x virtual APIC access filtering\n")); 2980 pVCpu->hwaccm.s.vmx.proc_ctls2 |= VMX_VMCS_CTRL_PROC_EXEC2_VIRT_APIC;2981 rc = VMXWriteVMCS(VMX_VMCS_CTRL_PROC_EXEC_CONTROLS2, pVCpu->hwaccm.s.vmx.proc_ctls2);2982 AssertRC(rc);2983 2984 2979 rc = IOMMMIOMapMMIOHCPage(pVM, GCPhysApicBase, pVM->hwaccm.s.vmx.pAPICPhys, X86_PTE_RW | X86_PTE_P); 2985 2980 AssertRC(rc);
Note:
See TracChangeset
for help on using the changeset viewer.