virtio — archive
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
— [Date Index]
| [Thread Index]
| [Month Index]
| [List Home]
[PATCH 0/4] virtio-blk clarifications
Define them in terms of descriptors, not segments, and explain what the driver and device are to use them for. Signed-off-by: Paolo Bonzini <[email protected]> --- content.tex
17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/content.tex b/content.tex index 4cdfeef..fd3a3c2 100644 --- a/content.tex +++ b/content.tex @@ -3515,11 +3515,11 @@ device except where noted. subsection{Feature bits}label{sec:Device Types / Block Device / Feature bits}
egin{description} -item[VIRTIO_BLK_F_SIZE_MAX (1)] Maximum size of any single segment is -
in field{size_max}. +item[VIRTIO_BLK_F_SIZE_MAX (1)] Maximum size of any single descriptor in +
the data portion of a request ("segment") is in field{size_max}.
-item[VIRTIO_BLK_F_SEG_MAX (2)] Maximum number of segments in a -
request is in field{seg_max}. +item[VIRTIO_BLK_F_SEG_MAX (2)] Maximum number of descriptors in the +
data portion of a request ("segments") is in field{seg_max}.
item[VIRTIO_BLK_F_GEOMETRY (4)] Disk-style geometry specified in
field{geometry}. @@ -3762,6 +3762,10 @@ error or VIRTIO_BLK_S_UNSUPP for a request unsupported by device: A driver SHOULD NOT submit a request which would cause a read or write beyond field{capacity}.
+A driver SHOULD NOT submit a request which has more than field{seg_max} +descriptors in the data portion, or which has more than field{size_max} +bytes in a single descriptor in the data portion. + A driver SHOULD accept the VIRTIO_BLK_F_RO feature if offered.
A driver MUST set field{sector} to 0 for a VIRTIO_BLK_T_FLUSH request. @@ -3782,6 +3786,11 @@ a range of sectors has been discarded. A device MUST set the field{status} byte to VIRTIO_BLK_S_IOERR for a request which would cause a read or write beyond field{capacity}.
+A device MAY set the field{status} byte to VIRTIO_BLK_S_IOERR for a +request which has more than field{seg_max} descriptors in the data +portion, or which has more than field{size_max} bytes in a single +descriptor in the data portion. + A device MUST set the field{status} byte to VIRTIO_BLK_S_IOERR for a write request if the VIRTIO_BLK_F_RO feature if offered, and MUST NOT write any data. -- 2.17.1
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
— [Date Index]
| [Thread Index]
| [Month Index]
| [List Home]