diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2018-03-09 23:23:36 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2018-03-20 02:29:10 +0200 |
commit | 1f4a79e1e37e3eaa653d437eb644f11f9be7ff45 (patch) | |
tree | c6a80508a7f825dfb1e05a0f6cec293f85aa2c84 | |
parent | 40d6ce03a3f16146f896157a5af7a8a3d20661c2 (diff) |
content: in-order buffer use
Using descriptors in-order is sometimes beneficial. Add an option for
that - per-format detail allowing more optimizations will be added by
follow-up patches.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Approved-by: https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=3177
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/3
-rw-r--r-- | content.tex | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/content.tex b/content.tex index 4147467..3be16c8 100644 --- a/content.tex +++ b/content.tex @@ -245,6 +245,15 @@ a device event - i.e. send an interrupt to the driver. Device reports the number of bytes it has written to memory for each buffer it uses. This is referred to as ``used length''. +Device is not generally required to use buffers in +the same order in which they have been made available +by the driver. + +Some devices always use descriptors in the same order in which +they have been made available. These devices can offer the +VIRTIO_F_IN_ORDER feature. If negotiated, this knowledge +might allow optimizations or simplify driver and/or device code. + Each virtqueue can consist of up to 3 parts: \begin{itemize} \item Descriptor Area - used for describing buffers @@ -5248,6 +5257,9 @@ Descriptors} and \ref{sec:Packed Virtqueues / Indirect Flag: Scatter-Gather Supp \item[VIRTIO_F_RING_PACKED(34)] This feature indicates support for the packed virtqueue layout as described in \ref{sec:Basic Facilities of a Virtio Device / Packed Virtqueues}~\nameref{sec:Basic Facilities of a Virtio Device / Packed Virtqueues}. + \item[VIRTIO_F_IN_ORDER(35)] This feature indicates + that all buffers are used by the device in the same + order in which they have been made available. \end{description} \drivernormative{\section}{Reserved Feature Bits}{Reserved Feature Bits} @@ -5273,6 +5285,9 @@ translates bus addresses from the device into physical addresses in memory. A device MAY fail to operate further if VIRTIO_F_IOMMU_PLATFORM is not accepted. +If VIRTIO_F_IN_ORDER has been negotiated, a device MUST use +buffers in the same order in which they have been available. + \section{Legacy Interface: Reserved Feature Bits}\label{sec:Reserved Feature Bits / Legacy Interface: Reserved Feature Bits} Transitional devices MAY offer the following: |