Changeset 54687 in vbox for trunk/src/VBox
- Timestamp:
- Mar 8, 2015 8:57:26 PM (10 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PATM.cpp
r54686 r54687 160 160 AssertCompile(VMCPU_FF_INTERRUPT_PIC == RT_BIT_32(1)); 161 161 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)); 164 164 165 165 /* Allocate patch memory and GC patch state memory. */ … … 308 308 #endif /* VBOX_WITH_STATISTICS */ 309 309 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)); 318 318 319 319 return rc; -
trunk/src/VBox/VMM/VMMR3/PATMA.asm
r54686 r54687 64 64 65 65 ; Patch record for statistics 66 GLOBALNAME PATMStatsRecord66 GLOBALNAME g_patmStatsRecord 67 67 RTCCPTR_DEF PATMStats_Start 68 68 DD 0 … … 94 94 SECTION .data 95 95 ; Patch record for setting PATM_INTERRUPTFLAG 96 GLOBALNAME PATMSetPIFRecord96 GLOBALNAME g_patmSetPIFRecord 97 97 RTCCPTR_DEF PATMSetPIF_Start 98 98 DD 0 … … 121 121 SECTION .data 122 122 ; Patch record for clearing PATM_INTERRUPTFLAG 123 GLOBALNAME PATMClearPIFRecord123 GLOBALNAME g_patmClearPIFRecord 124 124 RTCCPTR_DEF PATMClearPIF_Start 125 125 DD 0 … … 176 176 SECTION .data 177 177 ; Patch record for clearing PATM_INHIBITIRQADDR 178 GLOBALNAME PATMClearInhibitIRQFaultIF0Record178 GLOBALNAME g_patmClearInhibitIRQFaultIF0Record 179 179 RTCCPTR_DEF PATMClearInhibitIRQFaultIF0_Start 180 180 DD 0 … … 248 248 SECTION .data 249 249 ; Patch record for clearing PATM_INHIBITIRQADDR 250 GLOBALNAME PATMClearInhibitIRQContIF0Record250 GLOBALNAME g_patmClearInhibitIRQContIF0Record 251 251 RTCCPTR_DEF PATMClearInhibitIRQContIF0_Start 252 252 DD 0 … … 309 309 SECTION .data 310 310 ; Patch record for 'cli' 311 GLOBALNAME PATMCliRecord311 GLOBALNAME g_patmCliRecord 312 312 RTCCPTR_DEF PATMCliStart 313 313 DD PATMCliJump - PATMCliStart … … 357 357 SECTION .data 358 358 ; Patch record for 'sti' 359 GLOBALNAME PATMStiRecord359 GLOBALNAME g_patmStiRecord 360 360 RTCCPTR_DEF PATMStiStart 361 361 DD 0 … … 447 447 SECTION .data 448 448 ; Patch record for trap gate entrypoint 449 GLOBALNAME PATMTrapEntryRecord449 GLOBALNAME g_patmTrapEntryRecord 450 450 RTCCPTR_DEF PATMTrapEntryStart 451 451 DD PATMTrapEntryJump - PATMTrapEntryStart … … 534 534 SECTION .data 535 535 ; Patch record for trap gate entrypoint 536 GLOBALNAME PATMTrapEntryRecordErrorCode536 GLOBALNAME g_patmTrapEntryRecordErrorCode 537 537 RTCCPTR_DEF PATMTrapErrorCodeEntryStart 538 538 DD PATMTrapErrorCodeEntryJump - PATMTrapErrorCodeEntryStart … … 618 618 SECTION .data 619 619 ; Patch record for interrupt gate entrypoint 620 GLOBALNAME PATMIntEntryRecord620 GLOBALNAME g_patmIntEntryRecord 621 621 RTCCPTR_DEF PATMIntEntryStart 622 622 DD 0 … … 702 702 SECTION .data 703 703 ; Patch record for interrupt gate entrypoint 704 GLOBALNAME PATMIntEntryRecordErrorCode704 GLOBALNAME g_patmIntEntryRecordErrorCode 705 705 RTCCPTR_DEF PATMIntEntryErrorCodeStart 706 706 DD 0 … … 789 789 SECTION .data 790 790 ; Patch record for 'popfd' 791 GLOBALNAME PATMPopf32Record791 GLOBALNAME g_patmPopf32Record 792 792 RTCCPTR_DEF PATMPopf32Start 793 793 DD PATMPopf32Jump - PATMPopf32Start … … 883 883 SECTION .data 884 884 ; Patch record for 'popfd' 885 GLOBALNAME PATMPopf32Record_NoExit885 GLOBALNAME g_patmPopf32Record_NoExit 886 886 RTCCPTR_DEF PATMPopf32_NoExitStart 887 887 DD 0 … … 967 967 SECTION .data 968 968 ; Patch record for 'popf' 969 GLOBALNAME PATMPopf16Record969 GLOBALNAME g_patmPopf16Record 970 970 RTCCPTR_DEF PATMPopf16Start 971 971 DD PATMPopf16Jump - PATMPopf16Start … … 1030 1030 SECTION .data 1031 1031 ; Patch record for 'popf' 1032 GLOBALNAME PATMPopf16Record_NoExit1032 GLOBALNAME g_patmPopf16Record_NoExit 1033 1033 RTCCPTR_DEF PATMPopf16Start_NoExit 1034 1034 DD 0 … … 1089 1089 SECTION .data 1090 1090 ; Patch record for 'pushfd' 1091 GLOBALNAME PATMPushf32Record1091 GLOBALNAME g_patmPushf32Record 1092 1092 RTCCPTR_DEF PATMPushf32Start 1093 1093 DD 0 … … 1138 1138 SECTION .data 1139 1139 ; Patch record for 'pushf' 1140 GLOBALNAME PATMPushf16Record1140 GLOBALNAME g_patmPushf16Record 1141 1141 RTCCPTR_DEF PATMPushf16Start 1142 1142 DD 0 … … 1180 1180 SECTION .data 1181 1181 ; Patch record for 'push cs' 1182 GLOBALNAME PATMPushCSRecord1182 GLOBALNAME g_patmPushCSRecord 1183 1183 RTCCPTR_DEF PATMPushCSStart 1184 1184 DD PATMPushCSJump - PATMPushCSStart … … 1394 1394 SECTION .data 1395 1395 ; Patch record for 'iretd' 1396 GLOBALNAME PATMIretRecord1396 GLOBALNAME g_patmIretRecord 1397 1397 RTCCPTR_DEF PATMIretStart 1398 1398 DD 0 … … 1692 1692 SECTION .data 1693 1693 ; Patch record for 'iretd' 1694 GLOBALNAME PATMIretRing1Record1694 GLOBALNAME g_patmIretRing1Record 1695 1695 RTCCPTR_DEF PATMIretRing1Start 1696 1696 DD 0 … … 1843 1843 1844 1844 SECTION .data 1845 GLOBALNAME PATMIretFunctionRecord1845 GLOBALNAME g_patmIretFunctionRecord 1846 1846 RTCCPTR_DEF PATMIretFunction_Start 1847 1847 DD 0 … … 1912 1912 SECTION .data 1913 1913 ; Patch record for 'cpuid' 1914 GLOBALNAME PATMCpuidRecord1914 GLOBALNAME g_patmCpuidRecord 1915 1915 istruc PATCHASMRECORD 1916 1916 at PATCHASMRECORD.pbFunction, RTCCPTR_DEF PATMCpuidStart … … 1957 1957 SECTION .data 1958 1958 ; Patch record for 'JEcx' 1959 GLOBALNAME PATMJEcxRecord1959 GLOBALNAME g_patmJEcxRecord 1960 1960 RTCCPTR_DEF PATMJEcxStart 1961 1961 DD 0 … … 1997 1997 SECTION .data 1998 1998 ; Patch record for 'Loop' 1999 GLOBALNAME PATMLoopRecord1999 GLOBALNAME g_patmLoopRecord 2000 2000 RTCCPTR_DEF PATMLoopStart 2001 2001 DD 0 … … 2039 2039 SECTION .data 2040 2040 ; Patch record for 'Loopz' 2041 GLOBALNAME PATMLoopZRecord2041 GLOBALNAME g_patmLoopZRecord 2042 2042 RTCCPTR_DEF PATMLoopZStart 2043 2043 DD 0 … … 2082 2082 SECTION .data 2083 2083 ; Patch record for 'LoopNZ' 2084 GLOBALNAME PATMLoopNZRecord2084 GLOBALNAME g_patmLoopNZRecord 2085 2085 RTCCPTR_DEF PATMLoopNZStart 2086 2086 DD 0 … … 2217 2217 SECTION .data 2218 2218 ; Patch record for indirect calls and jumps 2219 GLOBALNAME PATMLookupAndCallRecord2219 GLOBALNAME g_patmLookupAndCallRecord 2220 2220 RTCCPTR_DEF PATMLookupAndCallStart 2221 2221 DD 0 … … 2336 2336 SECTION .data 2337 2337 ; Patch record for indirect calls and jumps 2338 GLOBALNAME PATMLookupAndJumpRecord2338 GLOBALNAME g_patmLookupAndJumpRecord 2339 2339 RTCCPTR_DEF PATMLookupAndJumpStart 2340 2340 DD 0 … … 2397 2397 SECTION .data 2398 2398 ; Patch record for direct calls 2399 GLOBALNAME PATMCallRecord2399 GLOBALNAME g_patmCallRecord 2400 2400 RTCCPTR_DEF PATMCallStart 2401 2401 DD 0 … … 2455 2455 SECTION .data 2456 2456 ; Patch record for indirect calls 2457 GLOBALNAME PATMCallIndirectRecord2457 GLOBALNAME g_patmCallIndirectRecord 2458 2458 RTCCPTR_DEF PATMCallIndirectStart 2459 2459 DD 0 … … 2518 2518 SECTION .data 2519 2519 ; Patch record for indirect jumps 2520 GLOBALNAME PATMJumpIndirectRecord2520 GLOBALNAME g_patmJumpIndirectRecord 2521 2521 RTCCPTR_DEF PATMJumpIndirectStart 2522 2522 DD 0 … … 2584 2584 2585 2585 SECTION .data 2586 GLOBALNAME PATMRetRecord2586 GLOBALNAME g_patmRetRecord 2587 2587 RTCCPTR_DEF PATMRet_Start 2588 2588 DD 0 … … 2751 2751 2752 2752 SECTION .data 2753 GLOBALNAME PATMRetFunctionRecord2753 GLOBALNAME g_patmRetFunctionRecord 2754 2754 RTCCPTR_DEF PATMRetFunction_Start 2755 2755 DD 0 … … 2829 2829 SECTION .data 2830 2830 ; Patch record for call instructions 2831 GLOBALNAME PATMCheckIFRecord2831 GLOBALNAME g_patmCheckIFRecord 2832 2832 RTCCPTR_DEF PATMCheckIF_Start 2833 2833 DD PATMCheckIF_Jump - PATMCheckIF_Start … … 2922 2922 2923 2923 SECTION .data 2924 GLOBALNAME PATMMovFromSSRecord2924 GLOBALNAME g_patmMovFromSSRecord 2925 2925 RTCCPTR_DEF PATMMovFromSS_Start 2926 2926 DD 0 … … 2936 2936 SECTION .rodata 2937 2937 ; For assertion during init (to make absolutely sure the flags are in sync in vm.mac & vm.h) 2938 GLOBALNAME PATMInterruptFlag2938 GLOBALNAME g_fPatmInterruptFlag 2939 2939 DD VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC | VMCPU_FF_TIMER | VMCPU_FF_REQUEST 2940 2940 -
trunk/src/VBox/VMM/VMMR3/PATMPatch.cpp
r54686 r54687 434 434 435 435 if (EMIsRawRing1Enabled(pVM)) 436 size = patmPatchGenCode(pVM, pPatch, pPB, & PATMIretRing1Record, 0, false, &callInfo);436 size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmIretRing1Record, 0, false, &callInfo); 437 437 else 438 size = patmPatchGenCode(pVM, pPatch, pPB, & PATMIretRecord, 0, false, &callInfo);438 size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmIretRecord, 0, false, &callInfo); 439 439 440 440 PATCHGEN_EPILOG(pPatch, size); … … 447 447 PATCHGEN_PROLOG(pVM, pPatch); 448 448 449 size = patmPatchGenCode(pVM, pPatch, pPB, & PATMCliRecord, 0, false);449 size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmCliRecord, 0, false); 450 450 451 451 PATCHGEN_EPILOG(pPatch, size); … … 464 464 PATCHGEN_PROLOG(pVM, pPatch); 465 465 callInfo.pNextInstrGC = pNextInstrGC; 466 size = patmPatchGenCode(pVM, pPatch, pPB, & PATMStiRecord, 0, false, &callInfo);466 size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmStiRecord, 0, false, &callInfo); 467 467 PATCHGEN_EPILOG(pPatch, size); 468 468 … … 486 486 { 487 487 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); 489 489 } 490 490 else 491 491 { 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); 493 493 } 494 494 … … 506 506 { 507 507 Log(("operand size override!!\n")); 508 size = patmPatchGenCode(pVM, pPatch, pPB, & PATMPushf16Record, 0, false);508 size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmPushf16Record, 0, false); 509 509 } 510 510 else 511 511 { 512 size = patmPatchGenCode(pVM, pPatch, pPB, & PATMPushf32Record, 0, false);512 size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmPushf32Record, 0, false); 513 513 } 514 514 … … 521 521 uint32_t size; 522 522 PATCHGEN_PROLOG(pVM, pPatch); 523 size = patmPatchGenCode(pVM, pPatch, pPB, & PATMPushCSRecord, 0, false);523 size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmPushCSRecord, 0, false); 524 524 PATCHGEN_EPILOG(pPatch, size); 525 525 return VINF_SUCCESS; … … 536 536 { 537 537 case OP_LOOP: 538 pPatchAsmRec = & PATMLoopRecord;538 pPatchAsmRec = &g_patmLoopRecord; 539 539 break; 540 540 case OP_LOOPNE: 541 pPatchAsmRec = & PATMLoopNZRecord;541 pPatchAsmRec = &g_patmLoopNZRecord; 542 542 break; 543 543 case OP_LOOPE: 544 pPatchAsmRec = & PATMLoopZRecord;544 pPatchAsmRec = &g_patmLoopZRecord; 545 545 break; 546 546 case OP_JECXZ: 547 pPatchAsmRec = & PATMJEcxRecord;547 pPatchAsmRec = &g_patmJEcxRecord; 548 548 break; 549 549 default: … … 748 748 callInfo.pReturnGC = pCurInstrGC + pCpu->cbInstr; 749 749 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); 751 751 PATCHGEN_EPILOG(pPatch, size); 752 752 … … 825 825 callInfo.pReturnGC = pCurInstrGC + pCpu->cbInstr; 826 826 callInfo.pTargetGC = 0xDEADBEEF; 827 size = patmPatchGenCode(pVM, pPatch, pPB, & PATMJumpIndirectRecord, 0, false, &callInfo);827 size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmJumpIndirectRecord, 0, false, &callInfo); 828 828 PATCHGEN_EPILOG(pPatch, size); 829 829 … … 878 878 879 879 PATCHGEN_PROLOG_NODEF(pVM, pPatch); 880 size = patmPatchGenCode(pVM, pPatch, pPB, & PATMRetRecord, 0, false);880 size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmRetRecord, 0, false); 881 881 PATCHGEN_EPILOG(pPatch, size); 882 882 … … 907 907 pVM->patm.s.pfnHelperCallGC = PATCHCODE_PTR_GC(pPatch) + pPatch->uCurPatchOffset; 908 908 PATCHGEN_PROLOG(pVM, pPatch); 909 size = patmPatchGenCode(pVM, pPatch, pPB, & PATMLookupAndCallRecord, 0, false);909 size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmLookupAndCallRecord, 0, false); 910 910 PATCHGEN_EPILOG(pPatch, size); 911 911 … … 915 915 pVM->patm.s.pfnHelperRetGC = PATCHCODE_PTR_GC(pPatch) + pPatch->uCurPatchOffset; 916 916 PATCHGEN_PROLOG_NODEF(pVM, pPatch); 917 size = patmPatchGenCode(pVM, pPatch, pPB, & PATMRetFunctionRecord, 0, false);917 size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmRetFunctionRecord, 0, false); 918 918 PATCHGEN_EPILOG(pPatch, size); 919 919 … … 923 923 pVM->patm.s.pfnHelperJumpGC = PATCHCODE_PTR_GC(pPatch) + pPatch->uCurPatchOffset; 924 924 PATCHGEN_PROLOG_NODEF(pVM, pPatch); 925 size = patmPatchGenCode(pVM, pPatch, pPB, & PATMLookupAndJumpRecord, 0, false);925 size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmLookupAndJumpRecord, 0, false); 926 926 PATCHGEN_EPILOG(pPatch, size); 927 927 … … 931 931 pVM->patm.s.pfnHelperIretGC = PATCHCODE_PTR_GC(pPatch) + pPatch->uCurPatchOffset; 932 932 PATCHGEN_PROLOG_NODEF(pVM, pPatch); 933 size = patmPatchGenCode(pVM, pPatch, pPB, & PATMIretFunctionRecord, 0, false);933 size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmIretFunctionRecord, 0, false); 934 934 PATCHGEN_EPILOG(pPatch, size); 935 935 … … 979 979 980 980 /* 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); 982 982 983 983 PATCHGEN_EPILOG(pPatch, size); … … 1001 1001 patmR3AddP2GLookupRecord(pVM, pPatch, pPB, pInstrGC, PATM_LOOKUP_PATCH2GUEST); 1002 1002 1003 int size = patmPatchGenCode(pVM, pPatch, pPB, & PATMSetPIFRecord, 0, false);1003 int size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmSetPIFRecord, 0, false); 1004 1004 PATCHGEN_EPILOG(pPatch, size); 1005 1005 return VINF_SUCCESS; … … 1022 1022 patmR3AddP2GLookupRecord(pVM, pPatch, pPB, pInstrGC, PATM_LOOKUP_PATCH2GUEST); 1023 1023 1024 int size = patmPatchGenCode(pVM, pPatch, pPB, & PATMClearPIFRecord, 0, false);1024 int size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmClearPIFRecord, 0, false); 1025 1025 PATCHGEN_EPILOG(pPatch, size); 1026 1026 return VINF_SUCCESS; … … 1051 1051 1052 1052 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); 1054 1054 else 1055 size = patmPatchGenCode(pVM, pPatch, pPB, & PATMClearInhibitIRQFaultIF0Record, 0, false, &callInfo);1055 size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmClearInhibitIRQFaultIF0Record, 0, false, &callInfo); 1056 1056 1057 1057 PATCHGEN_EPILOG(pPatch, size); … … 1085 1085 /* Generate entrypoint for the interrupt handler (correcting CS in the interrupt stack frame) */ 1086 1086 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, 1088 1088 0, false); 1089 1089 … … 1119 1119 /* Generate entrypoint for the trap handler (correcting CS in the interrupt stack frame) */ 1120 1120 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, 1122 1122 pTrapHandlerGC, true); 1123 1123 PATCHGEN_EPILOG(pPatch, size); … … 1137 1137 1138 1138 /* 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); 1140 1140 PATCHGEN_EPILOG(pPatch, size); 1141 1141 … … 1275 1275 1276 1276 PATCHGEN_PROLOG(pVM, pPatch); 1277 size = patmPatchGenCode(pVM, pPatch, pPB, & PATMClearPIFRecord, 0, false);1277 size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmClearPIFRecord, 0, false); 1278 1278 PATCHGEN_EPILOG(pPatch, size); 1279 1279 … … 1288 1288 /* checks and corrects RPL of pushed ss*/ 1289 1289 PATCHGEN_PROLOG_NODEF(pVM, pPatch); 1290 size = patmPatchGenCode(pVM, pPatch, pPB, & PATMMovFromSSRecord, 0, false);1290 size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmMovFromSSRecord, 0, false); 1291 1291 PATCHGEN_EPILOG(pPatch, size); 1292 1292 … … 1301 1301 1302 1302 PATCHGEN_PROLOG_NODEF(pVM, pPatch); 1303 size = patmPatchGenCode(pVM, pPatch, pPB, & PATMSetPIFRecord, 0, false);1303 size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmSetPIFRecord, 0, false); 1304 1304 PATCHGEN_EPILOG(pPatch, size); 1305 1305 … … 1517 1517 PATCHGEN_PROLOG(pVM, pPatch); 1518 1518 1519 size = patmPatchGenCode(pVM, pPatch, pPB, & PATMCpuidRecord, 0, false);1519 size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmCpuidRecord, 0, false); 1520 1520 1521 1521 PATCHGEN_EPILOG(pPatch, size); -
trunk/src/VBox/VMM/VMMR3/PATMR3Dbg.cpp
r54686 r54687 241 241 * Global functions and a start marker. 242 242 */ 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"); 247 247 248 248 ADD_FUNC(hDbgMod, pVM->patm.s.pPatchMemGC, pVM->patm.s.pPatchMemGC, 0, "PatchMemStart"); -
trunk/src/VBox/VMM/include/PATMA.h
r54686 r54687 170 170 /** @name Patch Descriptor Records (in PATMA.asm) 171 171 * @{ */ 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;172 extern PATCHASMRECORD g_patmCliRecord; 173 extern PATCHASMRECORD g_patmStiRecord; 174 extern PATCHASMRECORD g_patmPopf32Record; 175 extern PATCHASMRECORD g_patmPopf16Record; 176 extern PATCHASMRECORD g_patmPopf16Record_NoExit; 177 extern PATCHASMRECORD g_patmPopf32Record_NoExit; 178 extern PATCHASMRECORD g_patmPushf32Record; 179 extern PATCHASMRECORD g_patmPushf16Record; 180 extern PATCHASMRECORD g_patmIretRecord; 181 extern PATCHASMRECORD g_patmIretRing1Record; 182 extern PATCHASMRECORD g_patmCpuidRecord; 183 extern PATCHASMRECORD g_patmLoopRecord; 184 extern PATCHASMRECORD g_patmLoopZRecord; 185 extern PATCHASMRECORD g_patmLoopNZRecord; 186 extern PATCHASMRECORD g_patmJEcxRecord; 187 extern PATCHASMRECORD g_patmIntEntryRecord; 188 extern PATCHASMRECORD g_patmIntEntryRecordErrorCode; 189 extern PATCHASMRECORD g_patmTrapEntryRecord; 190 extern PATCHASMRECORD g_patmTrapEntryRecordErrorCode; 191 extern PATCHASMRECORD g_patmPushCSRecord; 192 193 extern PATCHASMRECORD g_patmCheckIFRecord; 194 194 extern PATCHASMRECORD PATMJumpToGuest_IF1Record; 195 195 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;196 extern PATCHASMRECORD g_patmCallRecord; 197 extern PATCHASMRECORD g_patmCallIndirectRecord; 198 extern PATCHASMRECORD g_patmRetRecord; 199 extern PATCHASMRECORD g_patmJumpIndirectRecord; 200 201 extern PATCHASMRECORD g_patmLookupAndCallRecord; 202 extern PATCHASMRECORD g_patmRetFunctionRecord; 203 extern PATCHASMRECORD g_patmLookupAndJumpRecord; 204 extern PATCHASMRECORD g_patmIretFunctionRecord; 205 206 extern PATCHASMRECORD g_patmStatsRecord; 207 208 extern PATCHASMRECORD g_patmSetPIFRecord; 209 extern PATCHASMRECORD g_patmClearPIFRecord; 210 211 extern PATCHASMRECORD g_patmSetInhibitIRQRecord; 212 extern PATCHASMRECORD g_patmClearInhibitIRQFaultIF0Record; 213 extern PATCHASMRECORD g_patmClearInhibitIRQContIF0Record; 214 215 extern PATCHASMRECORD g_patmMovFromSSRecord; 216 /** @} */ 217 218 extern const uint32_t g_fPatmInterruptFlag; 219 219 220 220 RT_C_DECLS_END
Note:
See TracChangeset
for help on using the changeset viewer.