summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormstsirkin <mstsirkin@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652>2015-04-29 11:09:04 +0000
committermstsirkin <mstsirkin@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652>2015-04-29 11:09:04 +0000
commit3b676c2fb1c342ab01565ab61354b62105640427 (patch)
treefee6005c8855b388febbf8f7d9c6b4fc319f0413
parent12e4378536ea473f578edf05b83c78b9f846d516 (diff)
VIRTIO-134: Spell out details of indirect elements in chains
1) It's implied that a chain terminates with an indirect descriptor (since VIRTIO-15) but we didn't spell out that a device MUST NOT continue it. 2) We allow [direct]->[direct]->[indirect], and qemu and bhyve both accept it. Make it clear that this is valid, thus devices MUST handle it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio/branches/v1.0@521 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652
-rw-r--r--content.tex12
1 files changed, 12 insertions, 0 deletions
diff --git a/content.tex b/content.tex
index 748c78d..2d032a7 100644
--- a/content.tex
+++ b/content.tex
@@ -477,9 +477,21 @@ one table per descriptor).
A driver MUST NOT create a descriptor chain longer than the Queue Size of
the device.
+A driver MUST NOT set both VIRTQ_DESC_F_INDIRECT and VIRTQ_DESC_F_NEXT
+in \field{flags}.
+
\devicenormative{\paragraph}{Indirect Descriptors}{Basic Facilities of a Virtio Device / Virtqueues / The Virtqueue Descriptor Table / Indirect Descriptors}
The device MUST ignore the write-only flag (\field{flags}\&VIRTQ_DESC_F_WRITE) in the descriptor that refers to an indirect table.
+The device MUST handle the case of zero or more normal chained
+descriptors followed by a single descriptor with \field{flags}\&VIRTQ_DESC_F_INDIRECT.
+
+\begin{note}
+While unusual (most implementations either create a chain solely using
+non-indirect descriptors, or use a single indirect element), such a
+layout is valid.
+\end{note}
+
\subsection{The Virtqueue Available Ring}\label{sec:Basic Facilities of a Virtio Device / Virtqueues / The Virtqueue Available Ring}
\begin{lstlisting}