VirtualBox

Changeset 64874 in vbox


Ignore:
Timestamp:
Dec 14, 2016 2:21:45 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
112277
Message:

VMM/HMSVMR0: Use macro constant for TPR offset

File:
1 edited

Legend:

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

    r64773 r64874  
    50925092    /* TPR patching for 32-bit guests, using the reserved bit in the page tables for MMIO regions.  */
    50935093    if (   pVM->hm.s.fTprPatchingAllowed
    5094         && (GCPhysFaultAddr & PAGE_OFFSET_MASK) == 0x80                                                  /* TPR offset. */
     5094        && (GCPhysFaultAddr & PAGE_OFFSET_MASK) == XAPIC_OFF_TPR
    50955095        && (   !(u32ErrCode & X86_TRAP_PF_P)                                                             /* Not present */
    50965096            || (u32ErrCode & (X86_TRAP_PF_P | X86_TRAP_PF_RSVD)) == (X86_TRAP_PF_P | X86_TRAP_PF_RSVD))  /* MMIO page. */
     
    51025102        GCPhysApicBase &= PAGE_BASE_GC_MASK;
    51035103
    5104         if (GCPhysFaultAddr == GCPhysApicBase + 0x80)
     5104        if (GCPhysFaultAddr == GCPhysApicBase + XAPIC_OFF_TPR)
    51055105        {
    51065106            /* Only attempt to patch the instruction once. */
     
    53565356    /* Shortcut for APIC TPR reads and writes; only applicable to 32-bit guests. */
    53575357    if (   pVM->hm.s.fTprPatchingAllowed
    5358         && (uFaultAddress & 0xfff) == 0x80  /* TPR offset. */
    5359         && !(u32ErrCode & X86_TRAP_PF_P)    /* Not present. */
     5358        && (uFaultAddress & 0xfff) == XAPIC_OFF_TPR
     5359        && !(u32ErrCode & X86_TRAP_PF_P)              /* Not present. */
    53605360        && !CPUMIsGuestInLongModeEx(pCtx)
    53615361        && !CPUMGetGuestCPL(pVCpu)
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