@@ -77,6 +77,48 @@ \subsubsection{High-Level Architecture}
7777 environments.
7878\end {enumerate }
7979
80+ \subsubsection {Relationship Between Bus and Transport }
81+ \label {sec:Virtio Transport Options / Virtio Over Messages / Basic Concepts / Relationship between bus and transport }
82+
83+ This subsubsection explains the division of responsibilities: the bus layer is
84+ the mandatory carrier that moves messages between driver and device endpoints
85+ (e.g., over IPC, shared memory with signalling or hardware messaging), while
86+ the virtio-msg transport defines the semantics of those messages.
87+
88+ virtio-msg groups messages into two categories:
89+
90+ \begin {description }
91+ \item [\textbf {Bus Messages }:]
92+ Intended for global bus operations such as enumerating device numbers
93+ (\busref {GET_DEVICES }), managing device hotplug events (\busref {EVENT_DEVICE })
94+ or assessing bus-wide health (\busref {PING }).
95+ These messages are \emph {optional } in environments where
96+ device discovery or state changes occur through other means (e.g., device
97+ tree). However, if a bus chooses to handle those tasks via messages,
98+ it SHOULD implement the appropriate bus message definitions.
99+
100+ \item [\textbf {Transport Messages }:]
101+ Used for device-specific operations, such as:
102+ \begin {itemize }
103+ \item Retrieving or setting features (\msgref {GET_DEVICE_FEATURES },
104+ \msgref {SET_DRIVER_FEATURES }),
105+ \item Accessing device configuration (\msgref {GET_CONFIG },
106+ \msgref {SET_CONFIG }),
107+ \item Managing virtqueues (\msgref {SET_VQUEUE }, \msgref {RESET_VQUEUE }),
108+ \item Handling device status and notifications (\msgref {SET_DEVICE_STATUS },
109+ \msgref {EVENT_USED }, etc.).
110+ \end {itemize }
111+ A bus implementation MUST relay these messages to the device number
112+ identified in the header, regardless of how it discovered or enumerated
113+ that device. Apart from enforcing generic transport limits (for example,
114+ maximum message size), a bus SHOULD treat transport messages as opaque and
115+ avoid modifying them.
116+ \end {description }
117+
118+ This separation lets a bus remain minimal if it obtains device information from
119+ firmware tables, while still supporting fully message-based enumeration and
120+ hotplug when desired.
121+
80122\subsubsection {System Topology }
81123
82124A virtio-msg system contains the following elements:
@@ -247,51 +289,6 @@ \subsubsection{Error Signaling}
247289transmission failures; it only permits a virtio-msg bus to surface such
248290failures to the virtio-msg transport when silent recovery is not feasible.
249291
250- \subsubsection {Bus vs. Transport Messages }
251- \label {sec:Virtio Transport Options / Virtio Over Messages / Basic Concepts / BusVsTransport }
252-
253- virtio-msg groups messages into two categories:
254-
255- \begin {description }
256- \item [\textbf {Bus Messages }:]
257- Intended for global bus operations such as enumerating device numbers
258- (\busref {GET_DEVICES }), managing device hotplug events (\busref {EVENT_DEVICE })
259- or assessing bus-wide health (\busref {PING }).
260- These messages are \emph {optional } in environments where
261- device discovery or state changes occur through other means (e.g., device
262- tree). However, if a bus chooses to handle those tasks via messages,
263- it SHOULD implement the appropriate bus message definitions.
264-
265- \item [\textbf {Transport Messages }:]
266- Used for device-specific operations, such as:
267- \begin {itemize }
268- \item Retrieving or setting features (\msgref {GET_DEVICE_FEATURES },
269- \msgref {SET_DRIVER_FEATURES }),
270- \item Accessing device configuration (\msgref {GET_CONFIG },
271- \msgref {SET_CONFIG }),
272- \item Managing virtqueues (\msgref {SET_VQUEUE }, \msgref {RESET_VQUEUE }),
273- \item Handling device status and notifications (\msgref {SET_DEVICE_STATUS },
274- \msgref {EVENT_USED }, etc.).
275- \end {itemize }
276- The bus MUST relay these messages to the correct device,
277- regardless of how the bus discovered or enumerated that device.
278- \end {description }
279-
280- The resulting design allows a bus to remain minimal if it obtains device
281- information from a device tree or firmware tables, while still supporting
282- fully message-based enumeration and hotplug if desired.
283-
284- \subsubsection {Optional Bus Messages }
285-
286- This specification \emph {defines } messages such as \busref {GET_DEVICES },
287- \busref {EVENT_DEVICE }, and \busref {PING } for a
288- completely message-based approach to enumeration, hotplug, and bus-wide health.
289- However, these are \emph {not } mandatory if a bus instance already handles those
290- functions via firmware, device tree, or other platform features. The only strict
291- requirement is that the bus MUST be able to forward device-specific
292- \emph {transport messages } once a device is recognized, so the virtio-msg driver
293- can manage it.
294-
295292\subsubsection {Endianness }
296293\label {sec:Virtio Transport Options / Virtio Over Messages / Basic Concepts / Endianness }
297294
@@ -376,18 +373,6 @@ \subsubsection{Message Correlation}
376373 action.
377374\end {itemize }
378375
379- \subsubsection {Bus and Transport Messages }
380- \label {sec:Virtio Transport Options / Virtio Over Messages / Basic Concepts / Bus and Transport Messages }
381-
382- The bus is responsible for forwarding device-specific \emph {transport
383- messages } to the correct device for each device number. Typically the bus does
384- not interpret or modify these transport messages; its role is simply to ensure
385- they reach the intended device. If the bus does not rely on messages for device
386- enumeration or hotplug itself, it MUST still be capable of transporting
387- \msgref {GET_DEVICE_INFO }, \msgref {GET_DEVICE_FEATURES }, \msgref {SET_CONFIG }, etc.
388- once the OS driver has identified a device and is performing initialization
389- via the virtio-msg transport.
390-
391376\subsection {Device Discovery }\label {sec:Virtio Transport Options / Virtio Over Messages / Device Discovery }
392377
393378A virtio-msg implementation can learn about devices via bus-level enumeration
0 commit comments