diff options
author | rusty <rusty@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652> | 2013-10-14 09:57:02 +0000 |
---|---|---|
committer | rusty <rusty@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652> | 2013-10-14 09:57:02 +0000 |
commit | 3fe5804757bce2a6628366bedc769474ee4d6923 (patch) | |
tree | 438a36b79ecd3cd16aaa181df3073d9502bbe80c | |
parent | c5f79f556703e1651ddc7e6725cb4df95f7ea26d (diff) |
2.5.2.3: Add block topology.
From: Paolo Bonzini <pbonzini@redhat.com>
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 <pbonzini@redhat.com>
Signed-off-by: Rusty Russell <rusty@au1.ibm.com>
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
-rw-r--r-- | virtio-v1.0-wd01-part1-specification.txt | 18 |
1 files changed, 16 insertions, 2 deletions
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 ------------------------ |