VirtualBox

Changeset 23781 in vbox


Ignore:
Timestamp:
Oct 14, 2009 10:39:11 PM (15 years ago)
Author:
vboxsync
Message:

PATM: Converted to more SSMR3GetMem calls.

File:
1 edited

Legend:

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

    r23779 r23781  
    6868*   Global Variables                                                           *
    6969*******************************************************************************/
     70/**
     71 * SSM descriptor table for the PATM structure.
     72 */
    7073static SSMFIELD const g_aPatmFields[] =
    7174{
     
    161164};
    162165
     166/**
     167 * SSM descriptor table for the PATMGCSTATE structure.
     168 */
     169static SSMFIELD const g_aPatmGCStateFields[] =
     170{
     171    SSMFIELD_ENTRY(                 PATMGCSTATE, uVMFlags),
     172    SSMFIELD_ENTRY(                 PATMGCSTATE, uPendingAction),
     173    SSMFIELD_ENTRY(                 PATMGCSTATE, uPatchCalls),
     174    SSMFIELD_ENTRY(                 PATMGCSTATE, uScratch),
     175    SSMFIELD_ENTRY(                 PATMGCSTATE, uIretEFlags),
     176    SSMFIELD_ENTRY(                 PATMGCSTATE, uIretCS),
     177    SSMFIELD_ENTRY(                 PATMGCSTATE, uIretEIP),
     178    SSMFIELD_ENTRY(                 PATMGCSTATE, Psp),
     179    SSMFIELD_ENTRY(                 PATMGCSTATE, fPIF),
     180    SSMFIELD_ENTRY_RCPTR(           PATMGCSTATE, GCPtrInhibitInterrupts),
     181    SSMFIELD_ENTRY_RCPTR(           PATMGCSTATE, GCCallPatchTargetAddr),
     182    SSMFIELD_ENTRY_RCPTR(           PATMGCSTATE, GCCallReturnAddr),
     183    SSMFIELD_ENTRY(                 PATMGCSTATE, Restore.uEAX),
     184    SSMFIELD_ENTRY(                 PATMGCSTATE, Restore.uECX),
     185    SSMFIELD_ENTRY(                 PATMGCSTATE, Restore.uEDI),
     186    SSMFIELD_ENTRY(                 PATMGCSTATE, Restore.eFlags),
     187    SSMFIELD_ENTRY(                 PATMGCSTATE, Restore.uFlags),
     188    SSMFIELD_ENTRY_TERM()
     189};
     190
     191/**
     192 * SSM descriptor table for the PATMPATCHREC structure.
     193 */
     194static SSMFIELD const g_aPatmPatchRecFields[] =
     195{
     196    SSMFIELD_ENTRY(                 PATMPATCHREC, Core.Key),
     197    SSMFIELD_ENTRY_IGNORE(          PATMPATCHREC, Core.pLeft),
     198    SSMFIELD_ENTRY_IGNORE(          PATMPATCHREC, Core.pRight),
     199    SSMFIELD_ENTRY_IGNORE(          PATMPATCHREC, Core.uchHeight),
     200    SSMFIELD_ENTRY_PAD_HC_AUTO(     3, 3),
     201    SSMFIELD_ENTRY(                 PATMPATCHREC, CoreOffset.Key),
     202    SSMFIELD_ENTRY_IGNORE(          PATMPATCHREC, CoreOffset.pLeft),
     203    SSMFIELD_ENTRY_IGNORE(          PATMPATCHREC, CoreOffset.pRight),
     204    SSMFIELD_ENTRY_IGNORE(          PATMPATCHREC, CoreOffset.uchHeight),
     205    SSMFIELD_ENTRY_PAD_HC_AUTO(     3, 3),
     206    SSMFIELD_ENTRY(                 PATMPATCHREC, patch.uState),
     207    SSMFIELD_ENTRY(                 PATMPATCHREC, patch.uOldState),
     208    SSMFIELD_ENTRY(                 PATMPATCHREC, patch.uOpMode),
     209    SSMFIELD_ENTRY_RCPTR(           PATMPATCHREC, patch.pPrivInstrGC),
     210    SSMFIELD_ENTRY_IGN_HCPTR(       PATMPATCHREC, patch.pPrivInstrHC),
     211    SSMFIELD_ENTRY(                 PATMPATCHREC, patch.aPrivInstr),
     212    SSMFIELD_ENTRY(                 PATMPATCHREC, patch.cbPrivInstr),
     213    SSMFIELD_ENTRY(                 PATMPATCHREC, patch.opcode),
     214    SSMFIELD_ENTRY(                 PATMPATCHREC, patch.cbPatchJump),
     215    SSMFIELD_ENTRY_RCPTR(           PATMPATCHREC, patch.pPatchJumpDestGC),
     216    SSMFIELD_ENTRY(                 PATMPATCHREC, patch.pPatchBlockOffset),
     217    SSMFIELD_ENTRY(                 PATMPATCHREC, patch.cbPatchBlockSize),
     218    SSMFIELD_ENTRY(                 PATMPATCHREC, patch.uCurPatchOffset),
     219    SSMFIELD_ENTRY_PAD_HC64(        PATMPATCHREC, patch.Alignment0, sizeof(uint32_t)),
     220    SSMFIELD_ENTRY(                 PATMPATCHREC, patch.flags),
     221    SSMFIELD_ENTRY_RCPTR(           PATMPATCHREC, patch.pInstrGCLowest),
     222    SSMFIELD_ENTRY_RCPTR(           PATMPATCHREC, patch.pInstrGCHighest),
     223    SSMFIELD_ENTRY_IGN_HCPTR(       PATMPATCHREC, patch.FixupTree),
     224    SSMFIELD_ENTRY(                 PATMPATCHREC, patch.nrFixups),
     225    SSMFIELD_ENTRY(                 PATMPATCHREC, patch.nrJumpRecs), // should be zero?
     226    SSMFIELD_ENTRY_IGN_HCPTR(       PATMPATCHREC, patch.JumpTree),
     227    SSMFIELD_ENTRY_IGN_HCPTR(       PATMPATCHREC, patch.Patch2GuestAddrTree),
     228    SSMFIELD_ENTRY_IGN_HCPTR(       PATMPATCHREC, patch.Guest2PatchAddrTree),
     229    SSMFIELD_ENTRY(                 PATMPATCHREC, patch.nrPatch2GuestRecs),
     230    SSMFIELD_ENTRY_PAD_HC64(        PATMPATCHREC, patch.Alignment1, sizeof(uint32_t)),
     231    SSMFIELD_ENTRY_IGN_HCPTR(       PATMPATCHREC, patch.cacheRec.pPatchLocStartHC), // saved as zero
     232    SSMFIELD_ENTRY_IGN_HCPTR(       PATMPATCHREC, patch.cacheRec.pPatchLocEndHC),   // ditto
     233    SSMFIELD_ENTRY_IGN_RCPTR(       PATMPATCHREC, patch.cacheRec.pGuestLoc),        // ditto
     234    SSMFIELD_ENTRY_IGNORE(          PATMPATCHREC, patch.cacheRec.opsize),           // ditto
     235    SSMFIELD_ENTRY_IGN_HCPTR(       PATMPATCHREC, patch.pTempInfo),
     236    SSMFIELD_ENTRY(                 PATMPATCHREC, patch.cCodeWrites),
     237    SSMFIELD_ENTRY(                 PATMPATCHREC, patch.cTraps),
     238    SSMFIELD_ENTRY(                 PATMPATCHREC, patch.cInvalidWrites),
     239    SSMFIELD_ENTRY(                 PATMPATCHREC, patch.uPatchIdx),
     240    SSMFIELD_ENTRY(                 PATMPATCHREC, patch.bDirtyOpcode),
     241    SSMFIELD_ENTRY_IGNORE(          PATMPATCHREC, patch.Alignment2),
     242    SSMFIELD_ENTRY_TERM()
     243};
     244
    163245
    164246#ifdef VBOX_STRICT
     
    591673    {
    592674#endif
    593 #if 1  /** @todo LiveMigration / later? */
     675#if 0
    594676        rc = SSMR3GetMem(pSSM, pVM->patm.s.pGCStateHC, sizeof(PATMGCSTATE));
    595677#else
     
    684766        PATMPATCHREC patch, *pPatchRec;
    685767
    686 #if 1  /** @todo LiveMigration */
     768#if 0  /** @todo LiveMigration */
    687769        rc = SSMR3GetMem(pSSM, &patch, sizeof(patch));
    688770#else
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