VirtualBox

Changeset 24764 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 18, 2009 4:30:12 PM (15 years ago)
Author:
vboxsync
Message:

Handle missing page inconsistency with guest smp (instruction emulation)

Location:
trunk/src/VBox/VMM/VMMAll
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/EMAll.cpp

    r24753 r24764  
    173173    int rc = PGMPhysSimpleReadGCPtr(pVCpu, &State.aOpcode, InstrGC, sizeof(State.aOpcode));
    174174    if (RT_SUCCESS(rc))
     175    {
    175176        State.GCPtr = InstrGC;
     177    }
    176178    else
     179    {
     180        if (PAGE_ADDRESS(InstrGC) == PAGE_ADDRESS(InstrGC + sizeof(State.aOpcode) - 1))
     181        {
     182           if (rc == VERR_PAGE_TABLE_NOT_PRESENT)
     183              HWACCMInvalidatePage(pVCpu, InstrGC);
     184
     185           Log(("emDisCoreOne: read failed with %d\n", rc));
     186           return rc;
     187        }
    177188        State.GCPtr = NIL_RTGCPTR;
    178 
     189    }
    179190    return DISCoreOneEx(InstrGC, pDis->mode, EMReadBytes, &State, pDis, pOpsize);
    180191}
     
    246257    rc = PGMPhysSimpleReadGCPtr(pVCpu, &State.aOpcode, GCPtrInstr, sizeof(State.aOpcode));
    247258    if (RT_SUCCESS(rc))
     259    {
    248260        State.GCPtr = GCPtrInstr;
     261    }
    249262    else
     263    {
     264        if (PAGE_ADDRESS(GCPtrInstr) == PAGE_ADDRESS(GCPtrInstr + sizeof(State.aOpcode) - 1))
     265        {
     266           if (rc == VERR_PAGE_TABLE_NOT_PRESENT)
     267              HWACCMInvalidatePage(pVCpu, GCPtrInstr);
     268
     269           Log(("EMInterpretDisasOneEx: read failed with %d\n", rc));
     270           return rc;
     271        }
    250272        State.GCPtr = NIL_RTGCPTR;
     273    }
    251274#endif
    252275
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r24206 r24764  
    460460# ifdef IN_RING0
    461461    /* Note: hack alert for difficult to reproduce problem. */
    462     if (    rc == VERR_PAGE_TABLE_NOT_PRESENT           /* seen with UNI & SMP */
     462    if (    rc == VERR_PAGE_NOT_PRESENT                 /* SMP only ; disassembly might fail. */
     463        ||  rc == VERR_PAGE_TABLE_NOT_PRESENT           /* seen with UNI & SMP */
    463464        ||  rc == VERR_PAGE_DIRECTORY_PTR_NOT_PRESENT   /* seen with SMP */
    464465        ||  rc == VERR_PAGE_MAP_LEVEL4_NOT_PRESENT)     /* precaution */
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r24227 r24764  
    11921192    PDISCPUSTATE pDis = &pVCpu->pgm.s.DisState;
    11931193    int rc = EMInterpretDisasOne(pVM, pVCpu, pRegFrame, pDis, NULL);
    1194     AssertReturnStmt(rc == VINF_SUCCESS, pgmUnlock(pVM), rc);
     1194    if (RT_UNLIKELY(rc != VINF_SUCCESS))
     1195    {       
     1196        AssertMsg(rc == VERR_PAGE_NOT_PRESENT || rc == VERR_PAGE_TABLE_NOT_PRESENT, ("Unexpected rc %d\n", rc));
     1197        pgmUnlock(pVM);
     1198        return rc;
     1199    }
    11951200
    11961201    Assert(pPage->enmKind != PGMPOOLKIND_FREE);
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