You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
virtio-msg: mark direct message-field references with \field{} (Manos Pitsidianakis)
Manos Pitsidianakis noted that direct references to message fields should
use the \field{} macro for consistency with the rest of the spec.
Update the remaining direct field references in prose and normative text
to use \field{} where they refer to concrete message fields, including
GET_CONFIG/SET_CONFIG, SET_DEVICE_STATUS, GET_SHM, EVENT_CONFIG, and
GET_DEVICES wording.
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
\msgref{SET_DEVICE_STATUS} writes a new device status value. Drivers use it to
1429
1433
progress through the virtio-defined states or to request a reset by writing 0.
1430
-
The response reports the status value observed when the response is generated.
1431
-
For a reset request (\field{status} == 0), a response status of 0 indicates
1432
-
reset completion; a non-zero response status indicates that reset completion may
1433
-
still be pending. The resulting status may differ from the requested status (for
1434
-
example, if the device refuses FEATURES\_OK or sets DEVICE\_NEEDS\_RESET).
1434
+
The response reports the \field{status} value observed when the response is
1435
+
generated. For a reset request (\field{status} == 0), a response
1436
+
\field{status} of 0 indicates reset completion; a non-zero \field{status}
1437
+
indicates that reset completion may still be pending. The resulting
1438
+
\field{status} may differ from the requested \field{status} (for example, if
1439
+
the device refuses FEATURES\_OK or sets DEVICE\_NEEDS\_RESET).
1435
1440
1436
1441
\begin{lstlisting}
1437
1442
struct virtio_msg_set_device_status_req {
@@ -1448,23 +1453,23 @@ \subsubsection{Overview}
1448
1453
\item A driver MUST write 0 via \msgref{SET_DEVICE_STATUS} to request a device
1449
1454
reset.
1450
1455
\item A driver that needs to confirm reset completion MUST treat a
1451
-
\msgref{SET_DEVICE_STATUS} response status of 0 as completion;
1456
+
\msgref{SET_DEVICE_STATUS} response \field{status} of 0 as completion;
1452
1457
otherwise it MUST poll \msgref{GET_DEVICE_STATUS} until the device
1453
-
reports status0 before reinitializing the device.
1458
+
reports \field{status}=0 before reinitializing the device.
1454
1459
\end{itemize}
1455
1460
1456
1461
\devicenormative{\paragraph}{SET\_DEVICE\_STATUS}{Virtio Transport Options / Virtio Over Messages / Transport Messages / VIRTIO_MSG_SET_DEVICE_STATUS / Device}
1457
1462
\begin{itemize}
1458
1463
\item A device MAY clear FEATURES\_OK or set DEVICE\_NEEDS\_RESET in its
1459
-
response if it cannot accept the requested status, but it MUST report
1460
-
the resulting status accurately.
1464
+
response if it cannot accept the requested \field{status}, but it MUST
1465
+
report the resulting \field{status} accurately.
1461
1466
\item Upon receiving \msgref{SET_DEVICE_STATUS} with \field{status} set to 0,
1462
1467
a device MUST start reset processing and MUST eventually complete reset
1463
-
by reporting status0.
1468
+
by reporting \field{status}=0.
1464
1469
\item A device MAY complete reset before sending the
1465
1470
\msgref{SET_DEVICE_STATUS} response (synchronous completion) or after
1466
1471
sending it (asynchronous completion).
1467
-
\item A device MUST NOT report status0 until reset completion.
1472
+
\item A device MUST NOT report \field{status}=0 until reset completion.
1468
1473
\end{itemize}
1469
1474
1470
1475
\msgdef{GET_VQUEUE}
@@ -1627,9 +1632,10 @@ \subsubsection{Overview}
1627
1632
\msgdef{GET_SHM}
1628
1633
1629
1634
\msgref{GET_SHM} returns the location and size of a device-owned shared memory
1630
-
region. The request carries the region index; the response echoes the index and
1631
-
provides the base physical address and length. A length of zero indicates that
1632
-
the specified region does not exist.
1635
+
region. The request carries the region \field{index}; the response echoes
1636
+
\field{index} and provides the base physical \field{address} and
1637
+
\field{length}. A
1638
+
\field{length} of zero indicates that the specified region does not exist.
1633
1639
1634
1640
\begin{lstlisting}
1635
1641
struct virtio_msg_get_shm_req {
@@ -1646,9 +1652,9 @@ \subsubsection{Overview}
1646
1652
1647
1653
\devicenormative{\paragraph}{GET\_SHM}{Virtio Transport Options / Virtio Over Messages / Transport Messages / VIRTIO_MSG_GET_SHM / Device}
1648
1654
\begin{itemize}
1649
-
\item A device MUST return zero length if the requested shared memory region
1650
-
does not exist and MUST report accurate physical address/length
1651
-
information for regions it supports.
1655
+
\item A device MUST return zero \field{length} if the requested shared memory
1656
+
region does not exist and MUST report accurate physical
1657
+
\field{address}/\field{length} information for regions it supports.
1652
1658
\item A device MUST set the \field{reserved} field in \msgref{GET_SHM}
1653
1659
responses to zero.
1654
1660
\end{itemize}
@@ -1657,12 +1663,12 @@ \subsubsection{Overview}
1657
1663
1658
1664
\msgref{EVENT_CONFIG} notifies the driver about configuration or status changes.
1659
1665
The payload includes current device status, generation, and
1660
-
configuration offset/length. The configuration data can be omitted; if omitted,
1661
-
the driver re-fetches via \msgref{GET_CONFIG}. Generation and offset/length
1662
-
semantics follow the active profile defined in
1666
+
configuration \field{offset}/\field{length}. The configuration data can be
1667
+
omitted; if omitted, the driver re-fetches via \msgref{GET_CONFIG}. Generation
1668
+
and \field{offset}/\field{length} semantics follow the active profile defined in
0 commit comments