VirtualBox

Changeset 31064 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Jul 23, 2010 2:39:32 PM (14 years ago)
Author:
vboxsync
Message:

PATM.cpp: Quick workaround for logging crash in FIXUP_REL_JMPTOPATCH.

File:
1 edited

Legend:

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

    r30575 r31064  
    552552
    553553    if (    !pDisInfo->pInstrHC
    554         ||  (   PAGE_ADDRESS(pDisInfo->pInstrGC) != PAGE_ADDRESS(pSrc + size - 1) 
     554        ||  (   PAGE_ADDRESS(pDisInfo->pInstrGC) != PAGE_ADDRESS(pSrc + size - 1)
    555555             && !PATMIsPatchGCAddr(pDisInfo->pVM, pSrc)))
    556556    {
     
    632632        case FIXUP_ABSOLUTE:
    633633            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
    635635                ||  PATMIsPatchGCAddr(pVM, pRec->pSource))
    636636            {
     
    653653                pRec->pDest = (RTRCPTR)((RTRCUINTPTR)pRec->pDest + delta);
    654654
    655                 if (    rc == VERR_PAGE_NOT_PRESENT 
     655                if (    rc == VERR_PAGE_NOT_PRESENT
    656656                    ||  rc == VERR_PAGE_TABLE_NOT_PRESENT)
    657657                {
     
    695695                RTRCINTPTR displOld= (RTRCINTPTR)pRec->pDest - (RTRCINTPTR)pRec->pSource;
    696696
     697#if 0 /** @todo '*(int32_t*)pRec->pRelocPos' crashes on restore of an XP VM here. pRelocPos=0x8000dbe2180a (bird) */
    697698                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
    698702
    699703                Assert(pRec->pSource - pPatch->patch.cbPatchJump == pPatch->patch.pPrivInstrGC);
     
    729733                Assert(RT_SUCCESS(rc) || rc == VERR_PAGE_NOT_PRESENT || rc == VERR_PAGE_TABLE_NOT_PRESENT);
    730734
    731                 if (    rc == VERR_PAGE_NOT_PRESENT 
     735                if (    rc == VERR_PAGE_NOT_PRESENT
    732736                    ||  rc == VERR_PAGE_TABLE_NOT_PRESENT)
    733737                {
     
    39043908    RT_ZERO(cacheRec);
    39053909    cacheRec.pPatch = pPatch;
    3906    
     3910
    39073911    rc = patmGenJumpToPatch(pVM, pPatch, &cacherec, true);
    39083912    /* Free leftover lock if any. */
     
    39823986    PVMCPU pVCpu = VMMGetCpu0(pVM);
    39833987
    3984     if (    !pVM 
    3985         ||  pInstrGC == 0 
     3988    if (    !pVM
     3989        ||  pInstrGC == 0
    39863990        || (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)))
    39873991    {
     
    41404144    pInstrHC = PATMGCVirtToHCVirt(pVM, &cacheRec, pInstrGC);
    41414145    AssertReturn(pInstrHC, VERR_PATCHING_REFUSED);
    4142    
     4146
    41434147    /* Allocate patch record. */
    41444148    rc = MMHyperAlloc(pVM, sizeof(PATMPATCHREC), 0, MM_TAG_PATM_PATCH, (void **)&pPatchRec);
     
    61786182                /* The guest page *must* be present. */
    61796183                rc = PGMGstGetPage(pVCpu, pCtx->esp, &fFlags, NULL);
    6180                 if (    rc == VINF_SUCCESS 
     6184                if (    rc == VINF_SUCCESS
    61816185                    &&  (fFlags & X86_PTE_P))
    61826186                {
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