VirtualBox

Ignore:
Timestamp:
Apr 16, 2009 11:41:38 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
46003
Message:

Big step to separate VMM data structures for guest SMP. (pgm, em)

File:
1 edited

Legend:

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

    r13835 r18927  
    9999int PATMPatchSysenterXP(PVM pVM, RTGCPTR32 pInstrGC, PPATMPATCHREC pPatchRec)
    100100{
    101     PPATCHINFO pPatch = &pPatchRec->patch;
    102     uint8_t   uTemp[16];
     101    PPATCHINFO  pPatch = &pPatchRec->patch;
     102    uint8_t     uTemp[16];
    103103    RTGCPTR32   lpfnKiFastSystemCall, lpfnKiIntSystemCall = 0; /* (initializing it to shut up warning.) */
    104     int       rc, i;
     104    int         rc, i;
     105    PVMCPU      pVCpu = VMMGetCpu0(pVM);
    105106
    106107    Assert(sizeof(uTemp) > sizeof(uFnKiIntSystemCall));
     
    111112    /* check the epilog of KiFastSystemCall */
    112113    lpfnKiFastSystemCall = pInstrGC - 2;
    113     rc = PGMPhysSimpleReadGCPtr(pVM, uTemp, lpfnKiFastSystemCall, sizeof(uFnKiFastSystemCall));
     114    rc = PGMPhysSimpleReadGCPtr(pVCpu, uTemp, lpfnKiFastSystemCall, sizeof(uFnKiFastSystemCall));
    114115    if (    RT_FAILURE(rc)
    115116        ||  memcmp(uFnKiFastSystemCall, uTemp, sizeof(uFnKiFastSystemCall)))
     
    121122    for (i=0;i<64;i++)
    122123    {
    123         rc = PGMPhysSimpleReadGCPtr(pVM, uTemp, pInstrGC + i, sizeof(uFnKiIntSystemCall));
     124        rc = PGMPhysSimpleReadGCPtr(pVCpu, uTemp, pInstrGC + i, sizeof(uFnKiIntSystemCall));
    124125        if(RT_FAILURE(rc))
    125126        {
     
    146147
    147148    // make a copy of the guest code bytes that will be overwritten
    148     rc = PGMPhysSimpleReadGCPtr(pVM, pPatch->aPrivInstr, pPatch->pPrivInstrGC, SIZEOF_NEARJUMP32);
     149    rc = PGMPhysSimpleReadGCPtr(pVCpu, pPatch->aPrivInstr, pPatch->pPrivInstrGC, SIZEOF_NEARJUMP32);
    149150    AssertRC(rc);
    150151
     
    152153    uTemp[0] = 0xE9;
    153154    *(RTGCPTR32 *)&uTemp[1] = lpfnKiIntSystemCall - (pInstrGC + SIZEOF_NEARJUMP32);
    154     rc = PGMPhysSimpleDirtyWriteGCPtr(pVM, pInstrGC, uTemp, SIZEOF_NEARJUMP32);
     155    rc = PGMPhysSimpleDirtyWriteGCPtr(pVCpu, pInstrGC, uTemp, SIZEOF_NEARJUMP32);
    155156    if (RT_FAILURE(rc))
    156157    {
     
    189190    /* Guest OS specific patch; check heuristics first */
    190191
    191     rc = PGMPhysSimpleReadGCPtr(pVM, uTemp, pInstrGC, RT_MAX(sizeof(uFnOpenBSDHandlerPrefix1), sizeof(uFnOpenBSDHandlerPrefix2)));
     192    rc = PGMPhysSimpleReadGCPtr(VMMGetCpu0(pVM), uTemp, pInstrGC, RT_MAX(sizeof(uFnOpenBSDHandlerPrefix1), sizeof(uFnOpenBSDHandlerPrefix2)));
    192193    if (    RT_FAILURE(rc)
    193194        || (    memcmp(uFnOpenBSDHandlerPrefix1, uTemp, sizeof(uFnOpenBSDHandlerPrefix1))
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette