VirtualBox

Changeset 99208 in vbox for trunk


Ignore:
Timestamp:
Mar 29, 2023 2:13:56 PM (18 months ago)
Author:
vboxsync
Message:

Disassembler,VMM,Runtime: Get rid of deprecated DISCPUSTATE types (preparation for architecture specific separation in order to support ARMv8), bugref:10394

Location:
trunk
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/dis.h

    r98103 r99208  
    700700AssertCompileSize(DISSTATE, 0xd8);
    701701
    702 /** @deprecated  Use DISSTATE and change Cpu and DisState to Dis. */
    703 typedef DISSTATE DISCPUSTATE;
    704 
    705702
    706703
  • trunk/include/VBox/types.h

    r98972 r99208  
    12231223typedef struct DISSTATE const *PCDISSTATE;
    12241224
    1225 /** @deprecated  PDISSTATE and change pCpu and pDisState to pDis. */
    1226 typedef PDISSTATE PDISCPUSTATE;
    1227 /** @deprecated  PCDISSTATE and change pCpu and pDisState to pDis. */
    1228 typedef PCDISSTATE PCDISCPUSTATE;
    1229 
    12301225
    12311226/**
  • trunk/include/VBox/vmm/cpumdis.h

    r98103 r99208  
    5151
    5252#ifdef IN_RING3
    53 VMMR3DECL(int) CPUMR3DisasmInstrCPU(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, RTGCPTR GCPtrPC, PDISCPUSTATE pCpu, const char *pszPrefix);
     53VMMR3DECL(int) CPUMR3DisasmInstrCPU(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, RTGCPTR GCPtrPC, PDISSTATE pDis, const char *pszPrefix);
    5454#endif
    5555
  • trunk/include/VBox/vmm/em.h

    r98103 r99208  
    268268/** @name Deprecated interpretation related APIs (use IEM).
    269269 * @{ */
    270 VMM_INT_DECL(int)               EMInterpretDisasCurrent(PVMCPUCC pVCpu, PDISCPUSTATE pCpu, unsigned *pcbInstr);
     270VMM_INT_DECL(int)               EMInterpretDisasCurrent(PVMCPUCC pVCpu, PDISSTATE pDis, unsigned *pcbInstr);
    271271VMM_INT_DECL(int)               EMInterpretDisasOneEx(PVMCPUCC pVCpu, RTGCUINTPTR GCPtrInstr,
    272                                                       PDISCPUSTATE pDISState, unsigned *pcbInstr);
     272                                                      PDISSTATE pDis, unsigned *pcbInstr);
    273273VMM_INT_DECL(VBOXSTRICTRC)      EMInterpretInstruction(PVMCPUCC pVCpu);
    274 VMM_INT_DECL(VBOXSTRICTRC)      EMInterpretInstructionDisasState(PVMCPUCC pVCpu, PDISCPUSTATE pDis, uint64_t rip);
     274VMM_INT_DECL(VBOXSTRICTRC)      EMInterpretInstructionDisasState(PVMCPUCC pVCpu, PDISSTATE pDis, uint64_t rip);
    275275/** @} */
    276276
  • trunk/include/VBox/vmm/gcm.h

    r98103 r99208  
    8787VMMDECL(bool)               GCMIsEnabled(PVM pVM);
    8888VMM_INT_DECL(bool)          GCMShouldTrapXcptDE(PVMCPUCC pVCpu);
    89 VMM_INT_DECL(VBOXSTRICTRC)  GCMXcptDE(PVMCPUCC pVCpu, PCPUMCTX pCtx, PDISCPUSTATE pDis, uint8_t *pcbInstr);
     89VMM_INT_DECL(VBOXSTRICTRC)  GCMXcptDE(PVMCPUCC pVCpu, PCPUMCTX pCtx, PDISSTATE pDis, uint8_t *pcbInstr);
    9090/** @} */
    9191
  • trunk/include/VBox/vmm/gim.h

    r98980 r99208  
    205205VMM_INT_DECL(VBOXSTRICTRC)  GIMHypercallEx(PVMCPUCC pVCpu, PCPUMCTX pCtx, unsigned uDisOpcode, uint8_t cbInstr);
    206206VMM_INT_DECL(VBOXSTRICTRC)  GIMExecHypercallInstr(PVMCPUCC pVCpu, PCPUMCTX pCtx, uint8_t *pcbInstr);
    207 VMM_INT_DECL(VBOXSTRICTRC)  GIMXcptUD(PVMCPUCC pVCpu, PCPUMCTX pCtx, PDISCPUSTATE pDis, uint8_t *pcbInstr);
     207VMM_INT_DECL(VBOXSTRICTRC)  GIMXcptUD(PVMCPUCC pVCpu, PCPUMCTX pCtx, PDISSTATE pDis, uint8_t *pcbInstr);
    208208VMM_INT_DECL(bool)          GIMShouldTrapXcptUD(PVMCPUCC pVCpu);
    209209#if !defined(VBOX_VMM_TARGET_ARMV8)
  • trunk/src/VBox/Devices/BiosCommonCode/MakeAlternativeSource.cpp

    r98103 r99208  
    910910
    911911
    912 static bool disAccessesMemory(PCDISCPUSTATE pCpuState)
    913 {
    914     PCDISOPCODE pCurInstr = pCpuState->pCurInstr;
    915     return disIsMemoryParameter(&pCpuState->Param1, pCurInstr->fParam1)
    916         || disIsMemoryParameter(&pCpuState->Param2, pCurInstr->fParam2)
    917         || disIsMemoryParameter(&pCpuState->Param3, pCurInstr->fParam3)
    918         || disIsMemoryParameter(&pCpuState->Param4, pCurInstr->fParam4);
     912static bool disAccessesMemory(PCDISSTATE pDis)
     913{
     914    PCDISOPCODE pCurInstr = pDis->pCurInstr;
     915    return disIsMemoryParameter(&pDis->Param1, pCurInstr->fParam1)
     916        || disIsMemoryParameter(&pDis->Param2, pCurInstr->fParam2)
     917        || disIsMemoryParameter(&pDis->Param3, pCurInstr->fParam3)
     918        || disIsMemoryParameter(&pDis->Param4, pCurInstr->fParam4);
    919919}
    920920
     
    923923 * Deals with instructions that YASM will assemble differently than WASM/WCC.
    924924 */
    925 static size_t disHandleYasmDifferences(PDISCPUSTATE pCpuState, uint32_t uFlatAddr, uint32_t cbInstr,
     925static size_t disHandleYasmDifferences(PDISSTATE pDis, uint32_t uFlatAddr, uint32_t cbInstr,
    926926                                       char *pszBuf, size_t cbBuf, size_t cchUsed)
    927927{
    928     bool fDifferent = DISFormatYasmIsOddEncoding(pCpuState);
     928    bool fDifferent = DISFormatYasmIsOddEncoding(pDis);
    929929    uint8_t const  *pb = &g_pbImg[uFlatAddr - g_uBiosFlatBase];
    930930
     
    935935     *        modrm.reg != 0. Those encodings should be invalid AFAICT. */
    936936
    937     if (   (   pCpuState->bOpCode  == 0x8f            /* group 1a */
    938             || pCpuState->bOpCode  == 0xc7            /* group 11 */
    939             || pCpuState->bOpCode  == 0xc6            /* group 11 - not verified */
     937    if (   (   pDis->bOpCode  == 0x8f            /* group 1a */
     938            || pDis->bOpCode  == 0xc7            /* group 11 */
     939            || pDis->bOpCode  == 0xc6            /* group 11 - not verified */
    940940           )
    941         && pCpuState->ModRM.Bits.Reg != 0)
     941        && pDis->ModRM.Bits.Reg != 0)
    942942        fDifferent = true;
    943943    /*
     
    986986 * @remarks @a uSrcAddr is the flat address.
    987987 */
    988 static DECLCALLBACK(int) disReadOpcodeBytes(PDISCPUSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead)
     988static DECLCALLBACK(int) disReadOpcodeBytes(PDISSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead)
    989989{
    990990    RT_NOREF_PV(cbMinRead);
     
    11361136        else
    11371137        {
    1138             unsigned    cbInstr;
    1139             DISCPUSTATE CpuState;
    1140             CpuState.ModRM.Bits.Mod = 3;
     1138            unsigned cbInstr;
     1139            DISSTATE Dis;
     1140            Dis.ModRM.Bits.Mod = 3;
    11411141            int rc = DISInstrWithReader(uFlatAddr, fIs16Bit ? DISCPUMODE_16BIT : DISCPUMODE_32BIT,
    1142                                         disReadOpcodeBytes, NULL, &CpuState, &cbInstr);
     1142                                        disReadOpcodeBytes, NULL, &Dis, &cbInstr);
    11431143            if (   RT_SUCCESS(rc)
    11441144                && cbInstr <= cb
    1145                 && CpuState.pCurInstr
    1146                 && CpuState.pCurInstr->uOpcode != OP_INVALID
    1147                 && CpuState.pCurInstr->uOpcode != OP_ILLUD2
    1148                 && (   !(CpuState.fPrefix & DISPREFIX_ADDRSIZE)
    1149                     || disAccessesMemory(&CpuState)))
     1145                && Dis.pCurInstr
     1146                && Dis.pCurInstr->uOpcode != OP_INVALID
     1147                && Dis.pCurInstr->uOpcode != OP_ILLUD2
     1148                && (   !(Dis.fPrefix & DISPREFIX_ADDRSIZE)
     1149                    || disAccessesMemory(&Dis)))
    11501150            {
    11511151                char szTmp[4096];
    1152                 size_t cch = DISFormatYasmEx(&CpuState, szTmp, sizeof(szTmp),
     1152                size_t cch = DISFormatYasmEx(&Dis, szTmp, sizeof(szTmp),
    11531153                                             DIS_FMT_FLAGS_STRICT
    11541154                                             | DIS_FMT_FLAGS_BYTES_RIGHT | DIS_FMT_FLAGS_BYTES_COMMENT | DIS_FMT_FLAGS_BYTES_SPACED,
    11551155                                             NULL, NULL);
    1156                 cch = disHandleYasmDifferences(&CpuState, uFlatAddr, cbInstr, szTmp, sizeof(szTmp), cch);
     1156                cch = disHandleYasmDifferences(&Dis, uFlatAddr, cbInstr, szTmp, sizeof(szTmp), cch);
    11571157                Assert(cch < sizeof(szTmp));
    11581158
  • trunk/src/VBox/Runtime/testcase/tstLdr-2.cpp

    r98103 r99208  
    5151bool MyDisBlock(uint8_t const *pbCodeBlock, int32_t cbMax)
    5252{
    53     DISCPUSTATE Cpu;
     53    DISSTATE Dis;
    5454    int32_t i = 0;
    5555    while (i < cbMax)
     
    5757        char        szOutput[256];
    5858        uint32_t    cbInstr;
    59         if (RT_FAILURE(DISInstrToStr(pbCodeBlock + i, DISCPUMODE_32BIT, &Cpu, &cbInstr, szOutput, sizeof(szOutput))))
     59        if (RT_FAILURE(DISInstrToStr(pbCodeBlock + i, DISCPUMODE_32BIT, &Dis, &cbInstr, szOutput, sizeof(szOutput))))
    6060            return false;
    6161
  • trunk/src/VBox/Runtime/testcase/tstLdr-3.cpp

    r98103 r99208  
    137137}
    138138
    139 static DECLCALLBACK(int) MyGetSymbol(PCDISCPUSTATE pCpu, uint32_t u32Sel, RTUINTPTR uAddress,
     139static DECLCALLBACK(int) MyGetSymbol(PCDISSTATE pDis, uint32_t u32Sel, RTUINTPTR uAddress,
    140140                                     char *pszBuf, size_t cchBuf, RTINTPTR *poff,
    141141                                     void *pvUser)
    142142{
    143     RT_NOREF3(pCpu, u32Sel, pvUser);
     143    RT_NOREF3(pDis, u32Sel, pvUser);
    144144
    145145    if (   uAddress > RTLdrSize(g_hLdrMod) + g_uLoadAddr
     
    161161 * @callback_method_impl{FNDISREADBYTES}
    162162 */
    163 static DECLCALLBACK(int) MyReadBytes(PDISCPUSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead)
     163static DECLCALLBACK(int) MyReadBytes(PDISSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead)
    164164{
    165165    RT_NOREF1(cbMaxRead);
     
    174174                       RTUINTPTR uNearAddr, RTUINTPTR uSearchAddr)
    175175{
    176     DISCPUSTATE Cpu;
    177     int32_t     i = 0;
     176    DISSTATE Dis;
     177    int32_t  i = 0;
    178178    while (i < cbMax)
    179179    {
     
    184184        int rc = DISInstrWithReader(uNearAddr + i, enmCpuMode,
    185185                                    MyReadBytes, (uint8_t *)pvCodeBlock - (uintptr_t)uNearAddr,
    186                                     &Cpu, &cbInstr);
     186                                    &Dis, &cbInstr);
    187187        RTAssertSetMayPanic(fMayPanic);
    188188        RTAssertSetQuiet(fQuiet);
     
    195195            RTPrintf("%s:\n", NearSym.aSyms[0].szName);
    196196
    197         DISFormatYasmEx(&Cpu, szOutput, sizeof(szOutput),
     197        DISFormatYasmEx(&Dis, szOutput, sizeof(szOutput),
    198198                        DIS_FMT_FLAGS_RELATIVE_BRANCH | DIS_FMT_FLAGS_BYTES_RIGHT | DIS_FMT_FLAGS_ADDR_LEFT  | DIS_FMT_FLAGS_BYTES_SPACED,
    199199                        MyGetSymbol, NULL);
  • trunk/src/VBox/Runtime/testcase/tstLdrDisasmTest.cpp

    r98103 r99208  
    9393 * @callback_method_impl{FNDISREADBYTES}
    9494 */
    95 static DECLCALLBACK(int) DisasmTest1ReadCode(PDISCPUSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead)
     95static DECLCALLBACK(int) DisasmTest1ReadCode(PDISSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead)
    9696{
    9797    size_t cb = cbMaxRead;
     
    107107 * Use an inline function here just to test '__textcoal_nt' sections on darwin.
    108108 */
    109 inline int MyDisasm(uintptr_t CodeIndex, PDISCPUSTATE pCpu, uint32_t *pcb)
     109inline int MyDisasm(uintptr_t CodeIndex, PDISSTATE pDis, uint32_t *pcb)
    110110{
    111111    uint32_t cb;
    112     int rc = DISInstrWithReader(CodeIndex, DISCPUMODE_32BIT, DisasmTest1ReadCode, 0, pCpu, &cb);
     112    int rc = DISInstrWithReader(CodeIndex, DISCPUMODE_32BIT, DisasmTest1ReadCode, 0, pDis, &cb);
    113113    *pcb = cb;
    114114    MY_PRINTF(("DISCoreOneEx -> rc=%d cb=%d  Cpu: bOpCode=%#x pCurInstr=%p (42=%d)\n", \
    115                rc, cb, pCpu->bOpCode, pCpu->pCurInstr, 42)); \
     115               rc, cb, pDis->bOpCode, pDis->pCurInstr, 42)); \
    116116    return rc;
    117117}
     
    120120extern "C" DECLEXPORT(int) DisasmTest1(void)
    121121{
    122     DISCPUSTATE Cpu;
     122    DISSTATE  Dis;
    123123    uintptr_t CodeIndex = 0;
    124124    uint32_t cb;
     
    140140#endif
    141141
    142     memset(&Cpu, 0, sizeof(Cpu));
     142    memset(&Dis, 0, sizeof(Dis));
    143143
    144144#define DISAS_AND_CHECK(cbInstr, enmOp) \
    145145        do { \
    146             rc = MyDisasm(CodeIndex, &Cpu, &cb); \
     146            rc = MyDisasm(CodeIndex, &Dis, &cb); \
    147147            if (RT_FAILURE(rc)) \
    148148                return CodeIndex | 0xf000; \
    149             if (Cpu.pCurInstr->uOpcode != (enmOp)) \
     149            if (Dis.pCurInstr->uOpcode != (enmOp)) \
    150150                return CodeIndex| 0xe000; \
    151151            if (cb != (cbInstr)) \
  • trunk/src/VBox/Runtime/testcase/tstLdrObjR0.cpp

    r98103 r99208  
    103103{
    104104    static unsigned cb;
    105     DISCPUSTATE Cpu;
     105    DISSTATE Dis;
    106106
    107     memset(&Cpu, 0, sizeof(Cpu));
     107    memset(&Dis, 0, sizeof(Dis));
    108108
    109     DISInstr((void *)(uintptr_t)SomeExportFunction3, DISCPUMODE_32BIT, &Cpu, &cb);
     109    DISInstr((void *)(uintptr_t)SomeExportFunction3, DISCPUMODE_32BIT, &Dis, &cb);
    110110    return (void *)(uintptr_t)&SomeExportFunction1;
    111111}
  • trunk/src/VBox/VMM/VMMAll/EMAll.cpp

    r99051 r99208  
    854854 * @callback_method_impl{FNDISREADBYTES}
    855855 */
    856 static DECLCALLBACK(int) emReadBytes(PDISCPUSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead)
     856static DECLCALLBACK(int) emReadBytes(PDISSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead)
    857857{
    858858    PVMCPUCC    pVCpu    = (PVMCPUCC)pDis->pvUser;
     
    911911 * @param   pcbInstr        Where to return the instruction size. (optional)
    912912 */
    913 VMM_INT_DECL(int) EMInterpretDisasCurrent(PVMCPUCC pVCpu, PDISCPUSTATE pDis, unsigned *pcbInstr)
     913VMM_INT_DECL(int) EMInterpretDisasCurrent(PVMCPUCC pVCpu, PDISSTATE pDis, unsigned *pcbInstr)
    914914{
    915915#if defined(VBOX_VMM_TARGET_ARMV8)
     
    947947 * @param   pcbInstr        Where to return the instruction size. (optional)
    948948 */
    949 VMM_INT_DECL(int) EMInterpretDisasOneEx(PVMCPUCC pVCpu, RTGCUINTPTR GCPtrInstr, PDISCPUSTATE pDis, unsigned *pcbInstr)
     949VMM_INT_DECL(int) EMInterpretDisasOneEx(PVMCPUCC pVCpu, RTGCUINTPTR GCPtrInstr, PDISSTATE pDis, unsigned *pcbInstr)
    950950{
    951951    DISCPUMODE enmCpuMode = CPUMGetGuestDisMode(pVCpu);
     
    994994
    995995/**
    996  * Interprets the current instruction using the supplied DISCPUSTATE structure.
     996 * Interprets the current instruction using the supplied DISSTATE structure.
    997997 *
    998998 * IP/EIP/RIP *IS* updated!
     
    10171017 *          Make sure this can't happen!! (will add some assertions/checks later)
    10181018 */
    1019 VMM_INT_DECL(VBOXSTRICTRC) EMInterpretInstructionDisasState(PVMCPUCC pVCpu, PDISCPUSTATE pDis, uint64_t rip)
     1019VMM_INT_DECL(VBOXSTRICTRC) EMInterpretInstructionDisasState(PVMCPUCC pVCpu, PDISSTATE pDis, uint64_t rip)
    10201020{
    10211021    LogFlow(("EMInterpretInstructionDisasState %RGv\n", (RTGCPTR)rip));
  • trunk/src/VBox/VMM/VMMAll/GCMAll.cpp

    r98103 r99208  
    3535#include <VBox/vmm/vmcc.h>
    3636
    37 #include <VBox/dis.h>       /* For DISCPUSTATE */
     37#include <VBox/dis.h>       /* For DISSTATE */
    3838#include <iprt/errcore.h>
    3939#include <iprt/string.h>
     
    113113 * @thread  EMT(pVCpu).
    114114 */
    115 VMM_INT_DECL(VBOXSTRICTRC) GCMXcptDE(PVMCPUCC pVCpu, PCPUMCTX pCtx, PDISCPUSTATE pDis, uint8_t *pcbInstr)
     115VMM_INT_DECL(VBOXSTRICTRC) GCMXcptDE(PVMCPUCC pVCpu, PCPUMCTX pCtx, PDISSTATE pDis, uint8_t *pcbInstr)
    116116{
    117117    PVMCC pVM = pVCpu->CTX_SUFF(pVM);
  • trunk/src/VBox/VMM/VMMAll/GIMAll.cpp

    r99051 r99208  
    3636#include <VBox/vmm/vmcc.h>
    3737
    38 #include <VBox/dis.h>       /* For DISCPUSTATE */
     38#include <VBox/dis.h>       /* For DISSTATE */
    3939#include <VBox/err.h>
    4040#include <iprt/string.h>
     
    249249        return VERR_GIM_NOT_ENABLED;
    250250
    251     unsigned    cbInstr;
    252     DISCPUSTATE Dis;
     251    unsigned cbInstr;
     252    DISSTATE Dis;
    253253    int rc = EMInterpretDisasCurrent(pVCpu, &Dis, &cbInstr);
    254254    if (RT_SUCCESS(rc))
     
    363363 * @thread  EMT(pVCpu).
    364364 */
    365 VMM_INT_DECL(VBOXSTRICTRC) GIMXcptUD(PVMCPUCC pVCpu, PCPUMCTX pCtx, PDISCPUSTATE pDis, uint8_t *pcbInstr)
     365VMM_INT_DECL(VBOXSTRICTRC) GIMXcptUD(PVMCPUCC pVCpu, PCPUMCTX pCtx, PDISSTATE pDis, uint8_t *pcbInstr)
    366366{
    367367    PVMCC pVM = pVCpu->CTX_SUFF(pVM);
  • trunk/src/VBox/VMM/VMMAll/GIMAllHv.cpp

    r98103 r99208  
    14611461 * @thread  EMT(pVCpu).
    14621462 */
    1463 VMM_INT_DECL(VBOXSTRICTRC) gimHvXcptUD(PVMCPUCC pVCpu, PCPUMCTX pCtx, PDISCPUSTATE pDis, uint8_t *pcbInstr)
     1463VMM_INT_DECL(VBOXSTRICTRC) gimHvXcptUD(PVMCPUCC pVCpu, PCPUMCTX pCtx, PDISSTATE pDis, uint8_t *pcbInstr)
    14641464{
    14651465    VMCPU_ASSERT_EMT(pVCpu);
     
    14771477         * or the AMD VMMCALL instruction and if so, handle it as a hypercall.
    14781478         */
    1479         unsigned    cbInstr;
    1480         DISCPUSTATE Dis;
     1479        unsigned cbInstr;
     1480        DISSTATE Dis;
    14811481        int rc = EMInterpretDisasCurrent(pVCpu, &Dis, &cbInstr);
    14821482        if (RT_SUCCESS(rc))
  • trunk/src/VBox/VMM/VMMAll/GIMAllKvm.cpp

    r98103 r99208  
    420420 * @thread  EMT(pVCpu).
    421421 */
    422 VMM_INT_DECL(VBOXSTRICTRC) gimKvmXcptUD(PVMCC pVM, PVMCPUCC pVCpu, PCPUMCTX pCtx, PDISCPUSTATE pDis, uint8_t *pcbInstr)
     422VMM_INT_DECL(VBOXSTRICTRC) gimKvmXcptUD(PVMCC pVM, PVMCPUCC pVCpu, PCPUMCTX pCtx, PDISSTATE pDis, uint8_t *pcbInstr)
    423423{
    424424    VMCPU_ASSERT_EMT(pVCpu);
     
    432432    if (!pDis)
    433433    {
    434         unsigned    cbInstr;
    435         DISCPUSTATE Dis;
     434        unsigned cbInstr;
     435        DISSTATE Dis;
    436436        int rc = EMInterpretDisasCurrent(pVCpu, &Dis, &cbInstr);
    437437        if (RT_SUCCESS(rc))
  • trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp

    r98572 r99208  
    222222             * we will simply skip it. Otherwise we'll have to defer it to REM.
    223223             */
    224             uint32_t     cbOp;
    225             PDISCPUSTATE pDis = &pVCpu->pgm.s.DisState;
     224            uint32_t  cbOp;
     225            PDISSTATE pDis = &pVCpu->pgm.s.Dis;
    226226            rc = EMInterpretDisasCurrent(pVCpu, pDis, &cbOp);
    227227            if (     RT_SUCCESS(rc)
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r99132 r99208  
    727727 * @param   offFault    The access offset.
    728728 */
    729 DECLINLINE(bool) pgmRZPoolMonitorIsForking(PPGMPOOL pPool, PDISCPUSTATE pDis, unsigned offFault)
     729DECLINLINE(bool) pgmRZPoolMonitorIsForking(PPGMPOOL pPool, PDISSTATE pDis, unsigned offFault)
    730730{
    731731    /*
     
    771771 * @remark  The REP prefix check is left to the caller because of STOSD/W.
    772772 */
    773 DECLINLINE(bool) pgmRZPoolMonitorIsReused(PVMCC pVM, PVMCPUCC pVCpu, PCPUMCTX pCtx, PDISCPUSTATE pDis, RTGCPTR pvFault,
     773DECLINLINE(bool) pgmRZPoolMonitorIsReused(PVMCC pVM, PVMCPUCC pVCpu, PCPUMCTX pCtx, PDISSTATE pDis, RTGCPTR pvFault,
    774774                                          PPGMPOOLPAGE pPage)
    775775{
     
    885885 * @todo VBOXSTRICTRC
    886886 */
    887 static int pgmRZPoolAccessPfHandlerFlush(PVMCC pVM, PVMCPUCC pVCpu, PPGMPOOL pPool, PPGMPOOLPAGE pPage, PDISCPUSTATE pDis,
     887static int pgmRZPoolAccessPfHandlerFlush(PVMCC pVM, PVMCPUCC pVCpu, PPGMPOOL pPool, PPGMPOOLPAGE pPage, PDISSTATE pDis,
    888888                                         PCPUMCTX pCtx, RTGCPHYS GCPhysFault)
    889889{
     
    937937 * @param   pvFault     The fault address.
    938938 */
    939 DECLINLINE(int) pgmRZPoolAccessPfHandlerSTOSD(PVMCC pVM, PPGMPOOL pPool, PPGMPOOLPAGE pPage, PDISCPUSTATE pDis,
     939DECLINLINE(int) pgmRZPoolAccessPfHandlerSTOSD(PVMCC pVM, PPGMPOOL pPool, PPGMPOOLPAGE pPage, PDISSTATE pDis,
    940940                                              PCPUMCTX pCtx, RTGCPHYS GCPhysFault, RTGCPTR pvFault)
    941941{
     
    999999 * @param   pfReused    Reused state (in/out)
    10001000 */
    1001 DECLINLINE(int) pgmRZPoolAccessPfHandlerSimple(PVMCC pVM, PVMCPUCC pVCpu, PPGMPOOL pPool, PPGMPOOLPAGE pPage, PDISCPUSTATE pDis,
     1001DECLINLINE(int) pgmRZPoolAccessPfHandlerSimple(PVMCC pVM, PVMCPUCC pVCpu, PPGMPOOL pPool, PPGMPOOLPAGE pPage, PDISSTATE pDis,
    10021002                                               PCPUMCTX pCtx, RTGCPHYS GCPhysFault, bool *pfReused)
    10031003{
     
    11501150     * Disassemble the faulting instruction.
    11511151     */
    1152     PDISCPUSTATE pDis = &pVCpu->pgm.s.DisState;
     1152    PDISSTATE pDis = &pVCpu->pgm.s.Dis;
    11531153    int rc = EMInterpretDisasCurrent(pVCpu, pDis, NULL);
    11541154    if (RT_UNLIKELY(rc != VINF_SUCCESS))
  • trunk/src/VBox/VMM/VMMR3/CPUM.cpp

    r99163 r99208  
    42874287{
    42884288    /** Pointer to the CPU structure. */
    4289     PDISCPUSTATE    pCpu;
     4289    PDISSTATE       pDis;
    42904290    /** Pointer to the VM. */
    42914291    PVM             pVM;
     
    43144314 * @callback_method_impl{FNDISREADBYTES}
    43154315 */
    4316 static DECLCALLBACK(int) cpumR3DisasInstrRead(PDISCPUSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead)
     4316static DECLCALLBACK(int) cpumR3DisasInstrRead(PDISSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead)
    43174317{
    43184318    PCPUMDISASSTATE pState = (PCPUMDISASSTATE)pDis->pvUser;
     
    43874387 * @param   pCtx        Pointer to the guest CPU context.
    43884388 * @param   GCPtrPC     Program counter (relative to CS) to disassemble from.
    4389  * @param   pCpu        Disassembly state.
     4389 * @param   pDis        Disassembly state.
    43904390 * @param   pszPrefix   String prefix for logging (debug only).
    43914391 *
    43924392 */
    4393 VMMR3DECL(int) CPUMR3DisasmInstrCPU(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, RTGCPTR GCPtrPC, PDISCPUSTATE pCpu,
     4393VMMR3DECL(int) CPUMR3DisasmInstrCPU(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, RTGCPTR GCPtrPC, PDISSTATE pDis,
    43944394                                    const char *pszPrefix)
    43954395{
     
    43984398
    43994399    const PGMMODE enmMode = PGMGetGuestMode(pVCpu);
    4400     State.pCpu            = pCpu;
     4400    State.pDis            = pDis;
    44014401    State.pvPageGC        = 0;
    44024402    State.pvPageR3        = NULL;
     
    44464446    char szOutput[160];
    44474447    rc = DISInstrToStrWithReader(GCPtrPC, enmDisCpuMode, cpumR3DisasInstrRead, &State,
    4448                                  pCpu, &cbInstr, szOutput, sizeof(szOutput));
     4448                                 pDis, &cbInstr, szOutput, sizeof(szOutput));
    44494449    if (RT_SUCCESS(rc))
    44504450    {
  • trunk/src/VBox/VMM/VMMR3/HM.cpp

    r98103 r99208  
    22952295     */
    22962296    DBGFR3_DISAS_INSTR_CUR_LOG(pVCpu, "hmR3ReplaceTprInstr");
    2297     DISCPUSTATE     Dis;
     2297    DISSTATE        Dis;
    22982298    uint32_t        cbOp;
    22992299    int rc = EMInterpretDisasCurrent(pVCpu, &Dis, &cbOp);
     
    24712471     * Disassemble the instruction and get cracking.
    24722472     */
    2473     DISCPUSTATE     Dis;
     2473    DISSTATE        Dis;
    24742474    uint32_t        cbOp;
    24752475    int rc = EMInterpretDisasCurrent(pVCpu, &Dis, &cbOp);
  • trunk/src/VBox/VMM/include/EMInternal.h

    r98103 r99208  
    211211    /** For saving stack space, the disassembler state is allocated here instead of
    212212     * on the stack. */
    213     DISCPUSTATE             DisState;
     213    DISSTATE                Dis;
    214214
    215215    /** @name Execution profiling.
  • trunk/src/VBox/VMM/include/GIMHvInternal.h

    r98980 r99208  
    13671367VMM_INT_DECL(bool)              gimHvAreHypercallsEnabled(PCVM pVM);
    13681368VMM_INT_DECL(bool)              gimHvShouldTrapXcptUD(PVMCPU pVCpu);
    1369 VMM_INT_DECL(VBOXSTRICTRC)      gimHvXcptUD(PVMCPUCC pVCpu, PCPUMCTX pCtx, PDISCPUSTATE pDis, uint8_t *pcbInstr);
     1369VMM_INT_DECL(VBOXSTRICTRC)      gimHvXcptUD(PVMCPUCC pVCpu, PCPUMCTX pCtx, PDISSTATE pDis, uint8_t *pcbInstr);
    13701370VMM_INT_DECL(VBOXSTRICTRC)      gimHvHypercall(PVMCPUCC pVCpu, PCPUMCTX pCtx);
    13711371VMM_INT_DECL(VBOXSTRICTRC)      gimHvHypercallEx(PVMCPUCC pVCpu, PCPUMCTX pCtx, unsigned uDisOpcode, uint8_t cbInstr);
  • trunk/src/VBox/VMM/include/GIMKvmInternal.h

    r98980 r99208  
    276276#endif
    277277VMM_INT_DECL(bool)              gimKvmShouldTrapXcptUD(PVM pVM);
    278 VMM_INT_DECL(VBOXSTRICTRC)      gimKvmXcptUD(PVMCC pVM, PVMCPUCC pVCpu, PCPUMCTX pCtx, PDISCPUSTATE pDis, uint8_t *pcbInstr);
     278VMM_INT_DECL(VBOXSTRICTRC)      gimKvmXcptUD(PVMCC pVM, PVMCPUCC pVCpu, PCPUMCTX pCtx, PDISSTATE pDis, uint8_t *pcbInstr);
    279279VMM_INT_DECL(VBOXSTRICTRC)      gimKvmHypercallEx(PVMCPUCC pVCpu, PCPUMCTX pCtx, unsigned uDisOpcode, uint8_t cbInstr);
    280280
  • trunk/src/VBox/VMM/include/HMInternal.h

    r98103 r99208  
    11451145        /** For saving stack space, the disassembler state is allocated here
    11461146         * instead of on the stack. */
    1147         DISCPUSTATE                 DisState;
     1147        DISSTATE                    Dis;
    11481148    } svm;
    11491149} HMR0PERVCPU;
  • trunk/src/VBox/VMM/include/PGMInternal.h

    r99051 r99208  
    35943594    /** For saving stack space, the disassembler state is allocated here instead of
    35953595     * on the stack. */
    3596     DISCPUSTATE                     DisState;
     3596    DISSTATE                        Dis;
    35973597
    35983598    /** Counts the number of times the netware WP0+RO+US hack has been applied. */
  • trunk/src/VBox/VMM/testcase/tstVMStructSize.cpp

    r98103 r99208  
    318318    CHECK_MEMBER_ALIGNMENT(PGMCPU, GCPhysCR3, sizeof(RTGCPHYS));
    319319    CHECK_MEMBER_ALIGNMENT(PGMCPU, aGCPhysGstPaePDs, sizeof(RTGCPHYS));
    320     CHECK_MEMBER_ALIGNMENT(PGMCPU, DisState, 8);
     320    CHECK_MEMBER_ALIGNMENT(PGMCPU, Dis, 8);
    321321    CHECK_MEMBER_ALIGNMENT(PGMCPU, cPoolAccessHandler, 8);
    322322    CHECK_MEMBER_ALIGNMENT(PGMPOOLPAGE, idx, sizeof(uint16_t));
     
    363363    CHECK_MEMBER_ALIGNMENT(HMCPU, Event, 8);
    364364    CHECK_MEMBER_ALIGNMENT(HMCPU, Event.u64IntInfo, 8);
    365     CHECK_MEMBER_ALIGNMENT(HMR0PERVCPU, svm.DisState, 8);
     365    CHECK_MEMBER_ALIGNMENT(HMR0PERVCPU, svm.Dis, 8);
    366366    CHECK_MEMBER_ALIGNMENT(HMCPU, StatEntry, 8);
    367367
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