VirtualBox

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


Ignore:
Timestamp:
Jul 16, 2009 3:49:53 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
50191
Message:

Updates

File:
1 edited

Legend:

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

    r21653 r21656  
    15431543                rc = PGMPhysSimpleWriteGCPtr(pVCpu, pCtx->rip, aVMMCall, sizeof(aVMMCall));
    15441544                AssertRC(rc);
     1545
     1546                memcpy(pPatch->aNewOpcode, aVMMCall, sizeof(aVMMCall));
     1547                pPatch->cbNewOp = sizeof(aVMMCall);
    15451548            }
    15461549            else
     
    15671570                    &&  pDis->param2.flags == USE_IMMEDIATE8
    15681571                    &&  pDis->param2.parval == 4
    1569                     &&  oldcbOp + cbOp < sizeof(pVM->hwaccm.s.svm.aPatches[idx]))
     1572                    &&  oldcbOp + cbOp < sizeof(pVM->hwaccm.s.svm.aPatches[idx].aOpcode))
    15701573                {
    15711574                    uint8_t szInstr[15];
     
    15821585                    szInstr[2] = 0x20;
    15831586                    szInstr[3] = 0xC0 | pDis->param1.base.reg_gen;
    1584                     for (unsigned i = 4; i < 5+cbOp; i++)
     1587                    for (unsigned i = 4; i < pPatch->cbOp; i++)
    15851588                        szInstr[i] = 0x90;  /* nop */
    15861589
    1587                     rc = PGMPhysSimpleWriteGCPtr(pVCpu, pCtx->rip, szInstr, 5+cbOp);
     1590                    rc = PGMPhysSimpleWriteGCPtr(pVCpu, pCtx->rip, szInstr, pPatch->cbOp);
    15881591                    AssertRC(rc);
     1592
     1593                    memcpy(pPatch->aNewOpcode, szInstr, pPatch->cbOp);
     1594                    pPatch->cbNewOp = pPatch->cbOp;
    15891595
    15901596                    Log(("Acceptable read/shr candidate!\n"));
     
    15981604                    rc = PGMPhysSimpleWriteGCPtr(pVCpu, pCtx->rip, aVMMCall, sizeof(aVMMCall));
    15991605                    AssertRC(rc);
     1606
     1607                    memcpy(pPatch->aNewOpcode, aVMMCall, sizeof(aVMMCall));
     1608                    pPatch->cbNewOp = sizeof(aVMMCall);
    16001609                }
    16011610            }
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