VirtualBox

Changeset 10716 in vbox for trunk/src/VBox/VMM/VMMR0


Ignore:
Timestamp:
Jul 17, 2008 7:31:03 AM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
33441
Message:

TPR fix for VT-x

File:
1 edited

Legend:

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

    r10667 r10716  
    911911    if (pVM->hwaccm.s.fContextUseFlags & HWACCM_CHANGED_GUEST_DEBUG)
    912912    {
    913         /** @todo DR0-6 */
    914         val  = pCtx->dr7;
     913        val  = pCtx->dr7 & 0xffffffff;                                  /* upper 32 bits reserved */
    915914        val &= ~(RT_BIT(11) | RT_BIT(12) | RT_BIT(14) | RT_BIT(15));    /* must be zero */
    916         val |= 0x400;                                       /* must be one */
    917 #ifdef VBOX_STRICT
    918         val = 0x400;
    919 #endif
     915        val |= 0x400;                                                   /* must be one */
    920916        rc |= VMXWriteVMCS(VMX_VMCS_GUEST_DR7,              val);
    921917        AssertRC(rc);
     
    926922        AssertRC(rc);
    927923
    928         /** @todo */
     924        /** @todo do we really ever need this? */
    929925        rc |= VMXWriteVMCS(VMX_VMCS_GUEST_DEBUG_EXCEPTIONS,         0);
    930926        AssertRC(rc);
     
    14371433    pCtx->eflags.u32        = val;
    14381434
    1439     /* Update the APIC with the cached TPR value.
    1440      * @todo reduce overhead
    1441      */
    1442     if (    pCtx->msrEFER & MSR_K6_EFER_LMA
    1443         &&  pVM->hwaccm.s.vmx.pAPIC)
    1444     {
    1445         rc = PDMApicSetTPR(pVM, pVM->hwaccm.s.vmx.pAPIC[0x80] >> 4);
    1446         AssertRC(rc);
    1447     }
    1448 
    14491435    /* Take care of instruction fusing (sti, mov ss) */
    14501436    rc |= VMXReadVMCS(VMX_VMCS_GUEST_INTERRUPTIBILITY_STATE, &val);
     
    15331519    if (fSyncTPR)
    15341520    {
    1535         rc = PDMApicSetTPR(pVM, pVM->hwaccm.s.vmx.pAPIC[0x80]);
     1521        rc = PDMApicSetTPR(pVM, pVM->hwaccm.s.vmx.pAPIC[0x80] >> 4);
    15361522        AssertRC(rc);
    15371523    }
Note: See TracChangeset for help on using the changeset viewer.

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