VirtualBox

Ignore:
Timestamp:
Sep 5, 2019 7:12:46 AM (5 years ago)
Author:
vboxsync
Message:

Storage/DevVirtioSCSI.cpp: Added code to incorporate aeichner's changes (see bugref:9440, Comment #72). Tested new response status code and discovered it's more accurate to trust sense over rcReq values. Also changed some logging levels to reinstate the option to get hexdumps (with some filtering)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VirtIO/Virtio_1_0.h

    r80522 r80596  
    4141#define VIRTIOSCSI_REGION_PORT_IO           1                    /**< BAR for PORT I/O (impl specific)         */
    4242#define VIRTIOSCSI_REGION_PCI_CAP           2                    /**< BAR for VirtIO Cap. MMIO (impl specific) */
     43
     44#define VIRTIO_HEX_DUMP(logLevel, pv, cb, base, title) \
     45    do { \
     46        if (LogIsItEnabled(logLevel, LOG_GROUP)) \
     47            virtioHexDump((pv), (cb), (base), (title)); \
     48    } while (0)
    4349
    4450/**
     
    320326                            bool fWrite, bool fHasIndex, uint32_t idx);
    321327
     328/**
     329 * Does a formatted hex dump using Log(()), recommend using VIRTIO_HEX_DUMP() macro to
     330 * control enabling of logging efficiently.
     331 *
     332 * @param   pv          - pointer to buffer to dump contents of
     333 * @param   cb          - count of characters to dump from buffer
     334 * @param   uBase       - base address of per-row address prefixing of hex output
     335 * @param   pszTitle    - Optional title. If present displays title that lists
     336 *                        provided text with value of cb to indicate size next to it.
     337 */
     338void virtioHexDump(uint8_t *pv, size_t cb, uint32_t uBase, const char *pszTitle);
    322339
    323340#endif /* !VBOX_INCLUDED_SRC_VirtIO_Virtio_1_0_h */
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