VirtualBox

Changeset 33485 in vbox for trunk/src


Ignore:
Timestamp:
Oct 27, 2010 8:59:48 AM (14 years ago)
Author:
vboxsync
Message:

ATA: Don't assume that PGMPhysSimpleReadGCPtr succeeds in RC/R0 but go back to R3 if it fails.

Location:
trunk/src/VBox/Devices/Storage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/ATAController.cpp

    r32959 r33485  
    47584758        PPDMDEVINS pDevIns = pCtl->CTX_SUFF(pDevIns);
    47594759        rc = PGMPhysSimpleReadGCPtr(PDMDevHlpGetVMCPU(pDevIns), s->CTX_SUFF(pbIOBuffer) + s->iIOBufferPIODataStart, GCSrc, cbTransfer);
     4760#ifndef IN_RING3
     4761        /* This can fail in RC if the page table is not present for example. */
     4762        if (RT_FAILURE(rc))
     4763        {
     4764            PDMCritSectLeave(&pCtl->lock);
     4765            return VINF_IOM_HC_IOPORT_WRITE;
     4766        }
     4767#else
    47604768        Assert(rc == VINF_SUCCESS);
     4769#endif
    47614770
    47624771        if (cbTransfer)
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r33142 r33485  
    55435543
    55445544        rc = PGMPhysSimpleReadGCPtr(PDMDevHlpGetVMCPU(pDevIns), s->CTX_SUFF(pbIOBuffer) + s->iIOBufferPIODataStart, GCSrc, cbTransfer);
     5545#ifndef IN_RING3
     5546        /* This can fail in RC if the page table is not present for example. */
     5547        if (RT_FAILURE(rc))
     5548        {
     5549            PDMCritSectLeave(&pCtl->lock);
     5550            return VINF_IOM_HC_IOPORT_WRITE;
     5551        }
     5552#else
    55455553        Assert(rc == VINF_SUCCESS);
     5554#endif
    55465555
    55475556        if (cbTransfer)
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