VirtualBox

Changeset 105579 in vbox


Ignore:
Timestamp:
Aug 2, 2024 9:10:41 PM (6 months ago)
Author:
vboxsync
Message:

VMM/IEM: Fixed another bug in the large page TLB invalidation code which caused it to only evict half of the pages. More TLB tracing event work. bugref:10727

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAll.cpp

    r105572 r105579  
    779779DECLINLINE(void) iemTlbInvalidateLargePageWorkerInner(PVMCPUCC pVCpu, IEMTLB *pTlb, RTGCPTR GCPtrTag, RTGCPTR GCPtrInstrBufPcTag)
    780780{
     781    IEMTLBTRACE_LARGE_SCAN(pVCpu, a_fGlobal, a_fNonGlobal, a_fDataTlb);
     782
    781783    /* Combine TAG values with the TLB revisions. */
    782784    RTGCPTR GCPtrTagGlob = a_fGlobal ? GCPtrTag | pTlb->uTlbRevisionGlobal : 0;
     
    787789    bool const      fPartialScan = IEMTLB_ENTRY_COUNT >= (a_f2MbLargePage ? 512 : 1024);
    788790    uintptr_t       idxEven      = fPartialScan ? IEMTLB_TAG_TO_EVEN_INDEX(GCPtrTag) : 0;
    789     uintptr_t const idxEvenEnd   = fPartialScan ? idxEven + (a_f2MbLargePage ? 512 : 1024) : IEMTLB_ENTRY_COUNT;
     791    uintptr_t const idxEvenEnd   = fPartialScan ? idxEven + ((a_f2MbLargePage ? 512 : 1024) * 2) : IEMTLB_ENTRY_COUNT * 2;
    790792    RTGCPTR const   GCPtrTagMask = fPartialScan
    791793                                 ? ~(RTGCPTR)0
     
    806808                if (pTlb->aEntries[idxEven].fFlagsAndPhysRev & IEMTLBE_F_PT_LARGE_PAGE)
    807809                {
     810                    IEMTLBTRACE_LARGE_EVICT_SLOT(pVCpu, GCPtrTag, pTlb->aEntries[idxEven].GCPhys, idxEven, a_fDataTlb);
    808811                    pTlb->aEntries[idxEven].uTag = 0;
    809812                    if (!a_fDataTlb && GCPtrTag == GCPtrInstrBufPcTag)
     
    820823                if (pTlb->aEntries[idxEven + 1].fFlagsAndPhysRev & IEMTLBE_F_PT_LARGE_PAGE)
    821824                {
     825                    IEMTLBTRACE_LARGE_EVICT_SLOT(pVCpu, GCPtrTag, pTlb->aEntries[idxEven + 1].GCPhys, idxEven + 1, a_fDataTlb);
    822826                    pTlb->aEntries[idxEven + 1].uTag = 0;
    823827                    if (!a_fDataTlb && GCPtrTag == GCPtrInstrBufPcTag)
     
    848852    else if (   GCPtrTag < pTlb->NonGlobalLargePageRange.uFirstTag
    849853             || GCPtrTag > pTlb->NonGlobalLargePageRange.uLastTag)
    850     { /* Large pages aren't as likely in the non-global TLB half. */ }
     854    {
     855        /* Large pages aren't as likely in the non-global TLB half. */
     856        IEMTLBTRACE_LARGE_SCAN(pVCpu, false, false, a_fDataTlb);
     857    }
    851858    else
    852859        iemTlbInvalidateLargePageWorkerInner<a_fDataTlb, a_f2MbLargePage, false, true>(pVCpu, pTlb, GCPtrTag, GCPtrInstrBufPcTag);
     
    861868    if (pTlb->aEntries[idxEven].uTag == (GCPtrTag | pTlb->uTlbRevision))
    862869    {
     870        IEMTLBTRACE_EVICT_SLOT(pVCpu, GCPtrTag, pTlb->aEntries[idxEven].GCPhys, idxEven, a_fDataTlb);
    863871        pTlb->aEntries[idxEven].uTag = 0;
    864872        if (!a_fDataTlb && GCPtrTag == IEMTLB_CALC_TAG_NO_REV(pVCpu->iem.s.uInstrBufPc))
     
    867875    if (pTlb->aEntries[idxEven + 1].uTag == (GCPtrTag | pTlb->uTlbRevisionGlobal))
    868876    {
     877        IEMTLBTRACE_EVICT_SLOT(pVCpu, GCPtrTag, pTlb->aEntries[idxEven + 1].GCPhys, idxEven + 1, a_fDataTlb);
    869878        pTlb->aEntries[idxEven + 1].uTag = 0;
    870879        if (!a_fDataTlb && GCPtrTag == IEMTLB_CALC_TAG_NO_REV(pVCpu->iem.s.uInstrBufPc))
     
    12491258                if (WalkFast.fInfo & PGM_WALKINFO_BIG_PAGE)
    12501259                    iemTlbLoadedLargePage<false>(&pVCpu->iem.s.CodeTlb, uTagNoRev, RT_BOOL(pVCpu->cpum.GstCtx.cr4 & X86_CR4_PAE));
    1251                 IEMTLBTRACE_LOAD(pVCpu, GCPtrFirst, false);
    12521260            }
    12531261            else
     
    12571265                if (WalkFast.fInfo & PGM_WALKINFO_BIG_PAGE)
    12581266                    iemTlbLoadedLargePage<true>(&pVCpu->iem.s.CodeTlb, uTagNoRev, RT_BOOL(pVCpu->cpum.GstCtx.cr4 & X86_CR4_PAE));
    1259                 IEMTLBTRACE_LOAD_GLOBAL(pVCpu, GCPtrFirst, false);
    12601267            }
    12611268            pTlbe->fFlagsAndPhysRev = (~WalkFast.fEffective & (X86_PTE_US | X86_PTE_RW | X86_PTE_D | X86_PTE_A))
     
    12681275            Assert(!(pTlbe->fFlagsAndPhysRev & IEMTLBE_F_PT_NO_USER) || IEM_GET_CPL(pVCpu) != 3);
    12691276            Assert(!(pTlbe->fFlagsAndPhysRev & IEMTLBE_F_PT_NO_ACCESSED));
     1277
     1278            if (!((uintptr_t)pTlbe & (sizeof(*pTlbe) * 2 - 1)))
     1279                IEMTLBTRACE_LOAD(       pVCpu, GCPtrFirst, pTlbe->GCPhys, (uint32_t)pTlbe->fFlagsAndPhysRev, false);
     1280            else
     1281                IEMTLBTRACE_LOAD_GLOBAL(pVCpu, GCPtrFirst, pTlbe->GCPhys, (uint32_t)pTlbe->fFlagsAndPhysRev, false);
    12701282
    12711283            /* Resolve the physical address. */
     
    68016813                if (WalkFast.fInfo & PGM_WALKINFO_BIG_PAGE)
    68026814                    iemTlbLoadedLargePage<false>(&pVCpu->iem.s.DataTlb, uTagNoRev, RT_BOOL(pVCpu->cpum.GstCtx.cr4 & X86_CR4_PAE));
    6803                 IEMTLBTRACE_LOAD(pVCpu, GCPtrMem, true);
    68046815            }
    68056816            else
     
    68096820                if (WalkFast.fInfo & PGM_WALKINFO_BIG_PAGE)
    68106821                    iemTlbLoadedLargePage<true>(&pVCpu->iem.s.DataTlb, uTagNoRev, RT_BOOL(pVCpu->cpum.GstCtx.cr4 & X86_CR4_PAE));
    6811                 IEMTLBTRACE_LOAD_GLOBAL(pVCpu, GCPtrMem, true);
    68126822            }
    68136823        }
     
    68346844               || IEM_GET_CPL(pVCpu) != 3
    68356845               || (fAccess & IEM_ACCESS_WHAT_SYS));
     6846
     6847        if (pTlbe != &pVCpu->iem.s.DataBreakpointTlbe)
     6848        {
     6849            if (!((uintptr_t)pTlbe & (sizeof(*pTlbe) * 2 - 1)))
     6850                IEMTLBTRACE_LOAD(       pVCpu, GCPtrMem, pTlbe->GCPhys, (uint32_t)pTlbe->fFlagsAndPhysRev, true);
     6851            else
     6852                IEMTLBTRACE_LOAD_GLOBAL(pVCpu, GCPtrMem, pTlbe->GCPhys, (uint32_t)pTlbe->fFlagsAndPhysRev, true);
     6853        }
    68366854
    68376855        /* Resolve the physical address. */
     
    71997217                if (WalkFast.fInfo & PGM_WALKINFO_BIG_PAGE)
    72007218                    iemTlbLoadedLargePage<false>(&pVCpu->iem.s.DataTlb, uTagNoRev, RT_BOOL(pVCpu->cpum.GstCtx.cr4 & X86_CR4_PAE));
    7201                 IEMTLBTRACE_LOAD(pVCpu, GCPtrMem, true);
    72027219            }
    72037220            else
     
    72107227                if (WalkFast.fInfo & PGM_WALKINFO_BIG_PAGE)
    72117228                    iemTlbLoadedLargePage<true>(&pVCpu->iem.s.DataTlb, uTagNoRev, RT_BOOL(pVCpu->cpum.GstCtx.cr4 & X86_CR4_PAE));
    7212                 IEMTLBTRACE_LOAD_GLOBAL(pVCpu, GCPtrMem, true);
    72137229            }
    72147230        }
     
    72327248        Assert(!(pTlbe->fFlagsAndPhysRev & fNoWriteNoDirty & IEMTLBE_F_PT_NO_WRITE));
    72337249        Assert(!(pTlbe->fFlagsAndPhysRev & fNoUser & IEMTLBE_F_PT_NO_USER));
     7250
     7251        if (pTlbe != &pVCpu->iem.s.DataBreakpointTlbe)
     7252        {
     7253            if (!((uintptr_t)pTlbe & (sizeof(*pTlbe) * 2 - 1)))
     7254                IEMTLBTRACE_LOAD(       pVCpu, GCPtrMem, pTlbe->GCPhys, (uint32_t)pTlbe->fFlagsAndPhysRev, true);
     7255            else
     7256                IEMTLBTRACE_LOAD_GLOBAL(pVCpu, GCPtrMem, pTlbe->GCPhys, (uint32_t)pTlbe->fFlagsAndPhysRev, true);
     7257        }
    72347258
    72357259        /* Resolve the physical address. */
  • trunk/src/VBox/VMM/VMMR3/IEMR3.cpp

    r105560 r105579  
    301301         */
    302302        pVCpu->iem.s.idxTlbTraceEntry      = 0;
    303         pVCpu->iem.s.cTlbTraceEntriesShift = 19;//16;
     303        pVCpu->iem.s.cTlbTraceEntriesShift = 16;
    304304        pVCpu->iem.s.paTlbTraceEntries     = (PIEMTLBTRACEENTRY)RTMemPageAlloc(  RT_BIT_Z(pVCpu->iem.s.cTlbTraceEntriesShift)
    305305                                                                               * sizeof(*pVCpu->iem.s.paTlbTraceEntries));
     
    12551255    iemR3InfoTlbPrintHeader(pVCpu, pHlp, pTlb, pfHeader);
    12561256
    1257     uint64_t const    uTag  = (uAddress << 16) >> (X86_PAGE_SHIFT + 16);
    1258     uint32_t const    uSlot = (uint8_t)uTag;
    1259     IEMTLBENTRY const Tlbe  = pTlb->aEntries[uSlot];
     1257    uint64_t const    uTag  = IEMTLB_CALC_TAG_NO_REV(uAddress);
     1258#ifdef IEMTLB_TAG_TO_EVEN_INDEX
     1259    uint32_t const    uSlot = IEMTLB_TAG_TO_EVEN_INDEX(uAddress);
     1260#else
     1261    uint32_t const    uSlot = IEMTLB_TAG_TO_INDEX(uAddress);
     1262#endif
     1263    IEMTLBENTRY const TlbeL = pTlb->aEntries[uSlot];
     1264#ifndef VBOX_VMM_TARGET_ARMV8
     1265    IEMTLBENTRY const TlbeG = pTlb->aEntries[uSlot + 1];
     1266#endif
    12601267    pHlp->pfnPrintf(pHlp, "Address %#RX64 -> slot %#x - %s\n", uAddress, uSlot,
    1261                     Tlbe.uTag == (uTag | pTlb->uTlbRevision)  ? "match"
    1262                     : (Tlbe.uTag & ~IEMTLB_REVISION_MASK) == uTag ? "expired" : "mismatch");
    1263     iemR3InfoTlbPrintSlot(pVCpu, pHlp, pTlb, &Tlbe, uSlot, fFlags);
     1268                    TlbeL.uTag == (uTag | pTlb->uTlbRevision)  ? "match"
     1269                    : (TlbeL.uTag & ~IEMTLB_REVISION_MASK) == uTag ? "expired" : "mismatch");
     1270    iemR3InfoTlbPrintSlot(pVCpu, pHlp, pTlb, &TlbeL, uSlot, fFlags);
     1271
     1272#ifndef VBOX_VMM_TARGET_ARMV8
     1273    pHlp->pfnPrintf(pHlp, "Address %#RX64 -> slot %#x - %s\n", uAddress, uSlot + 1,
     1274                    TlbeG.uTag == (uTag | pTlb->uTlbRevisionGlobal)  ? "match"
     1275                    : (TlbeG.uTag & ~IEMTLB_REVISION_MASK) == uTag ? "expired" : "mismatch");
     1276    iemR3InfoTlbPrintSlot(pVCpu, pHlp, pTlb, &TlbeG, uSlot + 1, fFlags);
     1277#endif
    12641278}
    12651279
     
    15801594                }
    15811595            }
     1596            static const char *s_apszTlbType[2]  = { "code", "data" };
     1597            static const char *s_apszScanType[4] = { "skipped", "global", "non-global", "both" };
    15821598            switch (pCur->enmType)
    15831599            {
     
    15861602                                    pCur->u64Param, (uint32_t)IEMTLB_ADDR_TO_EVEN_INDEX(pCur->u64Param), pszSymbol);
    15871603                    break;
     1604                case kIemTlbTraceType_EvictSlot:
     1605                    pHlp->pfnPrintf(pHlp, "%u: %016RX64 evict %s slot=" IEMTLB_SLOT_FMT " %RGv (%#RX64) gcphys=%RGp%s\n",
     1606                                    idx, pCur->rip, s_apszTlbType[pCur->bParam & 1], pCur->u32Param,
     1607                                       (RTGCINTPTR)((pCur->u64Param & ~IEMTLB_REVISION_MASK) << (64 - IEMTLB_TAG_ADDR_WIDTH))
     1608                                    >> (64 - IEMTLB_TAG_ADDR_WIDTH - GUEST_PAGE_SHIFT), pCur->u64Param,
     1609                                    pCur->u64Param2, pszSymbol);
     1610                    break;
     1611                case kIemTlbTraceType_LargeEvictSlot:
     1612                    pHlp->pfnPrintf(pHlp, "%u: %016RX64 large evict %s slot=" IEMTLB_SLOT_FMT " %RGv (%#RX64) gcphys=%RGp%s\n",
     1613                                    idx, pCur->rip, s_apszTlbType[pCur->bParam & 1], pCur->u32Param,
     1614                                       (RTGCINTPTR)((pCur->u64Param & ~IEMTLB_REVISION_MASK) << (64 - IEMTLB_TAG_ADDR_WIDTH))
     1615                                    >> (64 - IEMTLB_TAG_ADDR_WIDTH - GUEST_PAGE_SHIFT), pCur->u64Param,
     1616                                    pCur->u64Param2, pszSymbol);
     1617                    break;
     1618                case kIemTlbTraceType_LargeScan:
     1619                    pHlp->pfnPrintf(pHlp, "%u: %016RX64 large scan %s %s%s\n", idx, pCur->rip, s_apszTlbType[pCur->bParam & 1],
     1620                                    s_apszScanType[pCur->u32Param & 3], pszSymbol);
     1621                    break;
     1622
    15881623                case kIemTlbTraceType_Flush:
    15891624                    pHlp->pfnPrintf(pHlp, "%u: %016RX64 flush %s rev=%#RX64%s\n", idx, pCur->rip,
    1590                                     pCur->bParam ? "data" : "code", pCur->u64Param, pszSymbol);
     1625                                    s_apszTlbType[pCur->bParam & 1], pCur->u64Param, pszSymbol);
    15911626                    break;
    15921627                case kIemTlbTraceType_FlushGlobal:
    15931628                    pHlp->pfnPrintf(pHlp, "%u: %016RX64 flush %s rev=%#RX64 grev=%#RX64%s\n", idx, pCur->rip,
    1594                                     pCur->bParam ? "data" : "code", pCur->u64Param, pCur->u64Param2, pszSymbol);
     1629                                    s_apszTlbType[pCur->bParam & 1], pCur->u64Param, pCur->u64Param2, pszSymbol);
    15951630                    if (fStopAtGlobalFlush)
    15961631                        return;
    15971632                    break;
    15981633                case kIemTlbTraceType_Load:
    1599                     pHlp->pfnPrintf(pHlp, "%u: %016RX64 load %s %RGv slot=" IEMTLB_SLOT_FMT "%s\n",
    1600                                     idx, pCur->rip, pCur->bParam ? "data" : "code",
    1601                                     pCur->u64Param, (uint32_t)IEMTLB_ADDR_TO_EVEN_INDEX(pCur->u64Param), pszSymbol);
    1602                     break;
    16031634                case kIemTlbTraceType_LoadGlobal:
    1604                     pHlp->pfnPrintf(pHlp, "%u: %016RX64 load %s %RGv slot=" IEMTLB_SLOT_FMT " (global)%s\n",
    1605                                     idx, pCur->rip, pCur->bParam ? "data" : "code",
    1606                                     pCur->u64Param, (uint32_t)IEMTLB_ADDR_TO_EVEN_INDEX(pCur->u64Param), pszSymbol);
     1635                    pHlp->pfnPrintf(pHlp, "%u: %016RX64 %cload %s %RGv slot=" IEMTLB_SLOT_FMT " gcphys=%RGp fTlb=%#RX32%s\n",
     1636                                    idx, pCur->rip,
     1637                                    pCur->enmType == kIemTlbTraceType_LoadGlobal ? 'g' : 'l', s_apszTlbType[pCur->bParam & 1],
     1638                                    pCur->u64Param,
     1639                                      (uint32_t)IEMTLB_ADDR_TO_EVEN_INDEX(pCur->u64Param)
     1640                                    | (pCur->enmType == kIemTlbTraceType_LoadGlobal),
     1641                                    (RTGCPTR)pCur->u64Param2, pCur->u32Param, pszSymbol);
    16071642                    break;
    16081643
     
    16571692                    pHlp->pfnPrintf(pHlp, "%u: %016RX64 tb n8ve GCPhysPc=%012RX64 tb=%p used=%u%s\n",
    16581693                                    idx, pCur->rip, pCur->u64Param, (uintptr_t)pCur->u64Param2, pCur->u32Param, pszSymbol);
     1694                    break;
     1695
     1696                case kIemTlbTraceType_User0:
     1697                    pHlp->pfnPrintf(pHlp, "%u: %016RX64 user0 %016RX64 %016RX64 %08RX32 %02RX8%s\n",
     1698                                    idx, pCur->rip, pCur->u64Param, pCur->u64Param2, pCur->u32Param, pCur->bParam, pszSymbol);
     1699                    break;
     1700                case kIemTlbTraceType_User1:
     1701                    pHlp->pfnPrintf(pHlp, "%u: %016RX64 user1 %016RX64 %016RX64 %08RX32 %02RX8%s\n",
     1702                                    idx, pCur->rip, pCur->u64Param, pCur->u64Param2, pCur->u32Param, pCur->bParam, pszSymbol);
     1703                    break;
     1704                case kIemTlbTraceType_User2:
     1705                    pHlp->pfnPrintf(pHlp, "%u: %016RX64 user2 %016RX64 %016RX64 %08RX32 %02RX8%s\n",
     1706                                    idx, pCur->rip, pCur->u64Param, pCur->u64Param2, pCur->u32Param, pCur->bParam, pszSymbol);
     1707                    break;
     1708                case kIemTlbTraceType_User3:
     1709                    pHlp->pfnPrintf(pHlp, "%u: %016RX64 user3 %016RX64 %016RX64 %08RX32 %02RX8%s\n",
     1710                                    idx, pCur->rip, pCur->u64Param, pCur->u64Param2, pCur->u32Param, pCur->bParam, pszSymbol);
    16591711                    break;
    16601712
  • trunk/src/VBox/VMM/include/IEMInternal.h

    r105560 r105579  
    738738    kIemTlbTraceType_Invalid,
    739739    kIemTlbTraceType_InvlPg,
     740    kIemTlbTraceType_EvictSlot,
     741    kIemTlbTraceType_LargeEvictSlot,
     742    kIemTlbTraceType_LargeScan,
    740743    kIemTlbTraceType_Flush,
    741744    kIemTlbTraceType_FlushGlobal,
     
    751754    kIemTlbTraceType_Tb_Compile,
    752755    kIemTlbTraceType_Tb_Exec_Threaded,
    753     kIemTlbTraceType_Tb_Exec_Native
     756    kIemTlbTraceType_Tb_Exec_Native,
     757    kIemTlbTraceType_User0,
     758    kIemTlbTraceType_User1,
     759    kIemTlbTraceType_User2,
     760    kIemTlbTraceType_User3,
    754761} IEMTLBTRACETYPE;
    755762
     
    780787
    781788#if defined(IEM_WITH_TLB_TRACE) && defined(IN_RING3)
    782 # define IEMTLBTRACE_INVLPG(a_pVCpu, a_GCPtr)               iemTlbTrace(a_pVCpu, kIemTlbTraceType_InvlPg, a_GCPtr)
    783 # define IEMTLBTRACE_FLUSH(a_pVCpu, a_uRev, a_fDataTlb)     iemTlbTrace(a_pVCpu, kIemTlbTraceType_Flush, a_uRev, 0, a_fDataTlb)
     789# define IEMTLBTRACE_INVLPG(a_pVCpu, a_GCPtr) \
     790    iemTlbTrace(a_pVCpu, kIemTlbTraceType_InvlPg, a_GCPtr)
     791# define IEMTLBTRACE_EVICT_SLOT(a_pVCpu, a_GCPtrTag, a_GCPhys, a_idxSlot, a_fDataTlb) \
     792    iemTlbTrace(a_pVCpu, kIemTlbTraceType_EvictSlot, a_GCPtrTag, a_GCPhys, a_fDataTlb, a_idxSlot)
     793# define IEMTLBTRACE_LARGE_EVICT_SLOT(a_pVCpu, a_GCPtrTag, a_GCPhys, a_idxSlot, a_fDataTlb) \
     794    iemTlbTrace(a_pVCpu, kIemTlbTraceType_LargeEvictSlot, a_GCPtrTag, a_GCPhys, a_fDataTlb, a_idxSlot)
     795# define IEMTLBTRACE_LARGE_SCAN(a_pVCpu, a_fGlobal, a_fNonGlobal, a_fDataTlb) \
     796    iemTlbTrace(a_pVCpu, kIemTlbTraceType_LargeScan, 0, 0, a_fDataTlb, (uint8_t)a_fGlobal | ((uint8_t)a_fNonGlobal << 1))
     797# define IEMTLBTRACE_FLUSH(a_pVCpu, a_uRev, a_fDataTlb) \
     798    iemTlbTrace(a_pVCpu, kIemTlbTraceType_Flush, a_uRev, 0, a_fDataTlb)
    784799# define IEMTLBTRACE_FLUSH_GLOBAL(a_pVCpu, a_uRev, a_uGRev, a_fDataTlb) \
    785800    iemTlbTrace(a_pVCpu, kIemTlbTraceType_FlushGlobal, a_uRev, a_uGRev, a_fDataTlb)
    786 # define IEMTLBTRACE_LOAD(a_pVCpu, a_GCPtr, a_fDataTlb)     iemTlbTrace(a_pVCpu, kIemTlbTraceType_Load, a_GCPtr, 0, a_fDataTlb)
    787 # define IEMTLBTRACE_LOAD_GLOBAL(a_pVCpu, a_GCPtr, a_fDataTlb) \
    788     iemTlbTrace(a_pVCpu, kIemTlbTraceType_LoadGlobal, a_GCPtr, 0, a_fDataTlb)
     801# define IEMTLBTRACE_LOAD(a_pVCpu, a_GCPtr, a_GCPhys, a_fTlb, a_fDataTlb) \
     802    iemTlbTrace(a_pVCpu, kIemTlbTraceType_Load, a_GCPtr, a_GCPhys, a_fDataTlb, a_fTlb)
     803# define IEMTLBTRACE_LOAD_GLOBAL(a_pVCpu, a_GCPtr, a_GCPhys, a_fTlb, a_fDataTlb) \
     804    iemTlbTrace(a_pVCpu, kIemTlbTraceType_LoadGlobal, a_GCPtr, a_GCPhys, a_fDataTlb, a_fTlb)
    789805#else
    790 # define IEMTLBTRACE_INVLPG(a_pVCpu, a_GCPtr)                           do { } while (0)
    791 # define IEMTLBTRACE_FLUSH(a_pVCpu, a_uRev, a_fDataTlb)                 do { } while (0)
    792 # define IEMTLBTRACE_FLUSH_GLOBAL(a_pVCpu, a_uRev, a_uGRev, a_fDataTlb) do { } while (0)
    793 # define IEMTLBTRACE_LOAD(a_pVCpu, a_GCPtr, a_fDataTlb)                 do { } while (0)
    794 # define IEMTLBTRACE_LOAD_GLOBAL(a_pVCpu, a_GCPtr, a_fDataTlb)          do { } while (0)
     806# define IEMTLBTRACE_INVLPG(a_pVCpu, a_GCPtr)                                               do { } while (0)
     807# define IEMTLBTRACE_EVICT_SLOT(a_pVCpu, a_GCPtrTag, a_GCPhys, a_idxSlot, a_fDataTlb)       do { } while (0)
     808# define IEMTLBTRACE_LARGE_EVICT_SLOT(a_pVCpu, a_GCPtrTag, a_GCPhys, a_idxSlot, a_fDataTlb) do { } while (0)
     809# define IEMTLBTRACE_LARGE_SCAN(a_pVCpu, a_fGlobal, a_fNonGlobal, a_fDataTlb)               do { } while (0)
     810# define IEMTLBTRACE_FLUSH(a_pVCpu, a_uRev, a_fDataTlb)                                     do { } while (0)
     811# define IEMTLBTRACE_FLUSH_GLOBAL(a_pVCpu, a_uRev, a_uGRev, a_fDataTlb)                     do { } while (0)
     812# define IEMTLBTRACE_LOAD(a_pVCpu, a_GCPtr, a_GCPhys, a_fTlb, a_fDataTlb)                   do { } while (0)
     813# define IEMTLBTRACE_LOAD_GLOBAL(a_pVCpu, a_GCPtr, a_GCPhys, a_fTlb, a_fDataTlb)            do { } while (0)
    795814#endif
    796815
     
    831850# define IEMTLBTRACE_TB_EXEC_THRD(a_pVCpu, a_pTb)                       do { } while (0)
    832851# define IEMTLBTRACE_TB_EXEC_N8VE(a_pVCpu, a_pTb)                       do { } while (0)
     852#endif
     853
     854#if defined(IEM_WITH_TLB_TRACE) && defined(IN_RING3) && 1
     855# define IEMTLBTRACE_USER0(a_pVCpu, a_u64Param1, a_u64Param2, a_u32Param, a_bParam) \
     856    iemTlbTrace(a_pVCpu, kIemTlbTraceType_User0, a_u64Param1, a_u64Param2, a_bParam, a_u32Param)
     857# define IEMTLBTRACE_USER1(a_pVCpu, a_u64Param1, a_u64Param2, a_u32Param, a_bParam) \
     858    iemTlbTrace(a_pVCpu, kIemTlbTraceType_User1, a_u64Param1, a_u64Param2, a_bParam, a_u32Param)
     859# define IEMTLBTRACE_USER2(a_pVCpu, a_u64Param1, a_u64Param2, a_u32Param, a_bParam) \
     860    iemTlbTrace(a_pVCpu, kIemTlbTraceType_User2, a_u64Param1, a_u64Param2, a_bParam, a_u32Param)
     861# define IEMTLBTRACE_USER3(a_pVCpu, a_u64Param1, a_u64Param2, a_u32Param, a_bParam) \
     862    iemTlbTrace(a_pVCpu, kIemTlbTraceType_User3, a_u64Param1, a_u64Param2, a_bParam, a_u32Param)
     863#else
     864# define IEMTLBTRACE_USER1(a_pVCpu, a_u64Param1, a_u64Param2, a_u32Param, a_bParam) do { } while (0)
     865# define IEMTLBTRACE_USER2(a_pVCpu, a_u64Param1, a_u64Param2, a_u32Param, a_bParam) do { } while (0)
     866# define IEMTLBTRACE_USER3(a_pVCpu, a_u64Param1, a_u64Param2, a_u32Param, a_bParam) do { } while (0)
     867# define IEMTLBTRACE_USER4(a_pVCpu, a_u64Param1, a_u64Param2, a_u32Param, a_bParam) do { } while (0)
    833868#endif
    834869
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