Hi all,
I got bored and implemented SCSI passthrough for the virtio-blk driver.
Principle is quite simple, just put the missing fields (cdb, sense and
status header) on the virtio queue and then call the SG_IO ioctl on the
host.
So when using '-drive file=/dev/sgXX,if=virtio,format=host_device' you
can happily call any sg_XX command on the resulting vdX device. Quite
neat, methinks. And it's even backwards compatible, so each of these
patches should work without the other one applied.
As one would have guessed there are two patches, one for the linux
kernel to modify the virtio-blk driver in the guest and one for the
qemu/kvm userland program to modify the virtio-blk driver on the host.
This patch is relative to avi's kvm-userland tree from kernel.org.
As usual, comments etc to me.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare at suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Markus Rex, HRB 16746 (AG N?rnberg)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kvm-kernel-virtio-scsi-passthrough
Url:
http://lists.linux-foundation.org/pipermail/virtualization/attachments/20080829/f21fbd6f/attachment.txt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kvm-userland-virtio-scsi-passthrough
Url:
http://lists.linux-foundation.org/pipermail/virtualization/attachments/20080829/f21fbd6f/attachment-0001.txt