scsi: make io_timeout configurable
commitc9b6609b69facad0cc5425d4fa7934c33d7f2e91
authorHannes Reinecke <hare@suse.de>
Mon, 16 Nov 2020 18:31:13 +0000 (16 19:31 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 25 Feb 2021 13:14:32 +0000 (25 14:14 +0100)
tree4d0c65ff04c2c7819ef077950fd78ea6c280cf47
parent106ad1f9c513f48b046e07e45406c339d16e4e2f
scsi: make io_timeout configurable

The current code sets an infinite timeout on SG_IO requests,
causing the guest to stall if the host experiences a frame
loss.
This patch adds an 'io_timeout' parameter for SCSIDevice to
make the SG_IO timeout configurable, and also shortens the
default timeout to 30 seconds to avoid infinite stalls.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Message-Id: <20201116183114.55703-3-hare@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/scsi-disk.c
hw/scsi/scsi-generic.c
include/hw/scsi/scsi.h