Ronnie Sahlberg 983924532f ISCSI: Add SCSI passthrough via scsi-generic to libiscsi
Update iscsi to allow passthrough of SG_IO scsi commands when the iscsi
device is forced to be scsi-generic.

Implement both bdrv_ioctl() and bdrv_aio_ioctl() in the iscsi backend,
emulate the SG_IO ioctl and pass the SCSI commands across to the
iscsi target.

This allows end-to-end passthrough of SCSI all the way from the guest,
to qemu, via scsi-generic, then libiscsi all the way to the iscsi target.

To activate this you need to specify that the iscsi lun should be treated
as a scsi-generic device.

Example:
    -device lsi -device scsi-generic,drive=MyISCSI \
    -drive file=iscsi://10.1.1.125/iqn.ronnie.test/1,if=none,id=MyISCSI

Note, you can currently not boot a qemu guest from a scsi device.

Note,
This only works when the host is linux, since the emulation relies on
definitions of SG_IO from the scsi-generic implementation in the
linux kernel.
It should be fairly easy to re-implement some structures similar enough
for non-linux hosts to do the same style of passthrough via a fake
scsi generic layer and libiscsi if need be.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-07-02 10:18:41 +02:00
..
2012-06-21 16:06:11 +00:00
2012-06-21 16:06:11 +00:00
2012-06-21 16:06:11 +00:00
2012-06-19 13:24:44 +00:00
2012-06-22 10:46:12 +02:00
2012-06-21 18:45:24 +00:00
2012-06-15 14:03:42 +02:00
2012-06-18 15:14:38 +02:00
2012-06-04 23:00:45 +02:00
2012-06-24 01:04:51 +02:00
2012-06-18 15:14:38 +02:00
2012-06-04 23:00:41 +02:00
2012-06-22 10:49:55 +02:00
2012-06-15 14:03:42 +02:00
2012-06-21 16:06:10 +00:00
2012-06-11 00:23:04 +02:00
2012-06-22 10:49:55 +02:00
2012-06-22 10:49:45 +02:00
2012-06-04 23:00:43 +02:00
2012-06-07 17:18:58 +03:00
2012-06-24 01:04:45 +02:00
2012-06-18 15:14:38 +02:00
2012-06-04 23:00:45 +02:00
2012-06-22 10:46:12 +02:00
2012-06-22 10:46:12 +02:00
2012-06-22 10:46:12 +02:00
2012-06-22 10:49:55 +02:00
2012-06-22 10:46:12 +02:00
2012-06-18 15:14:38 +02:00
2012-06-22 10:49:55 +02:00
2012-06-21 16:06:11 +00:00
2012-06-21 16:06:11 +00:00
2012-06-15 13:08:13 +02:00
2012-06-15 13:08:13 +02:00