Changeset 31064 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jul 23, 2010 2:39:32 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PATM/PATM.cpp
r30575 r31064 552 552 553 553 if ( !pDisInfo->pInstrHC 554 || ( PAGE_ADDRESS(pDisInfo->pInstrGC) != PAGE_ADDRESS(pSrc + size - 1) 554 || ( PAGE_ADDRESS(pDisInfo->pInstrGC) != PAGE_ADDRESS(pSrc + size - 1) 555 555 && !PATMIsPatchGCAddr(pDisInfo->pVM, pSrc))) 556 556 { … … 632 632 case FIXUP_ABSOLUTE: 633 633 Log(("Absolute fixup at %RRv %RHv -> %RHv at %RRv\n", pRec->pSource, *(RTRCUINTPTR *)pRec->pRelocPos, *(RTRCINTPTR*)pRec->pRelocPos + delta, pRec->pRelocPos)); 634 if ( !pRec->pSource 634 if ( !pRec->pSource 635 635 || PATMIsPatchGCAddr(pVM, pRec->pSource)) 636 636 { … … 653 653 pRec->pDest = (RTRCPTR)((RTRCUINTPTR)pRec->pDest + delta); 654 654 655 if ( rc == VERR_PAGE_NOT_PRESENT 655 if ( rc == VERR_PAGE_NOT_PRESENT 656 656 || rc == VERR_PAGE_TABLE_NOT_PRESENT) 657 657 { … … 695 695 RTRCINTPTR displOld= (RTRCINTPTR)pRec->pDest - (RTRCINTPTR)pRec->pSource; 696 696 697 #if 0 /** @todo '*(int32_t*)pRec->pRelocPos' crashes on restore of an XP VM here. pRelocPos=0x8000dbe2180a (bird) */ 697 698 Log(("Relative fixup (g2p) %08X -> %08X at %08X (source=%08x, target=%08x)\n", *(int32_t*)pRec->pRelocPos, displ, pRec->pRelocPos, pRec->pSource, pRec->pDest)); 699 #else 700 Log(("Relative fixup (g2p) ???????? -> %08X at %08X (source=%08x, target=%08x)\n", displ, pRec->pRelocPos, pRec->pSource, pRec->pDest)); 701 #endif 698 702 699 703 Assert(pRec->pSource - pPatch->patch.cbPatchJump == pPatch->patch.pPrivInstrGC); … … 729 733 Assert(RT_SUCCESS(rc) || rc == VERR_PAGE_NOT_PRESENT || rc == VERR_PAGE_TABLE_NOT_PRESENT); 730 734 731 if ( rc == VERR_PAGE_NOT_PRESENT 735 if ( rc == VERR_PAGE_NOT_PRESENT 732 736 || rc == VERR_PAGE_TABLE_NOT_PRESENT) 733 737 { … … 3904 3908 RT_ZERO(cacheRec); 3905 3909 cacheRec.pPatch = pPatch; 3906 3910 3907 3911 rc = patmGenJumpToPatch(pVM, pPatch, &cacherec, true); 3908 3912 /* Free leftover lock if any. */ … … 3982 3986 PVMCPU pVCpu = VMMGetCpu0(pVM); 3983 3987 3984 if ( !pVM 3985 || pInstrGC == 0 3988 if ( !pVM 3989 || pInstrGC == 0 3986 3990 || (flags & ~(PATMFL_CODE32|PATMFL_IDTHANDLER|PATMFL_INTHANDLER|PATMFL_SYSENTER|PATMFL_TRAPHANDLER|PATMFL_DUPLICATE_FUNCTION|PATMFL_REPLACE_FUNCTION_CALL|PATMFL_GUEST_SPECIFIC|PATMFL_INT3_REPLACEMENT|PATMFL_TRAPHANDLER_WITH_ERRORCODE|PATMFL_IDTHANDLER_WITHOUT_ENTRYPOINT|PATMFL_MMIO_ACCESS|PATMFL_TRAMPOLINE|PATMFL_INSTR_HINT|PATMFL_JUMP_CONFLICT))) 3987 3991 { … … 4140 4144 pInstrHC = PATMGCVirtToHCVirt(pVM, &cacheRec, pInstrGC); 4141 4145 AssertReturn(pInstrHC, VERR_PATCHING_REFUSED); 4142 4146 4143 4147 /* Allocate patch record. */ 4144 4148 rc = MMHyperAlloc(pVM, sizeof(PATMPATCHREC), 0, MM_TAG_PATM_PATCH, (void **)&pPatchRec); … … 6178 6182 /* The guest page *must* be present. */ 6179 6183 rc = PGMGstGetPage(pVCpu, pCtx->esp, &fFlags, NULL); 6180 if ( rc == VINF_SUCCESS 6184 if ( rc == VINF_SUCCESS 6181 6185 && (fFlags & X86_PTE_P)) 6182 6186 {
Note:
See TracChangeset
for help on using the changeset viewer.