summaryrefslogtreecommitdiff
path: root/hw/virtio-blk.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/virtio-blk.h')
-rw-r--r--hw/virtio-blk.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/virtio-blk.h b/hw/virtio-blk.h
index 8c91e1ece6..d11f484945 100644
--- a/hw/virtio-blk.h
+++ b/hw/virtio-blk.h
@@ -28,6 +28,9 @@
#define VIRTIO_BLK_F_SIZE_MAX 1 /* Indicates maximum segment size */
#define VIRTIO_BLK_F_SEG_MAX 2 /* Indicates maximum # of segments */
#define VIRTIO_BLK_F_GEOMETRY 4 /* Indicates support of legacy geometry */
+#define VIRTIO_BLK_F_RO 5 /* Disk is read-only */
+#define VIRTIO_BLK_F_BLK_SIZE 6 /* Block size of disk is available*/
+#define VIRTIO_BLK_F_SCSI 7 /* Supports scsi command passthru */
struct virtio_blk_config
{
@@ -70,6 +73,15 @@ struct virtio_blk_inhdr
unsigned char status;
};
+/* SCSI pass-through header */
+struct virtio_scsi_inhdr
+{
+ uint32_t errors;
+ uint32_t data_len;
+ uint32_t sense_len;
+ uint32_t residual;
+};
+
void *virtio_blk_init(PCIBus *bus, BlockDriverState *bs);
#endif