VirtualBox

Changeset 20007 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
May 25, 2009 3:56:44 PM (16 years ago)
Author:
vboxsync
Message:

Turn on VAPIC access handling for all VCPUs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r20004 r20007  
    431431#endif /* HWACCM_VTX_WITH_VPID */
    432432
     433            if (PDMHasIoApic(pVM))
     434                val |= VMX_VMCS_CTRL_PROC_EXEC2_VIRT_APIC;
     435           
    433436            /* Mask away the bits that the CPU doesn't support */
    434437            /** @todo make sure they don't conflict with the above requirements. */
     
    24842487                TRPMSetFaultAddress(pVCpu, exitQualification);
    24852488
    2486                 /* Shortcut for APIC TPR reads and writes; 32 bits guests only */
     2489                /* Shortcut for APIC TPR reads and writes. */
    24872490                if (    (exitQualification & 0xfff) == 0x080
    24882491                    &&  !(errCode & X86_TRAP_PF_P)  /* not present */
    24892492                    &&  fSetupTPRCaching
    2490                     &&  !CPUMIsGuestInLongModeEx(pCtx))
     2493                    &&  (pVM->hwaccm.s.vmx.msr.vmx_proc_ctls2.n.allowed1 & VMX_VMCS_CTRL_PROC_EXEC2_VIRT_APIC))
    24912494                {
    24922495                    RTGCPHYS GCPhysApicBase, GCPhys;
     
    24992502                    {
    25002503                        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 
    25052504                        rc = IOMMMIOMapMMIOHCPage(pVM, GCPhysApicBase, pVM->hwaccm.s.vmx.pAPICPhys, X86_PTE_RW | X86_PTE_P);
    25062505                        AssertRC(rc);
     
    29662965        }
    29672966        else {
    2968             /* Shortcut for APIC TPR reads and writes; 32 bits guests only */
     2967            /* Shortcut for APIC TPR reads and writes. */
    29692968            if (    (GCPhys & 0xfff) == 0x080
    29702969                &&  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))
    29732972            {
    29742973                RTGCPHYS GCPhysApicBase;
     
    29782977                {
    29792978                    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 
    29842979                    rc = IOMMMIOMapMMIOHCPage(pVM, GCPhysApicBase, pVM->hwaccm.s.vmx.pAPICPhys, X86_PTE_RW | X86_PTE_P);
    29852980                    AssertRC(rc);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette