[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [PATCH 1/5] 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.
(Re-xmit: sent from wrong email addr last time) Paolo Bonzini <pbonzini@redhat.com> writes: > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Thanks! I turned it into this diff against current SVN: commit 6045904929c3154884fa5d77d9a1748e096d333d Author: Rusty Russell <rusty@au1.ibm.com> Date: Tue Aug 20 14:10:57 2013 +0930 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. 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> diff --git a/virtio-v1.0-wd01-part1-specification.txt b/virtio-v1.0-wd01-part1-specification.txt index 517eb07..d8302cb 100644 --- a/virtio-v1.0-wd01-part1-specification.txt +++ b/virtio-v1.0-wd01-part1-specification.txt @@ -1538,6 +1538,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. + Device configuration layout The capacity of the device (expressed in 512-byte sectors) is always present. The availability of the others all depend on various feature bits @@ -1553,6 +1556,12 @@ device except where noted. u8 sectors; } geometry; le32 blk_size; + struct virtio_blk_topology { + u8 physical_block_exp; + u8 alignment_offset; + u16 min_io_size; + u32 opt_io_size; + } topology; }; 2.5.2.4 Device Initialization @@ -1564,13 +1573,18 @@ device except where noted. 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.5.2.5 Device Operation ------------------------
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]