@@ -26,7 +26,7 @@ \subsubsection{Purpose}
2626
2727 \item \textbf {Reduce per-bus complexity: }
2828 Buses can implement a fully message-based workflow (including optional
29- enumeration via \busref {GET_DEVICES } and hotplug via \busref {EVENT_DEVICE }
29+ enumeration via \busref {GET_DEVICES } and hotplug via \busref {EVENT_DEVICE })
3030 or they can discover and manage devices through
3131 alternative means such as platform firmware data. In either case, they
3232 forward transport messages to and from each device.
@@ -110,7 +110,8 @@ \subsection{Basic Concepts}
110110\subsubsection {Transport Revisions and Maximum Message Size }
111111\label {sec:Virtio Transport Options / Virtio Over Messages / Basic Concepts / Revisions }
112112
113- Each \textbf {virtio-msg bus instance } advertises:
113+ Each \textbf {virtio-msg bus instance } advertises the following to the transport
114+ layer:
114115\begin {itemize }
115116 \item A \textbf {transport revision } indicating the protocol version it
116117 supports. This revision is separate from the overall Virtio
@@ -122,19 +123,19 @@ \subsubsection{Transport Revisions and Maximum Message Size}
122123\end {itemize }
123124
124125These parameters \emph {MAY } vary between bus instances within the same system.
125- The driver obtains a bus's revision, maximum message size and list of features
126- through an \emph {implementation-defined } mechanism, which could be:
126+ The bus implementation obtains a bus's revision, maximum message size and list
127+ of features through an \emph {implementation-defined } mechanism, which could be:
127128\begin {itemize }
128129 \item A device tree or firmware method providing bus configuration,
129130 \item A message exchange during bus setup,
130131 \item A per bus instance list of properties,
131132 \item A static definition built into the driver for a known environment.
132133\end {itemize }
133134
134- After learning these parameters, the driver \emph {MUST } respect them for all
135- messages involving that bus instance. For example, it \emph {MUST NOT } send a
136- message exceeding the \textbf {maximum message size }, and it \emph {MUST } avoid
137- using advanced features or messages unavailable in the bus's advertised
135+ After learning these parameters, the transport layer \emph {MUST } respect them
136+ for all messages involving that bus instance. For example, it \emph {MUST NOT }
137+ send a message exceeding the \textbf {maximum message size }, and it \emph {MUST }
138+ avoid using advanced features or messages unavailable in the bus's advertised
138139\textbf {transport revision }.
139140
140141\paragraph {virtio-msg revisions }
@@ -188,8 +189,8 @@ \subsubsection{Configuration Generation Count}
188189or the response to \msgref {GET_CONFIG } which also both provide the device's
189190current configuration count. The device may change any amount of data for one
190191generation count increment. If the change cannot fit in one \msgref {EVENT_CONFIG }
191- message, it \emph {SHOULD } be signaled to the driver via a \msgref {EVENT_CONFIG }
192- message with a zero data length and the new generation count.
192+ message, the device \emph {SHOULD } send an \msgref {EVENT_CONFIG } message
193+ with a zero data length and the new generation count to the driver .
193194The device \emph {MUST NOT } provide the same generation count in
194195multiple \msgref {EVENT_CONFIG } messages that contain non-zero length config
195196data. The driver includes its view of the current generation count in
@@ -296,7 +297,7 @@ \subsubsection{Bus vs. Transport Messages}
296297\subsubsection {Endianness }
297298\label {sec:Virtio Transport Options / Virtio Over Messages / Basic Concepts / Endianness }
298299
299- All encoding of values and fields defined in the virtio-msg messages \emph {MUST }
300+ All values and fields defined in the virtio-msg messages \emph {MUST }
300301be encoded in little-endian.
301302
302303\subsubsection {Common Message Format }
@@ -309,12 +310,12 @@ \subsubsection{Common Message Format}
309310The header layout is:
310311\ begin{lstlisting}
311312struct virtio_msg_header {
312- uint8_t type; /* request/response + bus/transport */
313- uint8_t msg_id; /* message id */
314- uint16_t dev_num; /* device number (0 for bus messages) */
315- uint16_t token; /* correlation identifier (0 for events) */
316- uint16_t msg_size; /* total size: header (8) + payload */
317- uint8_t payload[];
313+ u8 type; /* request/response + bus/transport */
314+ u8 msg_id; /* message id */
315+ le16 dev_num; /* device number (0 for bus messages) */
316+ le16 token; /* correlation identifier (0 for events) */
317+ le16 msg_size; /* total size: header (8) + payload */
318+ u8 payload[];
318319};
319320\end {lstlisting }
320321
@@ -1342,10 +1343,10 @@ \subsubsection{Optional Requirements}
13421343\begin {itemize }
13431344 \item A device or the driver side bus \emph {MUST } send \msgref {EVENT_CONFIG }
13441345 to inform the driver of configuration of device status changes.
1345- \item A device or the driver side bus \emph {MUST } \msgref {EVENT_USED }
1346+ \item A device or the driver side bus \emph {MUST } send \msgref {EVENT_USED }
13461347 to inform the driver of (likely) buffer completions.
13471348 \item A driver \emph {MUST } send \msgref {EVENT_AVAIL } to notify the device that
1348- new buffers are posted .
1349+ new buffers are available .
13491350\end {itemize }
13501351
13511352\subsubsection {Compliance for Different Environments }
0 commit comments