VirtualBox

Changeset 85994 in vbox for trunk/src


Ignore:
Timestamp:
Sep 2, 2020 11:06:04 AM (4 years ago)
Author:
vboxsync
Message:

Devices/Storage/DevLsiLogicSCSI: Don't copy the sense buffer over if the guest has no sense buffer allocated, fixes debug assertion with the EFI MPT driver

File:
1 edited

Legend:

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

    r85134 r85994  
    21552155
    21562156        /* Copy the sense buffer over. */
    2157         PDMDevHlpPCIPhysWriteMeta(pDevIns, GCPhysAddrSenseBuffer, pReq->abSenseBuffer,
    2158                                   RT_UNLIKELY(  pReq->GuestRequest.SCSIIO.u8SenseBufferLength
    2159                                               < sizeof(pReq->abSenseBuffer))
    2160                                   ? pReq->GuestRequest.SCSIIO.u8SenseBufferLength
    2161                                   : sizeof(pReq->abSenseBuffer));
     2157        if (pReq->GuestRequest.SCSIIO.u8SenseBufferLength > 0)
     2158            PDMDevHlpPCIPhysWriteMeta(pDevIns, GCPhysAddrSenseBuffer, pReq->abSenseBuffer,
     2159                                      RT_UNLIKELY(  pReq->GuestRequest.SCSIIO.u8SenseBufferLength
     2160                                                  < sizeof(pReq->abSenseBuffer))
     2161                                      ? pReq->GuestRequest.SCSIIO.u8SenseBufferLength
     2162                                      : sizeof(pReq->abSenseBuffer));
    21622163
    21632164        if (RT_SUCCESS(rcReq) && RT_LIKELY(pReq->u8ScsiSts == SCSI_STATUS_OK))
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