virtio-blk: add SGI_IO passthru support
commit1063b8b15fb49fcf88ffa282b19aaaf7ca9c678c
authorChristoph Hellwig <hch@lst.de>
Mon, 27 Apr 2009 08:29:14 +0000 (27 10:29 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 1 May 2009 14:44:10 +0000 (1 09:44 -0500)
tree10b9005227477ddef237eaa79e68281b8f342772
parent451c4abd8c6a65106e14f8a9a9eacf70c4fa9727
virtio-blk: add SGI_IO passthru support

[had the qemu list address wrong the first time, reply to this message,
 not the previous if you were on Cc]

Add support for SG_IO passthru (packet commands) to the virtio-blk
backend.  Conceptually based on an older patch from Hannes Reinecke
but largely rewritten to match the code structure and layering in
virtio-blk.

Note that currently we issue the hose SG_IO synchronously.  We could
easily switch to async I/O, but that would required either bloating
the VirtIOBlockReq by the size of struct sg_io_hdr or an additional
memory allocation for each SG_IO request.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/virtio-blk.c
hw/virtio-blk.h