aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/trace-events
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2022-08-30 08:38:27 +0200
committerGerd Hoffmann <kraxel@redhat.com>2022-09-27 07:32:30 +0200
commit12b69878fc7b4b92b1bbd3959f2c3d4c717881fb (patch)
tree63dc05ce5fb3aba25dffc251980849270a09da7e /hw/usb/trace-events
parentcea5aa85691d7f26b7ea995417d41a32802691b7 (diff)
downloadqemu-12b69878fc7b4b92b1bbd3959f2c3d4c717881fb.zip
qemu-12b69878fc7b4b92b1bbd3959f2c3d4c717881fb.tar.gz
qemu-12b69878fc7b4b92b1bbd3959f2c3d4c717881fb.tar.bz2
usb/msd: add usb_msd_fatal_error() and fix guest-triggerable assert
Add handler for fatal errors. Moves device into error state where it stops responding until the guest resets it. Guest can send illegal requests where scsi command and usb packet transfer directions are inconsistent. Use the new usb_msd_fatal_error() function instead of assert() in that case. Reported-by: Qiang Liu <cyruscyliu@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Qiang Liu <cyruscyliu@gmail.com> Message-Id: <20220830063827.813053-3-kraxel@redhat.com>
Diffstat (limited to 'hw/usb/trace-events')
-rw-r--r--hw/usb/trace-events1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/usb/trace-events b/hw/usb/trace-events
index 914ca71..b652698 100644
--- a/hw/usb/trace-events
+++ b/hw/usb/trace-events
@@ -263,6 +263,7 @@ usb_msd_packet_complete(void) ""
usb_msd_cmd_submit(unsigned lun, unsigned tag, unsigned flags, unsigned len, unsigned data_len) "lun %u, tag 0x%x, flags 0x%08x, len %d, data-len %d"
usb_msd_cmd_complete(unsigned status, unsigned tag) "status %d, tag 0x%x"
usb_msd_cmd_cancel(unsigned tag) "tag 0x%x"
+usb_msd_fatal_error(void) ""
# dev-uas.c
usb_uas_reset(int addr) "dev %d"