Skip to content

Conversation

@bertrand-marquis
Copy link
Collaborator

@bertrand-marquis bertrand-marquis commented Nov 20, 2025

In this pull request, I try to do the following:

  • improve GET_DEVICES message description as it was using number in an imprecise way
  • sync the plan to other transport definitions (remove introduction, remove BUS operations, have discovery, initialization and operation to mimic other transports)
  • start to switch to normative statements (only done for now in basic concept and discovery)

Would be nice to have some feedback on the normative and validate the new plan before i finish this.

PDF version of this PR as of 2025-12-03 5PM UTC:
https://github.com/wmamills/virtio-msg-spec/releases/download/bertrand-pr28-wmamills-draft-v31/bertrand-pr28-wmamills-draft-v31.pdf

Rework GET_DEVICES message description to prevent confusion between
Number of devices and device number by using device-number for the
device number identifier and renaming fields of the message.
Also provide an example to illustrate the usage of the message.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
To comply with the rest of the OASIS Virtio specification removing all
emph or textbf around MUST/MAY/SHOULD.
Do some minor rewording to prevent using normative wording when not
required.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
To follow the organization of other transports, remove the introduction
chapter by moving its content into basic concepts and just having a
small introduction paragraph for the chapter instead.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Create a stand-alone device discovery section to have the same
organization as other transports.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Merge content into messages description directly by adding an intended
usage paragraph or into the Basic Concepts section.

This makes the transport content look more like PCI or Channel IO.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Rework the Basic concepts to merge all chapters speaking of bus vs
transport and the bus messages and transport messages into a single one
to prevent repetition.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Move version compatibility rules in a sub-chapter of transport revision
in the basic concepts.
This is to prepare for the removal of the compliance chapter.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Add a new command to have a standard way to define virtio-msg bus
normative statements.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
These messages are \emph{optional} in environments where
device discovery or state changes occur through other means (e.g., device
tree). However, if a bus chooses to handle those tasks via messages,
it SHOULD implement the appropriate bus message definitions.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: move SHOULD statement to busnormative section below

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment on lines 112 to 126

\busnormative{\paragraph}{Transport Message Forwarding}{Virtio Transport Options / Virtio Over Messages / Basic Concepts / Relationship between bus and transport / Transport Message Forwarding}
\begin{itemize}
\item A bus implementation MUST relay each transport message to the device
number identified in the message header, regardless of how it
discovered or enumerated that device.
\item A bus implementation SHOULD treat transport messages as opaque apart
from enforcing generic transport limits, such as the advertised maximum
message size, and SHOULD NOT modify the transport payload.
\end{itemize}

This separation lets a bus remain minimal if it obtains device information from
firmware tables, while still supporting fully message-based enumeration and
hotplug when desired.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change order:

Suggested change
\busnormative{\paragraph}{Transport Message Forwarding}{Virtio Transport Options / Virtio Over Messages / Basic Concepts / Relationship between bus and transport / Transport Message Forwarding}
\begin{itemize}
\item A bus implementation MUST relay each transport message to the device
number identified in the message header, regardless of how it
discovered or enumerated that device.
\item A bus implementation SHOULD treat transport messages as opaque apart
from enforcing generic transport limits, such as the advertised maximum
message size, and SHOULD NOT modify the transport payload.
\end{itemize}
This separation lets a bus remain minimal if it obtains device information from
firmware tables, while still supporting fully message-based enumeration and
hotplug when desired.
This separation lets a bus remain minimal if it obtains device information from
firmware tables, while still supporting fully message-based enumeration and
hotplug when desired.
\busnormative{\paragraph}{Transport Message Forwarding}{Virtio Transport Options / Virtio Over Messages / Basic Concepts / Relationship between bus and transport / Transport Message Forwarding}
\begin{itemize}
\item A bus implementation MUST relay each transport message to the device
number identified in the message header, regardless of how it
discovered or enumerated that device.
\item A bus implementation SHOULD treat transport messages as opaque apart
from enforcing generic transport limits, such as the advertised maximum
message size, and SHOULD NOT modify the transport payload.
\end{itemize}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

