VirtualBox

Changeset 54687 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 8, 2015 8:57:26 PM (10 years ago)
Author:
vboxsync
Message:

PATM: Renamed the PATMA.asm global data to g_patm* (was PATM*).

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/PATM.cpp

    r54686 r54687  
    160160    AssertCompile(VMCPU_FF_INTERRUPT_PIC == RT_BIT_32(1));
    161161
    162     AssertReleaseMsg(PATMInterruptFlag == (VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC | VMCPU_FF_TIMER | VMCPU_FF_REQUEST),
    163                      ("Interrupt flags out of sync!! PATMInterruptFlag=%#x expected %#x. broken assembler?\n", PATMInterruptFlag, VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC | VMCPU_FF_TIMER | VMCPU_FF_REQUEST));
     162    AssertReleaseMsg(g_fPatmInterruptFlag == (VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC | VMCPU_FF_TIMER | VMCPU_FF_REQUEST),
     163                     ("Interrupt flags out of sync!! g_fPatmInterruptFlag=%#x expected %#x. broken assembler?\n", g_fPatmInterruptFlag, VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC | VMCPU_FF_TIMER | VMCPU_FF_REQUEST));
    164164
    165165    /* Allocate patch memory and GC patch state memory. */
     
    308308#endif /* VBOX_WITH_STATISTICS */
    309309
    310     Log(("PATMCallRecord.cbFunction           %u\n", PATMCallRecord.cbFunction));
    311     Log(("PATMCallIndirectRecord.cbFunction   %u\n", PATMCallIndirectRecord.cbFunction));
    312     Log(("PATMRetRecord.cbFunction            %u\n", PATMRetRecord.cbFunction));
    313     Log(("PATMJumpIndirectRecord.cbFunction   %u\n", PATMJumpIndirectRecord.cbFunction));
    314     Log(("PATMPopf32Record.cbFunction         %u\n", PATMPopf32Record.cbFunction));
    315     Log(("PATMIretRecord.cbFunction           %u\n", PATMIretRecord.cbFunction));
    316     Log(("PATMStiRecord.cbFunction            %u\n", PATMStiRecord.cbFunction));
    317     Log(("PATMCheckIFRecord.cbFunction        %u\n", PATMCheckIFRecord.cbFunction));
     310    Log(("g_patmCallRecord.cbFunction           %u\n", g_patmCallRecord.cbFunction));
     311    Log(("g_patmCallIndirectRecord.cbFunction   %u\n", g_patmCallIndirectRecord.cbFunction));
     312    Log(("g_patmRetRecord.cbFunction            %u\n", g_patmRetRecord.cbFunction));
     313    Log(("g_patmJumpIndirectRecord.cbFunction   %u\n", g_patmJumpIndirectRecord.cbFunction));
     314    Log(("g_patmPopf32Record.cbFunction         %u\n", g_patmPopf32Record.cbFunction));
     315    Log(("g_patmIretRecord.cbFunction           %u\n", g_patmIretRecord.cbFunction));
     316    Log(("g_patmStiRecord.cbFunction            %u\n", g_patmStiRecord.cbFunction));
     317    Log(("g_patmCheckIFRecord.cbFunction        %u\n", g_patmCheckIFRecord.cbFunction));
    318318
    319319    return rc;
  • trunk/src/VBox/VMM/VMMR3/PATMA.asm

    r54686 r54687  
    6464
    6565; Patch record for statistics
    66 GLOBALNAME PATMStatsRecord
     66GLOBALNAME g_patmStatsRecord
    6767    RTCCPTR_DEF PATMStats_Start
    6868    DD      0
     
    9494SECTION .data
    9595; Patch record for setting PATM_INTERRUPTFLAG
    96 GLOBALNAME PATMSetPIFRecord
     96GLOBALNAME g_patmSetPIFRecord
    9797    RTCCPTR_DEF PATMSetPIF_Start
    9898    DD      0
     
    121121SECTION .data
    122122; Patch record for clearing PATM_INTERRUPTFLAG
    123 GLOBALNAME PATMClearPIFRecord
     123GLOBALNAME g_patmClearPIFRecord
    124124    RTCCPTR_DEF PATMClearPIF_Start
    125125    DD      0
     
    176176SECTION .data
    177177; Patch record for clearing PATM_INHIBITIRQADDR
    178 GLOBALNAME PATMClearInhibitIRQFaultIF0Record
     178GLOBALNAME g_patmClearInhibitIRQFaultIF0Record
    179179    RTCCPTR_DEF PATMClearInhibitIRQFaultIF0_Start
    180180    DD      0
     
    248248SECTION .data
    249249; Patch record for clearing PATM_INHIBITIRQADDR
    250 GLOBALNAME PATMClearInhibitIRQContIF0Record
     250GLOBALNAME g_patmClearInhibitIRQContIF0Record
    251251    RTCCPTR_DEF PATMClearInhibitIRQContIF0_Start
    252252    DD      0
     
    309309SECTION .data
    310310; Patch record for 'cli'
    311 GLOBALNAME PATMCliRecord
     311GLOBALNAME g_patmCliRecord
    312312    RTCCPTR_DEF PATMCliStart
    313313    DD      PATMCliJump - PATMCliStart
     
    357357SECTION .data
    358358; Patch record for 'sti'
    359 GLOBALNAME PATMStiRecord
     359GLOBALNAME g_patmStiRecord
    360360    RTCCPTR_DEF PATMStiStart
    361361    DD      0
     
    447447SECTION .data
    448448; Patch record for trap gate entrypoint
    449 GLOBALNAME PATMTrapEntryRecord
     449GLOBALNAME g_patmTrapEntryRecord
    450450    RTCCPTR_DEF PATMTrapEntryStart
    451451    DD      PATMTrapEntryJump - PATMTrapEntryStart
     
    534534SECTION .data
    535535; Patch record for trap gate entrypoint
    536 GLOBALNAME PATMTrapEntryRecordErrorCode
     536GLOBALNAME g_patmTrapEntryRecordErrorCode
    537537    RTCCPTR_DEF PATMTrapErrorCodeEntryStart
    538538    DD      PATMTrapErrorCodeEntryJump - PATMTrapErrorCodeEntryStart
     
    618618SECTION .data
    619619; Patch record for interrupt gate entrypoint
    620 GLOBALNAME PATMIntEntryRecord
     620GLOBALNAME g_patmIntEntryRecord
    621621    RTCCPTR_DEF PATMIntEntryStart
    622622    DD      0
     
    702702SECTION .data
    703703; Patch record for interrupt gate entrypoint
    704 GLOBALNAME PATMIntEntryRecordErrorCode
     704GLOBALNAME g_patmIntEntryRecordErrorCode
    705705    RTCCPTR_DEF PATMIntEntryErrorCodeStart
    706706    DD      0
     
    789789SECTION .data
    790790; Patch record for 'popfd'
    791 GLOBALNAME PATMPopf32Record
     791GLOBALNAME g_patmPopf32Record
    792792    RTCCPTR_DEF PATMPopf32Start
    793793    DD      PATMPopf32Jump - PATMPopf32Start
     
    883883SECTION .data
    884884; Patch record for 'popfd'
    885 GLOBALNAME PATMPopf32Record_NoExit
     885GLOBALNAME g_patmPopf32Record_NoExit
    886886    RTCCPTR_DEF PATMPopf32_NoExitStart
    887887    DD      0
     
    967967SECTION .data
    968968; Patch record for 'popf'
    969 GLOBALNAME PATMPopf16Record
     969GLOBALNAME g_patmPopf16Record
    970970    RTCCPTR_DEF PATMPopf16Start
    971971    DD      PATMPopf16Jump - PATMPopf16Start
     
    10301030SECTION .data
    10311031; Patch record for 'popf'
    1032 GLOBALNAME PATMPopf16Record_NoExit
     1032GLOBALNAME g_patmPopf16Record_NoExit
    10331033    RTCCPTR_DEF PATMPopf16Start_NoExit
    10341034    DD      0
     
    10891089SECTION .data
    10901090; Patch record for 'pushfd'
    1091 GLOBALNAME PATMPushf32Record
     1091GLOBALNAME g_patmPushf32Record
    10921092    RTCCPTR_DEF PATMPushf32Start
    10931093    DD      0
     
    11381138SECTION .data
    11391139; Patch record for 'pushf'
    1140 GLOBALNAME PATMPushf16Record
     1140GLOBALNAME g_patmPushf16Record
    11411141    RTCCPTR_DEF PATMPushf16Start
    11421142    DD      0
     
    11801180SECTION .data
    11811181; Patch record for 'push cs'
    1182 GLOBALNAME PATMPushCSRecord
     1182GLOBALNAME g_patmPushCSRecord
    11831183    RTCCPTR_DEF PATMPushCSStart
    11841184    DD      PATMPushCSJump - PATMPushCSStart
     
    13941394SECTION .data
    13951395; Patch record for 'iretd'
    1396 GLOBALNAME PATMIretRecord
     1396GLOBALNAME g_patmIretRecord
    13971397    RTCCPTR_DEF PATMIretStart
    13981398    DD      0
     
    16921692SECTION .data
    16931693; Patch record for 'iretd'
    1694 GLOBALNAME PATMIretRing1Record
     1694GLOBALNAME g_patmIretRing1Record
    16951695    RTCCPTR_DEF PATMIretRing1Start
    16961696    DD      0
     
    18431843
    18441844SECTION .data
    1845 GLOBALNAME PATMIretFunctionRecord
     1845GLOBALNAME g_patmIretFunctionRecord
    18461846    RTCCPTR_DEF PATMIretFunction_Start
    18471847    DD      0
     
    19121912SECTION .data
    19131913; Patch record for 'cpuid'
    1914 GLOBALNAME PATMCpuidRecord
     1914GLOBALNAME g_patmCpuidRecord
    19151915    istruc PATCHASMRECORD
    19161916    at PATCHASMRECORD.pbFunction,     RTCCPTR_DEF PATMCpuidStart
     
    19571957SECTION .data
    19581958; Patch record for 'JEcx'
    1959 GLOBALNAME PATMJEcxRecord
     1959GLOBALNAME g_patmJEcxRecord
    19601960    RTCCPTR_DEF PATMJEcxStart
    19611961    DD      0
     
    19971997SECTION .data
    19981998; Patch record for 'Loop'
    1999 GLOBALNAME PATMLoopRecord
     1999GLOBALNAME g_patmLoopRecord
    20002000    RTCCPTR_DEF PATMLoopStart
    20012001    DD      0
     
    20392039SECTION .data
    20402040; Patch record for 'Loopz'
    2041 GLOBALNAME PATMLoopZRecord
     2041GLOBALNAME g_patmLoopZRecord
    20422042    RTCCPTR_DEF PATMLoopZStart
    20432043    DD      0
     
    20822082SECTION .data
    20832083; Patch record for 'LoopNZ'
    2084 GLOBALNAME PATMLoopNZRecord
     2084GLOBALNAME g_patmLoopNZRecord
    20852085    RTCCPTR_DEF PATMLoopNZStart
    20862086    DD      0
     
    22172217SECTION .data
    22182218; Patch record for indirect calls and jumps
    2219 GLOBALNAME PATMLookupAndCallRecord
     2219GLOBALNAME g_patmLookupAndCallRecord
    22202220    RTCCPTR_DEF PATMLookupAndCallStart
    22212221    DD      0
     
    23362336SECTION .data
    23372337; Patch record for indirect calls and jumps
    2338 GLOBALNAME PATMLookupAndJumpRecord
     2338GLOBALNAME g_patmLookupAndJumpRecord
    23392339    RTCCPTR_DEF PATMLookupAndJumpStart
    23402340    DD      0
     
    23972397SECTION .data
    23982398; Patch record for direct calls
    2399 GLOBALNAME PATMCallRecord
     2399GLOBALNAME g_patmCallRecord
    24002400    RTCCPTR_DEF PATMCallStart
    24012401    DD      0
     
    24552455SECTION .data
    24562456; Patch record for indirect calls
    2457 GLOBALNAME PATMCallIndirectRecord
     2457GLOBALNAME g_patmCallIndirectRecord
    24582458    RTCCPTR_DEF PATMCallIndirectStart
    24592459    DD      0
     
    25182518SECTION .data
    25192519; Patch record for indirect jumps
    2520 GLOBALNAME PATMJumpIndirectRecord
     2520GLOBALNAME g_patmJumpIndirectRecord
    25212521    RTCCPTR_DEF PATMJumpIndirectStart
    25222522    DD      0
     
    25842584
    25852585SECTION .data
    2586 GLOBALNAME PATMRetRecord
     2586GLOBALNAME g_patmRetRecord
    25872587    RTCCPTR_DEF PATMRet_Start
    25882588    DD      0
     
    27512751
    27522752SECTION .data
    2753 GLOBALNAME PATMRetFunctionRecord
     2753GLOBALNAME g_patmRetFunctionRecord
    27542754    RTCCPTR_DEF PATMRetFunction_Start
    27552755    DD      0
     
    28292829SECTION .data
    28302830; Patch record for call instructions
    2831 GLOBALNAME PATMCheckIFRecord
     2831GLOBALNAME g_patmCheckIFRecord
    28322832    RTCCPTR_DEF PATMCheckIF_Start
    28332833    DD      PATMCheckIF_Jump - PATMCheckIF_Start
     
    29222922
    29232923SECTION .data
    2924 GLOBALNAME PATMMovFromSSRecord
     2924GLOBALNAME g_patmMovFromSSRecord
    29252925    RTCCPTR_DEF PATMMovFromSS_Start
    29262926    DD      0
     
    29362936SECTION .rodata
    29372937; For assertion during init (to make absolutely sure the flags are in sync in vm.mac & vm.h)
    2938 GLOBALNAME PATMInterruptFlag
     2938GLOBALNAME g_fPatmInterruptFlag
    29392939    DD      VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC | VMCPU_FF_TIMER | VMCPU_FF_REQUEST
    29402940
  • trunk/src/VBox/VMM/VMMR3/PATMPatch.cpp

    r54686 r54687  
    434434
    435435    if (EMIsRawRing1Enabled(pVM))
    436         size = patmPatchGenCode(pVM, pPatch, pPB, &PATMIretRing1Record, 0, false, &callInfo);
     436        size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmIretRing1Record, 0, false, &callInfo);
    437437    else
    438         size = patmPatchGenCode(pVM, pPatch, pPB, &PATMIretRecord, 0, false, &callInfo);
     438        size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmIretRecord, 0, false, &callInfo);
    439439
    440440    PATCHGEN_EPILOG(pPatch, size);
     
    447447    PATCHGEN_PROLOG(pVM, pPatch);
    448448
    449     size = patmPatchGenCode(pVM, pPatch, pPB, &PATMCliRecord, 0, false);
     449    size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmCliRecord, 0, false);
    450450
    451451    PATCHGEN_EPILOG(pPatch, size);
     
    464464    PATCHGEN_PROLOG(pVM, pPatch);
    465465    callInfo.pNextInstrGC = pNextInstrGC;
    466     size = patmPatchGenCode(pVM, pPatch, pPB, &PATMStiRecord, 0, false, &callInfo);
     466    size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmStiRecord, 0, false, &callInfo);
    467467    PATCHGEN_EPILOG(pPatch, size);
    468468
     
    486486    {
    487487        Log(("operand size override!!\n"));
    488         size = patmPatchGenCode(pVM, pPatch, pPB, (fGenJumpBack) ? &PATMPopf16Record : &PATMPopf16Record_NoExit , pReturnAddrGC, fGenJumpBack, &callInfo);
     488        size = patmPatchGenCode(pVM, pPatch, pPB, (fGenJumpBack) ? &g_patmPopf16Record : &g_patmPopf16Record_NoExit , pReturnAddrGC, fGenJumpBack, &callInfo);
    489489    }
    490490    else
    491491    {
    492         size = patmPatchGenCode(pVM, pPatch, pPB, (fGenJumpBack) ? &PATMPopf32Record : &PATMPopf32Record_NoExit, pReturnAddrGC, fGenJumpBack, &callInfo);
     492        size = patmPatchGenCode(pVM, pPatch, pPB, (fGenJumpBack) ? &g_patmPopf32Record : &g_patmPopf32Record_NoExit, pReturnAddrGC, fGenJumpBack, &callInfo);
    493493    }
    494494
     
    506506    {
    507507        Log(("operand size override!!\n"));
    508         size = patmPatchGenCode(pVM, pPatch, pPB, &PATMPushf16Record, 0, false);
     508        size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmPushf16Record, 0, false);
    509509    }
    510510    else
    511511    {
    512         size = patmPatchGenCode(pVM, pPatch, pPB, &PATMPushf32Record, 0, false);
     512        size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmPushf32Record, 0, false);
    513513    }
    514514
     
    521521    uint32_t size;
    522522    PATCHGEN_PROLOG(pVM, pPatch);
    523     size = patmPatchGenCode(pVM, pPatch, pPB, &PATMPushCSRecord, 0, false);
     523    size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmPushCSRecord, 0, false);
    524524    PATCHGEN_EPILOG(pPatch, size);
    525525    return VINF_SUCCESS;
     
    536536    {
    537537    case OP_LOOP:
    538         pPatchAsmRec = &PATMLoopRecord;
     538        pPatchAsmRec = &g_patmLoopRecord;
    539539        break;
    540540    case OP_LOOPNE:
    541         pPatchAsmRec = &PATMLoopNZRecord;
     541        pPatchAsmRec = &g_patmLoopNZRecord;
    542542        break;
    543543    case OP_LOOPE:
    544         pPatchAsmRec = &PATMLoopZRecord;
     544        pPatchAsmRec = &g_patmLoopZRecord;
    545545        break;
    546546    case OP_JECXZ:
    547         pPatchAsmRec = &PATMJEcxRecord;
     547        pPatchAsmRec = &g_patmJEcxRecord;
    548548        break;
    549549    default:
     
    748748    callInfo.pReturnGC      = pCurInstrGC + pCpu->cbInstr;
    749749    callInfo.pTargetGC      = (fIndirect) ? 0xDEADBEEF : pTargetGC;
    750     size = patmPatchGenCode(pVM, pPatch, pPB, (fIndirect) ? &PATMCallIndirectRecord : &PATMCallRecord, 0, false, &callInfo);
     750    size = patmPatchGenCode(pVM, pPatch, pPB, (fIndirect) ? &g_patmCallIndirectRecord : &g_patmCallRecord, 0, false, &callInfo);
    751751    PATCHGEN_EPILOG(pPatch, size);
    752752
     
    825825    callInfo.pReturnGC      = pCurInstrGC + pCpu->cbInstr;
    826826    callInfo.pTargetGC      = 0xDEADBEEF;
    827     size = patmPatchGenCode(pVM, pPatch, pPB, &PATMJumpIndirectRecord, 0, false, &callInfo);
     827    size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmJumpIndirectRecord, 0, false, &callInfo);
    828828    PATCHGEN_EPILOG(pPatch, size);
    829829
     
    878878
    879879    PATCHGEN_PROLOG_NODEF(pVM, pPatch);
    880     size = patmPatchGenCode(pVM, pPatch, pPB, &PATMRetRecord, 0, false);
     880    size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmRetRecord, 0, false);
    881881    PATCHGEN_EPILOG(pPatch, size);
    882882
     
    907907    pVM->patm.s.pfnHelperCallGC = PATCHCODE_PTR_GC(pPatch) + pPatch->uCurPatchOffset;
    908908    PATCHGEN_PROLOG(pVM, pPatch);
    909     size = patmPatchGenCode(pVM, pPatch, pPB, &PATMLookupAndCallRecord, 0, false);
     909    size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmLookupAndCallRecord, 0, false);
    910910    PATCHGEN_EPILOG(pPatch, size);
    911911
     
    915915    pVM->patm.s.pfnHelperRetGC = PATCHCODE_PTR_GC(pPatch) + pPatch->uCurPatchOffset;
    916916    PATCHGEN_PROLOG_NODEF(pVM, pPatch);
    917     size = patmPatchGenCode(pVM, pPatch, pPB, &PATMRetFunctionRecord, 0, false);
     917    size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmRetFunctionRecord, 0, false);
    918918    PATCHGEN_EPILOG(pPatch, size);
    919919
     
    923923    pVM->patm.s.pfnHelperJumpGC = PATCHCODE_PTR_GC(pPatch) + pPatch->uCurPatchOffset;
    924924    PATCHGEN_PROLOG_NODEF(pVM, pPatch);
    925     size = patmPatchGenCode(pVM, pPatch, pPB, &PATMLookupAndJumpRecord, 0, false);
     925    size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmLookupAndJumpRecord, 0, false);
    926926    PATCHGEN_EPILOG(pPatch, size);
    927927
     
    931931    pVM->patm.s.pfnHelperIretGC = PATCHCODE_PTR_GC(pPatch) + pPatch->uCurPatchOffset;
    932932    PATCHGEN_PROLOG_NODEF(pVM, pPatch);
    933     size = patmPatchGenCode(pVM, pPatch, pPB, &PATMIretFunctionRecord, 0, false);
     933    size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmIretFunctionRecord, 0, false);
    934934    PATCHGEN_EPILOG(pPatch, size);
    935935
     
    979979
    980980    /* Generate code to check for IF=1 before executing the call to the duplicated function. */
    981     size = patmPatchGenCode(pVM, pPatch, pPB, &PATMCheckIFRecord, pCurInstrGC, true);
     981    size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmCheckIFRecord, pCurInstrGC, true);
    982982
    983983    PATCHGEN_EPILOG(pPatch, size);
     
    10011001    patmR3AddP2GLookupRecord(pVM, pPatch, pPB, pInstrGC, PATM_LOOKUP_PATCH2GUEST);
    10021002
    1003     int size = patmPatchGenCode(pVM, pPatch, pPB, &PATMSetPIFRecord, 0, false);
     1003    int size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmSetPIFRecord, 0, false);
    10041004    PATCHGEN_EPILOG(pPatch, size);
    10051005    return VINF_SUCCESS;
     
    10221022    patmR3AddP2GLookupRecord(pVM, pPatch, pPB, pInstrGC, PATM_LOOKUP_PATCH2GUEST);
    10231023
    1024     int size = patmPatchGenCode(pVM, pPatch, pPB, &PATMClearPIFRecord, 0, false);
     1024    int size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmClearPIFRecord, 0, false);
    10251025    PATCHGEN_EPILOG(pPatch, size);
    10261026    return VINF_SUCCESS;
     
    10511051
    10521052    if (pPatch->flags & PATMFL_DUPLICATE_FUNCTION)
    1053         size = patmPatchGenCode(pVM, pPatch, pPB, &PATMClearInhibitIRQContIF0Record, 0, false, &callInfo);
     1053        size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmClearInhibitIRQContIF0Record, 0, false, &callInfo);
    10541054    else
    1055         size = patmPatchGenCode(pVM, pPatch, pPB, &PATMClearInhibitIRQFaultIF0Record, 0, false, &callInfo);
     1055        size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmClearInhibitIRQFaultIF0Record, 0, false, &callInfo);
    10561056
    10571057    PATCHGEN_EPILOG(pPatch, size);
     
    10851085        /* Generate entrypoint for the interrupt handler (correcting CS in the interrupt stack frame) */
    10861086        size = patmPatchGenCode(pVM, pPatch, pPB,
    1087                                 (pPatch->flags & PATMFL_INTHANDLER_WITH_ERRORCODE) ? &PATMIntEntryRecordErrorCode : &PATMIntEntryRecord,
     1087                                (pPatch->flags & PATMFL_INTHANDLER_WITH_ERRORCODE) ? &g_patmIntEntryRecordErrorCode : &g_patmIntEntryRecord,
    10881088                                0, false);
    10891089
     
    11191119    /* Generate entrypoint for the trap handler (correcting CS in the interrupt stack frame) */
    11201120    size = patmPatchGenCode(pVM, pPatch, pPB,
    1121                             (pPatch->flags & PATMFL_TRAPHANDLER_WITH_ERRORCODE) ? &PATMTrapEntryRecordErrorCode : &PATMTrapEntryRecord,
     1121                            (pPatch->flags & PATMFL_TRAPHANDLER_WITH_ERRORCODE) ? &g_patmTrapEntryRecordErrorCode : &g_patmTrapEntryRecord,
    11221122                            pTrapHandlerGC, true);
    11231123    PATCHGEN_EPILOG(pPatch, size);
     
    11371137
    11381138    /* Generate code to keep calling statistics for this patch */
    1139     size = patmPatchGenCode(pVM, pPatch, pPB, &PATMStatsRecord, pInstrGC, false);
     1139    size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmStatsRecord, pInstrGC, false);
    11401140    PATCHGEN_EPILOG(pPatch, size);
    11411141
     
    12751275
    12761276    PATCHGEN_PROLOG(pVM, pPatch);
    1277     size = patmPatchGenCode(pVM, pPatch, pPB, &PATMClearPIFRecord, 0, false);
     1277    size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmClearPIFRecord, 0, false);
    12781278    PATCHGEN_EPILOG(pPatch, size);
    12791279
     
    12881288    /* checks and corrects RPL of pushed ss*/
    12891289    PATCHGEN_PROLOG_NODEF(pVM, pPatch);
    1290     size = patmPatchGenCode(pVM, pPatch, pPB, &PATMMovFromSSRecord, 0, false);
     1290    size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmMovFromSSRecord, 0, false);
    12911291    PATCHGEN_EPILOG(pPatch, size);
    12921292
     
    13011301
    13021302    PATCHGEN_PROLOG_NODEF(pVM, pPatch);
    1303     size = patmPatchGenCode(pVM, pPatch, pPB, &PATMSetPIFRecord, 0, false);
     1303    size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmSetPIFRecord, 0, false);
    13041304    PATCHGEN_EPILOG(pPatch, size);
    13051305
     
    15171517    PATCHGEN_PROLOG(pVM, pPatch);
    15181518
    1519     size = patmPatchGenCode(pVM, pPatch, pPB, &PATMCpuidRecord, 0, false);
     1519    size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmCpuidRecord, 0, false);
    15201520
    15211521    PATCHGEN_EPILOG(pPatch, size);
  • trunk/src/VBox/VMM/VMMR3/PATMR3Dbg.cpp

    r54686 r54687  
    241241     * Global functions and a start marker.
    242242     */
    243     ADD_FUNC(hDbgMod, pVM->patm.s.pPatchMemGC, pVM->patm.s.pfnHelperCallGC, PATMLookupAndCallRecord.cbFunction, "PATMLookupAndCall");
    244     ADD_FUNC(hDbgMod, pVM->patm.s.pPatchMemGC, pVM->patm.s.pfnHelperRetGC,  PATMRetFunctionRecord.cbFunction,   "PATMRetFunction");
    245     ADD_FUNC(hDbgMod, pVM->patm.s.pPatchMemGC, pVM->patm.s.pfnHelperJumpGC, PATMLookupAndJumpRecord.cbFunction, "PATMLookupAndJump");
    246     ADD_FUNC(hDbgMod, pVM->patm.s.pPatchMemGC, pVM->patm.s.pfnHelperIretGC, PATMIretFunctionRecord.cbFunction,  "PATMIretFunction");
     243    ADD_FUNC(hDbgMod, pVM->patm.s.pPatchMemGC, pVM->patm.s.pfnHelperCallGC, g_patmLookupAndCallRecord.cbFunction, "PATMLookupAndCall");
     244    ADD_FUNC(hDbgMod, pVM->patm.s.pPatchMemGC, pVM->patm.s.pfnHelperRetGC,  g_patmRetFunctionRecord.cbFunction,   "PATMRetFunction");
     245    ADD_FUNC(hDbgMod, pVM->patm.s.pPatchMemGC, pVM->patm.s.pfnHelperJumpGC, g_patmLookupAndJumpRecord.cbFunction, "PATMLookupAndJump");
     246    ADD_FUNC(hDbgMod, pVM->patm.s.pPatchMemGC, pVM->patm.s.pfnHelperIretGC, g_patmIretFunctionRecord.cbFunction,  "PATMIretFunction");
    247247
    248248    ADD_FUNC(hDbgMod, pVM->patm.s.pPatchMemGC, pVM->patm.s.pPatchMemGC, 0,  "PatchMemStart");
  • trunk/src/VBox/VMM/include/PATMA.h

    r54686 r54687  
    170170/** @name Patch Descriptor Records (in PATMA.asm)
    171171 * @{ */
    172 extern PATCHASMRECORD PATMCliRecord;
    173 extern PATCHASMRECORD PATMStiRecord;
    174 extern PATCHASMRECORD PATMPopf32Record;
    175 extern PATCHASMRECORD PATMPopf16Record;
    176 extern PATCHASMRECORD PATMPopf16Record_NoExit;
    177 extern PATCHASMRECORD PATMPopf32Record_NoExit;
    178 extern PATCHASMRECORD PATMPushf32Record;
    179 extern PATCHASMRECORD PATMPushf16Record;
    180 extern PATCHASMRECORD PATMIretRecord;
    181 extern PATCHASMRECORD PATMIretRing1Record;
    182 extern PATCHASMRECORD PATMCpuidRecord;
    183 extern PATCHASMRECORD PATMLoopRecord;
    184 extern PATCHASMRECORD PATMLoopZRecord;
    185 extern PATCHASMRECORD PATMLoopNZRecord;
    186 extern PATCHASMRECORD PATMJEcxRecord;
    187 extern PATCHASMRECORD PATMIntEntryRecord;
    188 extern PATCHASMRECORD PATMIntEntryRecordErrorCode;
    189 extern PATCHASMRECORD PATMTrapEntryRecord;
    190 extern PATCHASMRECORD PATMTrapEntryRecordErrorCode;
    191 extern PATCHASMRECORD PATMPushCSRecord;
    192 
    193 extern PATCHASMRECORD PATMCheckIFRecord;
     172extern PATCHASMRECORD g_patmCliRecord;
     173extern PATCHASMRECORD g_patmStiRecord;
     174extern PATCHASMRECORD g_patmPopf32Record;
     175extern PATCHASMRECORD g_patmPopf16Record;
     176extern PATCHASMRECORD g_patmPopf16Record_NoExit;
     177extern PATCHASMRECORD g_patmPopf32Record_NoExit;
     178extern PATCHASMRECORD g_patmPushf32Record;
     179extern PATCHASMRECORD g_patmPushf16Record;
     180extern PATCHASMRECORD g_patmIretRecord;
     181extern PATCHASMRECORD g_patmIretRing1Record;
     182extern PATCHASMRECORD g_patmCpuidRecord;
     183extern PATCHASMRECORD g_patmLoopRecord;
     184extern PATCHASMRECORD g_patmLoopZRecord;
     185extern PATCHASMRECORD g_patmLoopNZRecord;
     186extern PATCHASMRECORD g_patmJEcxRecord;
     187extern PATCHASMRECORD g_patmIntEntryRecord;
     188extern PATCHASMRECORD g_patmIntEntryRecordErrorCode;
     189extern PATCHASMRECORD g_patmTrapEntryRecord;
     190extern PATCHASMRECORD g_patmTrapEntryRecordErrorCode;
     191extern PATCHASMRECORD g_patmPushCSRecord;
     192
     193extern PATCHASMRECORD g_patmCheckIFRecord;
    194194extern PATCHASMRECORD PATMJumpToGuest_IF1Record;
    195195
    196 extern PATCHASMRECORD PATMCallRecord;
    197 extern PATCHASMRECORD PATMCallIndirectRecord;
    198 extern PATCHASMRECORD PATMRetRecord;
    199 extern PATCHASMRECORD PATMJumpIndirectRecord;
    200 
    201 extern PATCHASMRECORD PATMLookupAndCallRecord;
    202 extern PATCHASMRECORD PATMRetFunctionRecord;
    203 extern PATCHASMRECORD PATMLookupAndJumpRecord;
    204 extern PATCHASMRECORD PATMIretFunctionRecord;
    205 
    206 extern PATCHASMRECORD PATMStatsRecord;
    207 
    208 extern PATCHASMRECORD PATMSetPIFRecord;
    209 extern PATCHASMRECORD PATMClearPIFRecord;
    210 
    211 extern PATCHASMRECORD PATMSetInhibitIRQRecord;
    212 extern PATCHASMRECORD PATMClearInhibitIRQFaultIF0Record;
    213 extern PATCHASMRECORD PATMClearInhibitIRQContIF0Record;
    214 
    215 extern PATCHASMRECORD PATMMovFromSSRecord;
    216 /** @} */
    217 
    218 extern const uint32_t PATMInterruptFlag;
     196extern PATCHASMRECORD g_patmCallRecord;
     197extern PATCHASMRECORD g_patmCallIndirectRecord;
     198extern PATCHASMRECORD g_patmRetRecord;
     199extern PATCHASMRECORD g_patmJumpIndirectRecord;
     200
     201extern PATCHASMRECORD g_patmLookupAndCallRecord;
     202extern PATCHASMRECORD g_patmRetFunctionRecord;
     203extern PATCHASMRECORD g_patmLookupAndJumpRecord;
     204extern PATCHASMRECORD g_patmIretFunctionRecord;
     205
     206extern PATCHASMRECORD g_patmStatsRecord;
     207
     208extern PATCHASMRECORD g_patmSetPIFRecord;
     209extern PATCHASMRECORD g_patmClearPIFRecord;
     210
     211extern PATCHASMRECORD g_patmSetInhibitIRQRecord;
     212extern PATCHASMRECORD g_patmClearInhibitIRQFaultIF0Record;
     213extern PATCHASMRECORD g_patmClearInhibitIRQContIF0Record;
     214
     215extern PATCHASMRECORD g_patmMovFromSSRecord;
     216/** @} */
     217
     218extern const uint32_t g_fPatmInterruptFlag;
    219219
    220220RT_C_DECLS_END
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