Lines Matching defs:pRec
145 static int patmCorrectFixup(PVM pVM, unsigned ulSSMVersion, PATM &patmInfo, PPATCHINFO pPatch, PRELOCREC pRec,
1052 PRELOCREC pRec = 0;
1062 pRec = (PRELOCREC)RTAvlPVGetBestFit(&pVM->patm.s.pGlobalPatchRec->patch.FixupTree, key, true);
1063 if (pRec == 0)
1066 key = (AVLPVKEY)(pRec->pRelocPos + 1); /* search for the next record during the next round. */
1069 offset = (int32_t)(pRec->pRelocPos - pVM->patm.s.pPatchMemHC);
1070 pFixup = (RTRCPTR *)pRec->pRelocPos;
1073 rc = patmCorrectFixup(pVM, uVersion, patmInfo, &pVM->patm.s.pGlobalPatchRec->patch, pRec, offset, pFixup);
1098 * @param pRec Relocation record
1102 static int patmCorrectFixup(PVM pVM, unsigned uVersion, PATM &patmInfo, PPATCHINFO pPatch, PRELOCREC pRec,
1107 switch (pRec->uType)
1112 Assert( pRec->uType != PATM_SAVED_STATE_VERSION_NO_RAW_MEM
1113 || (pRec->pSource == pRec->pDest && PATM_IS_ASMFIX(pRec->pSource)) );
1116 if ( pRec->pSource
1117 && !PATMIsPatchGCAddr(pVM, (RTRCUINTPTR)pRec->pSource)
1118 && pRec->uType != FIXUP_ABSOLUTE_IN_PATCH_ASM_TMPL)
1268 pRec->pSource = pRec->pDest = PATM_ASMFIX_VM_FORCEDACTIONS;
1269 pRec->uType = FIXUP_ABSOLUTE_IN_PATCH_ASM_TMPL;
1281 pRec->pSource = pRec->pDest = PATM_ASMFIX_CPUID_DEF_PTR;
1282 pRec->uType = FIXUP_ABSOLUTE_IN_PATCH_ASM_TMPL;
1286 pRec->pSource = pRec->pDest = PATM_ASMFIX_CPUID_STD_PTR;
1287 pRec->uType = FIXUP_ABSOLUTE_IN_PATCH_ASM_TMPL;
1291 pRec->pSource = pRec->pDest = PATM_ASMFIX_CPUID_EXT_PTR;
1292 pRec->uType = FIXUP_ABSOLUTE_IN_PATCH_ASM_TMPL;
1296 pRec->pSource = pRec->pDest = PATM_ASMFIX_CPUID_CENTAUR_PTR;
1297 pRec->uType = FIXUP_ABSOLUTE_IN_PATCH_ASM_TMPL;
1311 switch ((uintptr_t)pRec->Core.Key)
1315 pRec->pSource = pRec->pDest = PATM_ASMFIX_VM_FORCEDACTIONS;
1316 pRec->uType = FIXUP_ABSOLUTE_IN_PATCH_ASM_TMPL;
1321 pRec->pSource = pRec->pDest = PATM_ASMFIX_CPUID_DEF_PTR;
1322 pRec->uType = FIXUP_ABSOLUTE_IN_PATCH_ASM_TMPL;
1327 pRec->pSource = pRec->pDest = PATM_ASMFIX_CPUID_STD_PTR;
1328 pRec->uType = FIXUP_ABSOLUTE_IN_PATCH_ASM_TMPL;
1333 pRec->pSource = pRec->pDest = PATM_ASMFIX_CPUID_EXT_PTR;
1334 pRec->uType = FIXUP_ABSOLUTE_IN_PATCH_ASM_TMPL;
1339 pRec->pSource = pRec->pDest = PATM_ASMFIX_CPUID_CENTAUR_PTR;
1340 pRec->uType = FIXUP_ABSOLUTE_IN_PATCH_ASM_TMPL;
1344 AssertMsgFailed(("Unexpected fixup value %p\n", (uintptr_t)pRec->Core.Key));
1353 && pRec->uType == FIXUP_ABSOLUTE_IN_PATCH_ASM_TMPL)
1355 Assert(pRec->pSource == pRec->pDest); Assert(PATM_IS_ASMFIX(pRec->pSource));
1356 switch (pRec->pSource)
1383 else if (pRec->uType == FIXUP_CONSTANT_IN_PATCH_ASM_TMPL)
1386 Assert(pRec->pSource == pRec->pDest); Assert(PATM_IS_ASMFIX(pRec->pSource));
1387 switch (pRec->pSource)
1395 AssertLogRelMsgFailed(("Unknown FIXUP_CONSTANT_IN_PATCH_ASM_TMPL fixup: %#x\n", pRec->pSource));
1405 else if (pRec->uType == FIXUP_REL_HELPER_IN_PATCH_ASM_TMPL)
1408 Assert(pRec->pSource == pRec->pDest); Assert(PATM_IS_ASMFIX(pRec->pSource));
1411 switch (pRec->pSource)
1418 AssertLogRelMsgFailed(("Unknown FIXUP_REL_HLP_CALL_IN_PATCH_ASM_TMPL fixup: %#x\n", pRec->pSource));
1433 RTRCPTR pTarget = (RTRCPTR)((RTRCINTPTR)pRec->pDest + delta);
1441 RTRCINTPTR displ = (RTRCINTPTR)pTarget - (RTRCINTPTR)pRec->pSource;
1442 RTRCINTPTR displOld= (RTRCINTPTR)pRec->pDest - (RTRCINTPTR)pRec->pSource;
1444 Log(("Relative fixup (g2p) %08X -> %08X at %08X (source=%08x, target=%08x)\n", *(int32_t*)pRec->pRelocPos, displ, pRec->pRelocPos, pRec->pSource, pRec->pDest));
1446 Assert(pRec->pSource - pPatch->cbPatchJump == pPatch->pPrivInstrGC);
1505 Log(("Skip the guest jump to patch code for this disabled patch %08X\n", pRec->pRelocPos));
1507 pRec->pDest = pTarget;
1513 RTRCPTR pSource = (RTRCPTR)((RTRCINTPTR)pRec->pSource + delta);
1514 RTRCINTPTR displ = (RTRCINTPTR)pRec->pDest - (RTRCINTPTR)pSource;
1517 Log(("Relative fixup (p2g) %08X -> %08X at %08X (source=%08x, target=%08x)\n", *(int32_t*)pRec->pRelocPos, displ, pRec->pRelocPos, pRec->pSource, pRec->pDest));
1518 *(RTRCUINTPTR *)pRec->pRelocPos = displ;
1519 pRec->pSource = pSource;