imposed by the underlying bus (for example, a framing header) does not count
against this limit. Today the maximum useful transport payload is expected to
be 274 bytes, which is sufficient for a GET_CONFIG or SET_CONFIG transfer with
256 bytes of configuration data.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Today the maximum useful transport payload is expected to
be 274 bytes, which is sufficient for a GET_CONFIG or SET_CONFIG transfer with
256 bytes of configuration data

Not ideal phrasing here. How about turning this into a SHOULD normative statement?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit wondering if we should not remove this size statement all together as this is really a finger in the air statement, current PoCs are using size smaller than that and ffa is using 104 bytes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a try, let me know what you think

Comment on lines 219 to 225
A higher transport revision or additional transport feature bits extend the
protocol with new messages or capabilities. Implementations are expected to
remain interoperable across revisions: devices and drivers designed for a newer
revision still implement the mandatory messages and semantics defined in prior
revisions. When a bus instance, driver, or device encounters an unsupported
message or feature, it should reject the request explicitly or ignore it rather
than exhibit undefined behavior.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds like potential normative statements, too

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will give that a try

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a try, let me know what you think


A device \emph{MUST} respond with all zero feature data for features bit
requested beyond those the device implements.
\devicenormative{\paragraph}{Feature Blocks (Device)}{Virtio Transport Options / Virtio Over Messages / Basic Concepts / FeatureBlocks / Device}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is FeatureBlocks instead of Feature Blocks on purpose?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is reusing the label format upper but happy to put full naming here and elsewhere for coherency

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 1346 to 1350
\subsubsection{Normative References}
\label{sec:Virtio Transport Options / Virtio Over Messages / Compliance / NormativeRefs}
The terms \textbf{MUST}, \textbf{MUST NOT}, \textbf{SHOULD}, \textbf{SHOULD NOT},
and \textbf{MAY} in this document are to be interpreted as specified by
The terms MUST, MUST NOT, SHOULD, SHOULD NOT,
and MAY in this document are to be interpreted as specified by
\href{https://www.rfc-editor.org/rfc/rfc2119}{RFC 2119}.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not necessary, since it's stated in 1.3 Terminology of the spec

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The complete compliance section will be removed once we have switch to normative

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compliance is now removed

Add bus normative statement in bus vs transport section of basic
concepts.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Rework the transport revision and maximum message size section to switch
to normative declarations.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Add normative statement on message size constraints in the revisions
chapter.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Define some normative statements for backward compatibility rules.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Switch to normative statement in device numbers and enumeration section.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Rework Generation Count section in basic concept to use normative
statements.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Also convert the overview

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
All the content of the chapter is now present in normative statements in
the required sections.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Rework the correlation handling:
- fully delegate correlation to the bus
- only enforce for answers to be received in the order of the requests
- remove restriction to set token to 0 for events
- enforce for the device to not make any assumption on the token value

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Remove (Driver), (Device) or (Bus) as those are repeating the
requirement title.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Add entries for conformance of Virtio over Message for Driver, Device
and bus.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Use a table to properly define the message IDs area reserved for
specific usage.
Use the same format and fully specify also the message IDs area for bus
messages.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Define the messages format using structures instead of using table to be
more coherent with other transports and the rest of virtio
specification.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Replace compressed forms of labels or normative with long forms (for
example FeatureBlocks to Feature Blocks).

While there update conformance chapter.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
To keep messages in the order of the table of IDs, move ping definition
before event_device.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
@bertrand-marquis
Copy link
Collaborator Author

I updated the pull request with the following:

  • full normative rework including adding entries in conformance.tex
  • switch message definitions to use struct instead of tables: tell me if you think this is better, easy to revert
  • moved ping before event_device to have the right order
  • rework correlation chapter to simplify as said during last meeting
  • clear up message ID numbers by having numbers defined in tables to have clear range for msg/event/custom msg/event on both transport and bus messages

Copy link
Collaborator

@wmamills wmamills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ready for the PATCH V1

@wmamills wmamills self-requested a review January 15, 2026 10:19
Copy link
Collaborator

@wmamills wmamills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will approve and merge to the virtio-msg-rfc2 branch and then squash and prepare virtio-msg-patch1 branch

@wmamills wmamills merged commit 7891b6b into Linaro:virtio-msg-rfc2 Jan 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants