VirtualBox

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


Ignore:
Timestamp:
Oct 14, 2019 10:18:54 AM (5 years ago)
Author:
vboxsync
Message:

VMM/HM: hmR3Save better rc handling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/HM.cpp

    r81240 r81247  
    29832983static DECLCALLBACK(int) hmR3Save(PVM pVM, PSSMHANDLE pSSM)
    29842984{
    2985     int rc;
    2986 
    29872985    Log(("hmR3Save:\n"));
    29882986
     
    29942992        {
    29952993            PCSVMNESTEDVMCBCACHE pVmcbNstGstCache = &pVCpu->hm.s.svm.NstGstVmcbCache;
    2996             rc  = SSMR3PutBool(pSSM, pVmcbNstGstCache->fCacheValid);
    2997             rc |= SSMR3PutU16(pSSM,  pVmcbNstGstCache->u16InterceptRdCRx);
    2998             rc |= SSMR3PutU16(pSSM,  pVmcbNstGstCache->u16InterceptWrCRx);
    2999             rc |= SSMR3PutU16(pSSM,  pVmcbNstGstCache->u16InterceptRdDRx);
    3000             rc |= SSMR3PutU16(pSSM,  pVmcbNstGstCache->u16InterceptWrDRx);
    3001             rc |= SSMR3PutU16(pSSM,  pVmcbNstGstCache->u16PauseFilterThreshold);
    3002             rc |= SSMR3PutU16(pSSM,  pVmcbNstGstCache->u16PauseFilterCount);
    3003             rc |= SSMR3PutU32(pSSM,  pVmcbNstGstCache->u32InterceptXcpt);
    3004             rc |= SSMR3PutU64(pSSM,  pVmcbNstGstCache->u64InterceptCtrl);
    3005             rc |= SSMR3PutU64(pSSM,  pVmcbNstGstCache->u64TSCOffset);
    3006             rc |= SSMR3PutBool(pSSM, pVmcbNstGstCache->fVIntrMasking);
    3007             rc |= SSMR3PutBool(pSSM, pVmcbNstGstCache->fNestedPaging);
    3008             rc |= SSMR3PutBool(pSSM, pVmcbNstGstCache->fLbrVirt);
    3009             AssertRCReturn(rc, rc);
     2994            SSMR3PutBool(pSSM, pVmcbNstGstCache->fCacheValid);
     2995            SSMR3PutU16(pSSM,  pVmcbNstGstCache->u16InterceptRdCRx);
     2996            SSMR3PutU16(pSSM,  pVmcbNstGstCache->u16InterceptWrCRx);
     2997            SSMR3PutU16(pSSM,  pVmcbNstGstCache->u16InterceptRdDRx);
     2998            SSMR3PutU16(pSSM,  pVmcbNstGstCache->u16InterceptWrDRx);
     2999            SSMR3PutU16(pSSM,  pVmcbNstGstCache->u16PauseFilterThreshold);
     3000            SSMR3PutU16(pSSM,  pVmcbNstGstCache->u16PauseFilterCount);
     3001            SSMR3PutU32(pSSM,  pVmcbNstGstCache->u32InterceptXcpt);
     3002            SSMR3PutU64(pSSM,  pVmcbNstGstCache->u64InterceptCtrl);
     3003            SSMR3PutU64(pSSM,  pVmcbNstGstCache->u64TSCOffset);
     3004            SSMR3PutBool(pSSM, pVmcbNstGstCache->fVIntrMasking);
     3005            SSMR3PutBool(pSSM, pVmcbNstGstCache->fNestedPaging);
     3006            SSMR3PutBool(pSSM, pVmcbNstGstCache->fLbrVirt);
    30103007        }
    30113008    }
    30123009
    30133010    /* Save the guest patch data. */
    3014     rc  = SSMR3PutGCPtr(pSSM, pVM->hm.s.pGuestPatchMem);
    3015     rc |= SSMR3PutGCPtr(pSSM, pVM->hm.s.pFreeGuestPatchMem);
    3016     rc |= SSMR3PutU32(pSSM, pVM->hm.s.cbGuestPatchMem);
     3011    SSMR3PutGCPtr(pSSM, pVM->hm.s.pGuestPatchMem);
     3012    SSMR3PutGCPtr(pSSM, pVM->hm.s.pFreeGuestPatchMem);
     3013    SSMR3PutU32(pSSM, pVM->hm.s.cbGuestPatchMem);
    30173014
    30183015    /* Store all the guest patch records too. */
    3019     rc |= SSMR3PutU32(pSSM, pVM->hm.s.cPatches);
    3020     AssertRCReturn(rc, rc);
     3016    int rc = SSMR3PutU32(pSSM, pVM->hm.s.cPatches);
     3017    if (RT_FAILURE(rc))
     3018        return rc;
    30213019
    30223020    for (uint32_t i = 0; i < pVM->hm.s.cPatches; i++)
     
    30243022        AssertCompileSize(HMTPRINSTR, 4);
    30253023        PCHMTPRPATCH pPatch = &pVM->hm.s.aPatches[i];
    3026         rc  = SSMR3PutU32(pSSM, pPatch->Core.Key);
    3027         rc |= SSMR3PutMem(pSSM, pPatch->aOpcode, sizeof(pPatch->aOpcode));
    3028         rc |= SSMR3PutU32(pSSM, pPatch->cbOp);
    3029         rc |= SSMR3PutMem(pSSM, pPatch->aNewOpcode, sizeof(pPatch->aNewOpcode));
    3030         rc |= SSMR3PutU32(pSSM, pPatch->cbNewOp);
    3031         rc |= SSMR3PutU32(pSSM, (uint32_t)pPatch->enmType);
    3032         rc |= SSMR3PutU32(pSSM, pPatch->uSrcOperand);
    3033         rc |= SSMR3PutU32(pSSM, pPatch->uDstOperand);
    3034         rc |= SSMR3PutU32(pSSM, pPatch->pJumpTarget);
    3035         rc |= SSMR3PutU32(pSSM, pPatch->cFaults);
    3036         AssertRCReturn(rc, rc);
     3024        SSMR3PutU32(pSSM, pPatch->Core.Key);
     3025        SSMR3PutMem(pSSM, pPatch->aOpcode, sizeof(pPatch->aOpcode));
     3026        SSMR3PutU32(pSSM, pPatch->cbOp);
     3027        SSMR3PutMem(pSSM, pPatch->aNewOpcode, sizeof(pPatch->aNewOpcode));
     3028        SSMR3PutU32(pSSM, pPatch->cbNewOp);
     3029        SSMR3PutU32(pSSM, (uint32_t)pPatch->enmType);
     3030        SSMR3PutU32(pSSM, pPatch->uSrcOperand);
     3031        SSMR3PutU32(pSSM, pPatch->uDstOperand);
     3032        SSMR3PutU32(pSSM, pPatch->pJumpTarget);
     3033        rc = SSMR3PutU32(pSSM, pPatch->cFaults);
     3034        if (RT_FAILURE(rc))
     3035            return rc;
    30373036    }
    30383037
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