VirtualBox

Changeset 56048 in vbox for trunk/src/VBox/VMM/VMMR0


Ignore:
Timestamp:
May 23, 2015 8:28:52 PM (10 years ago)
Author:
vboxsync
Message:

pgm.h,++: Changed the return type of PDMPhysRead, PGMPhysWrite, PGMPhysReadGCPtr and PGMPhysWriteGCPtr to VBOXSTRICTRC, tracking down all the currently possible return values for future ring-0 and raw-mode context handlers. Prepared IEM and PGM for new r0+rc pfnHandlers.

Location:
trunk/src/VBox/VMM/VMMR0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r55899 r56048  
    1206412064                    Assert(sizeof(Eflags.u32) >= cbParm);
    1206512065                    Eflags.u32 = 0;
    12066                     rc = PGMPhysRead(pVM, (RTGCPHYS)GCPtrStack, &Eflags.u32, cbParm, PGMACCESSORIGIN_HM);
     12066                    rc = VBOXSTRICTRC_TODO(PGMPhysRead(pVM, (RTGCPHYS)GCPtrStack, &Eflags.u32, cbParm, PGMACCESSORIGIN_HM));
     12067                    AssertMsg(rc == VINF_SUCCESS, ("%Rrc\n", rc)); /** @todo allow strict return codes here */
    1206712068                }
    1206812069                if (RT_FAILURE(rc))
     
    1211712118                Eflags.Bits.u1VM = 0;
    1211812119
    12119                 rc = PGMPhysWrite(pVM, (RTGCPHYS)GCPtrStack, &Eflags.u, cbParm, PGMACCESSORIGIN_HM);
    12120                 if (RT_FAILURE(rc))
     12120                rc = VBOXSTRICTRC_TODO(PGMPhysWrite(pVM, (RTGCPHYS)GCPtrStack, &Eflags.u, cbParm, PGMACCESSORIGIN_HM));
     12121                if (RT_UNLIKELY(rc != VINF_SUCCESS))
    1212112122                {
     12123                    AssertMsgFailed(("%Rrc\n", rc)); /** @todo allow strict return codes here */
    1212212124                    rc = VERR_EM_INTERPRETER;
    1212312125                    break;
     
    1215212154                                  &GCPtrStack);
    1215312155                if (RT_SUCCESS(rc))
    12154                     rc = PGMPhysRead(pVM, (RTGCPHYS)GCPtrStack, &aIretFrame[0], sizeof(aIretFrame), PGMACCESSORIGIN_HM);
     12156                {
     12157                    rc = VBOXSTRICTRC_TODO(PGMPhysRead(pVM, (RTGCPHYS)GCPtrStack, &aIretFrame[0], sizeof(aIretFrame),
     12158                                                       PGMACCESSORIGIN_HM));
     12159                    AssertMsg(rc == VINF_SUCCESS, ("%Rrc\n", rc)); /** @todo allow strict return codes here */
     12160                }
    1215512161                if (RT_FAILURE(rc))
    1215612162                {
  • trunk/src/VBox/VMM/VMMR0/PDMR0Device.cpp

    r55899 r56048  
    205205             pDevIns, pDevIns->iInstance, GCPhys, pvBuf, cbRead));
    206206
    207     int rc = PGMPhysRead(pDevIns->Internal.s.pVMR0, GCPhys, pvBuf, cbRead, PGMACCESSORIGIN_DEVICE);
    208     AssertRC(rc); /** @todo track down the users for this bugger. */
    209 
    210     Log(("pdmR0DevHlp_PhysRead: caller=%p/%d: returns %Rrc\n", pDevIns, pDevIns->iInstance, rc));
    211     return rc;
     207    VBOXSTRICTRC rcStrict = PGMPhysRead(pDevIns->Internal.s.pVMR0, GCPhys, pvBuf, cbRead, PGMACCESSORIGIN_DEVICE);
     208    AssertMsg(rcStrict == VINF_SUCCESS, ("%Rrc\n", VBOXSTRICTRC_VAL(rcStrict))); /** @todo track down the users for this bugger. */
     209
     210    Log(("pdmR0DevHlp_PhysRead: caller=%p/%d: returns %Rrc\n", pDevIns, pDevIns->iInstance, VBOXSTRICTRC_VAL(rcStrict) ));
     211    return VBOXSTRICTRC_VAL(rcStrict);
    212212}
    213213
     
    220220             pDevIns, pDevIns->iInstance, GCPhys, pvBuf, cbWrite));
    221221
    222     int rc = PGMPhysWrite(pDevIns->Internal.s.pVMR0, GCPhys, pvBuf, cbWrite, PGMACCESSORIGIN_DEVICE);
    223     AssertRC(rc); /** @todo track down the users for this bugger. */
    224 
    225     Log(("pdmR0DevHlp_PhysWrite: caller=%p/%d: returns %Rrc\n", pDevIns, pDevIns->iInstance, rc));
    226     return rc;
     222    VBOXSTRICTRC rcStrict = PGMPhysWrite(pDevIns->Internal.s.pVMR0, GCPhys, pvBuf, cbWrite, PGMACCESSORIGIN_DEVICE);
     223    AssertMsg(rcStrict == VINF_SUCCESS, ("%Rrc\n", VBOXSTRICTRC_VAL(rcStrict))); /** @todo track down the users for this bugger. */
     224
     225    Log(("pdmR0DevHlp_PhysWrite: caller=%p/%d: returns %Rrc\n", pDevIns, pDevIns->iInstance, VBOXSTRICTRC_VAL(rcStrict) ));
     226    return VBOXSTRICTRC_VAL(rcStrict);
    227227}
    228228
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