From 3fe5804757bce2a6628366bedc769474ee4d6923 Mon Sep 17 00:00:00 2001 From: rusty Date: Mon, 14 Oct 2013 09:57:02 +0000 Subject: 2.5.2.3: Add block topology. From: Paolo Bonzini Current QEMU and Linux drivers can export queue parameters via the virtio-blk configuration space. Document this, since the next patch will have to add another configuration field after these. Approved at 2013-10-08 Meeting: https://lists.oasis-open.org/archives/virtio/201310/msg00087.html See: https://lists.oasis-open.org/archives/virtio-comment/201308/msg00028.html Signed-off-by: Paolo Bonzini Signed-off-by: Rusty Russell Conflicts: virtio-v1.0-wd01-part1-specification.txt git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio@61 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652 --- virtio-v1.0-wd01-part1-specification.txt | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'virtio-v1.0-wd01-part1-specification.txt') diff --git a/virtio-v1.0-wd01-part1-specification.txt b/virtio-v1.0-wd01-part1-specification.txt index 1ea7a52..36f630c 100644 --- a/virtio-v1.0-wd01-part1-specification.txt +++ b/virtio-v1.0-wd01-part1-specification.txt @@ -2226,6 +2226,9 @@ device except where noted. VIRTIO_BLK_F_FLUSH (9) Cache flush command support. + VIRTIO_BLK_F_TOPOLOGY (10) Device exports information on optimal I/O + alignment. + 2.4.2.3.1 Legacy Interface: Feature bits -------------------- VIRTIO_BLK_F_BARRIER (0) Host supports request barriers. @@ -2249,6 +2252,12 @@ bits as indicated above. u8 sectors; } geometry; u32 blk_size; + struct virtio_blk_topology { + u8 physical_block_exp; + u8 alignment_offset; + u16 min_io_size; + u32 opt_io_size; + } topology; }; @@ -2261,13 +2270,18 @@ bits as indicated above. 2. If the VIRTIO_BLK_F_BLK_SIZE feature is negotiated, the blk_size field can be read to determine the optimal sector size - for the driver to use. This does not effect the units used in + for the driver to use. This does not affect the units used in the protocol (always 512 bytes), but awareness of the correct - value can effect performance. + value can affect performance. 3. If the VIRTIO_BLK_F_RO feature is set by the device, any write requests will fail. +4. If the VIRTIO_BLK_F_TOPOLOGY feature is negotiated, the fields in the + topology struct can be read to determine the physical block size and optimal + I/O lengths for the driver to use. This also does not affect the units + in the protocol, only performance. + 2.4.2.5. Device Operation ------------------------ -- cgit v1.2.3