Skip to content

Review v1/v0#31

Merged
wmamills merged 76 commits intoLinaro:virtio-msg-patch1from
bertrand-marquis:review-v1/v0
Apr 23, 2026
Merged

Review v1/v0#31
wmamills merged 76 commits intoLinaro:virtio-msg-patch1from
bertrand-marquis:review-v1/v0

Conversation

@bertrand-marquis
Copy link
Copy Markdown
Collaborator

@bertrand-marquis bertrand-marquis commented Feb 23, 2026

[PDF version of this branch as of 2026-04-23 2:00 UTC ]
Hi Everyone,

This pull request include a number of fixes or changes to handle the review comment we got on virtio mailing list.

Some points are not handled because they need a decision between us first (following summary was generated by chatgpt):

Ordering / Out‑of‑Order Feature Discussion

  • Parav Pandit proposes relaxing the strict request/response ordering because it is too constraining for high‑performance data paths. He suggests that the bus may need to deliver responses out of
    order, and the spec should support that for performance.
  • Demi Marie Obenour raises reset and out‑of‑order race risks if ordering is relaxed. She suggests a generation/stream number or bus‑level reset semantics to avoid stale or mis‑matched responses.
  • Michael S. Tsirkin recommends keeping v1 simple and introducing performance features via optional feature bits. This aligns with making relaxed ordering a negotiated capability rather than a
    baseline requirement.

Configuration Generation Optional Feature Discussion

  • Peter Hilber suggests making the SET_CONFIG generation count optional or dropping it, because Linux drivers assume config writes are not rejected and do not retry. His rationale is avoiding
    incompatibility with existing driver behavior.

VQ Enabled Flag Discussion

  • Peter Hilber suggests adding an explicit “queue enabled” indication in SET_VQUEUE (and also reporting it in GET_VQUEUE) so drivers can avoid an extra GET_VQUEUE round‑trip just to confirm
    enablement. This is aimed at reducing overhead in the initialization flow.

Device Number Size Discussion

  • Parav Pandit argues the 16‑bit device number is too small; he suggests 32‑bit to cover >64k devices and PCI BDF domain usage.
  • Demi Marie Obenour argues device identifiers should be 64‑bit or even 128‑bit to ensure long‑term uniqueness.
  • Peter Hilber highlights that reuse of device numbers after removal can cause races, and suggests adding a reuse‑limiting policy. He ties this to the broader question of expanding the device number
    space.

EVENT_CONFIG Data Mandatory Discussion

  • Demi Marie Obenour proposes making EVENT_CONFIG always include configuration data (MUST), to avoid a round trip. If data is mandatory, she notes that offset/length‑only signaling becomes
    unnecessary.
  • There is a noted contradiction with earlier guidance (Peter Hilber) and the current spec change ( I already updated the spec to require offset/length even when data is omitted, keeping data optional as I think this makes sense and i am not quite sure we can mandate the data without breaking compatibility with other transports or existing devices). This needs a clear decision.

Peter noted inconsistent use of “device number” vs “device ID”. I did not
find other ambiguous occurrences in transport-msg, so I added a sentence
explicitly distinguishing the bus-assigned device number from the virtio
device ID returned by GET_DEVICE_INFO.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Peter noted minor editorial issues (“Implement”/“respond”).
Update the Device bullet to “Implements” and “responds”.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Peter noted inconsistent naming. Update the virtio-msg revision wording
and paragraph title to consistently use “transport revision”.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Peter requested active-voice wording for the reserved header bits
requirement. Rephrase to make the bus implementation the subject.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Peter noted this requirement was already stated in the Initialization
Flow driver requirements. Remove the duplicate from the Device
Information driver requirements to avoid repetition.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Peter questioned “reset” on DEVICE_BUS_STATE_REMOVED. Rephrase the
intended-usage text to avoid implying a device reset after removal and
to focus on driver-side teardown.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Peter noted the spec implied “one or more” devices. Update the device
numbering section to allow zero devices, matching the earlier bus-layer
statement and hotplug use cases.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Demi suggested a non-normative note discouraging configuration space for
bulk data when a virtqueue can be used. Add a short explanatory note in
Device Configuration.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Parav requested symmetric naming for device hotplug events. Rename the
READY state to ADDED throughout the EVENT_DEVICE definition and related
text; values remain unchanged.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Peter asked whether transport feature bits are negotiated. Clarify that
the bus presents only the common subset and add a bus requirement to
advertise only mutually supported bits.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Peter asked whether devices may reset the configuration generation count.
Allow reset (including on device reset) and require drivers to avoid
assuming monotonic or persistent values.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Rephrase driver and device notification text to focus on which messages
are used, avoiding timing-specific requirements for EVENT_AVAIL,
EVENT_CONFIG, and EVENT_USED.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Strengthen EVENT_USED requirements to MUST, with explicit exceptions
for polling or other agreed-upon completion mechanisms.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Remove the runtime requirement to issue RESET_VQUEUE before
reprogramming a queue, since it does not avoid races.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Use le32 for admin_vq_start and admin_vq_count to match max_virtqueues.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
PROPOSAL: Clarify that echoed request parameters in responses are
informational and do not change the ordering-based correlation model.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Make device requirements explicit: if features are unsupported, the
device MUST clear FEATURES_OK in the status response.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Use le64 for shared memory length and address, and add a reserved
padding field aligned with existing message layouts.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Require EVENT_CONFIG to carry the affected offset/length even when
data is omitted, and update related guidance.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Clarify that DEVICE_NEEDS_RESET is reported via status updates without
repeating EVENT_CONFIG-specific requirements.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Require the bus to discard invalid bus msg_ids and leave transport
msg_id validation to the transport endpoints.

NOTE: I am unsure whether the explicit "MUST NOT validate transport msg_id"
line is necessary; please comment if a softer requirement is preferred.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Remove the redundant sentence in SET_DRIVER_FEATURES device requirements.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Add a non-normative description of bus-level rejection for forbidden
requests and how it can be surfaced to the driver.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Rephrase the Message Ordering requirements so the device, not the bus,
MUST send exactly one response per request. The bus ordering guarantee
remains unchanged.

Signed-off-by: Bertrand Marquis <Bertrand.Marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Add an explicit note that virtqueue descriptors and buffer data are
exchanged via shared memory or other DMA-accessible memory. Transport
messages remain control-plane only.

Signed-off-by: Bertrand Marquis <Bertrand.Marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Clarify that event notifications are independent and may be delivered
out of order with respect to other events, while request/response
ordering remains unchanged.

Signed-off-by: Bertrand Marquis <Bertrand.Marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Align virtqueue and shared-memory address wording with mmio/pci by
consistently referring to physical addresses throughout the virtio-msg
transport text and message definitions.

Signed-off-by: Bertrand Marquis <Bertrand.Marquis@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
… Pitsidianakis)

Manos Pitsidianakis noted that the generation-field comments should say
explicitly which negotiated feature controls the zero value.

Update the GET_CONFIG, SET_CONFIG, and EVENT_CONFIG generation field
comments to refer directly to
VIRTIO_MSG_F_STRICT_CONFIG_GENERATION instead of saying only "if not
negotiated".

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
…(Manos Pitsidianakis)

Manos Pitsidianakis questioned whether the ordering text around repeated
request parameters in responses should be normative.

Clarify instead that request/response association is the responsibility
of the bus, that the token field is bus-owned and may be used for
correlation or to compensate for transport-specific reordering, and that
repeated request parameters in response payloads may be used for
validation without affecting response association.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Reword to take into account latest changes done while trying to keep it
short.

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

@epilys
I pushed new changes to handle your comments, please review them and tell me if that is ok for you.

@epilys epilys self-requested a review April 9, 2026 07:49
@wmamills
Copy link
Copy Markdown
Collaborator

wmamills commented Apr 9, 2026

The file contains non-ascii characters again. None of the other files in the spec/project do.
You can find non-ASCII characters with a regular expression of [^\x00-\x7f] (I used VSCode but something similar should work in most editors.

The non-ASCII charaters currently are:

  1. smart/paired double quotes. These should be replaces with straight double quotes.
  2. em-dash or long dash. When used between numbers this should be replaced with simple dash. When used in paragraphs it COULD be replaced with dash but stylisticly I would prefer commas. I understand they are subtly different but I think the comma is just simpler for the reader. I could be convienced otherwise if there is any existing use of dash in paragraphs in the existing spec

@bertrand-marquis
Copy link
Copy Markdown
Collaborator Author

I will fix the non ascii issues.
I also did a global review through chatgpt and it came with some findings that i need to fix:

  • current generation count wording and handling is breaking the semantics compared to other virtio transport. We should not transmit it as 0 but only make the strict mode reject config set if its value is not the same (accept in non strict mode)
  • VIRTIO_F_NOTIF_CONFIG_DATA is PCI only and is not supported in our case (it is PCI only and we have no data field even though the virtqueue id one could be used). This is PCI only so we should just state that it is not supported
  • we have some inconsistencies on ownership between bus and transport to fix, in particular for get_device_info. To make this clear we should just provide device num available to the transport which should do the get_device_info and register the devices. This will make the layering cleaner and simpler (and fit with implementation).
  • there is some failure handling which is not quite clear, for example we say retry without saying that it should not be retried infinitely but fail after a timeout
  • get_vqueue handling for invalid virtqueue ids is not explicit
  • we have some terminology that must be removed/reworded (Rationale: for example)
  • we have some missing entries in conformance

I will make some patches to handle those and the ascii issue and submit them today or tomorrow

@wmamills
Copy link
Copy Markdown
Collaborator

wmamills commented Apr 9, 2026

I made this before I read your message. Feel free to ignore:
wmamills@06fe9f3

@wmamills
Copy link
Copy Markdown
Collaborator

wmamills commented Apr 9, 2026

I added a link to the PDF of the current version in the header of this PR. I will update when you do your update Bertrand.

Bill Mills noted that transport-msg.tex still contained non-ASCII
punctuation.

Replace sentence-interrupting Unicode dashes with commas, convert
numeric ranges to the single ASCII hyphen form used elsewhere in the
virtio spec, and normalize the remaining 0--31/32--63 range to that
same style.

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

Patches that i will push after this point are a bit invasive but are coming out of the experience i made writing a full PoC and out of deep reviews from chatgpt 4.
We might not want all of these but i think the final status is a lot cleaner and clear with a lot of corner cases now handled precisely in the spec.
Please give your view. I am ok to discard them if you think those are to invasive (but keep the fixes for bill finding on ascii).

Clarify which responsibilities belong to the bus versus the transport
layer, tighten error signaling and completion rules, and define how
common message IDs, tokens, and repeated request fields are used for
request/response association.

State that each valid supported request completes with exactly one
protocol response or a transport-visible failure, and keep the related
driver and device conformance references aligned with that model.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Clarify how EVENT_AVAIL, EVENT_CONFIG, and EVENT_USED are used when
endpoints choose event-driven notifications versus polling-only
operation, and make any bus-side forwarding, polling, or synthesized
delivery transparent to the transport-visible semantics.

Also define the EVENT_AVAIL notification-data encoding, require per
driver/device request ordering through the bus plus receive-order
processing at the device, and fold the related conformance references
into the same patch.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Keep GET_DEVICE_INFO as the only early-discovery transport message,
separate transport feature bits from per-device feature negotiation,
and align the rest of initialization with the core virtio reset,
status, feature negotiation, FEATURES_OK, and DRIVER_OK flow.

Also require GET_DEVICE_INFO to cover all offered feature bits and to
bound max_virtqueues, and define SET_DRIVER_FEATURES as addressed-block
updates that may be accumulated across multiple requests before
FEATURES_OK.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Require devices to implement GET_SHM even though drivers may treat it
as optional, rename the shared-memory region identifier fields to
shmid to match core virtio terminology, and define unsupported shmid
responses as zero-length regions.

This makes shared-memory capability discovery explicit and keeps
unsupported-region handling deterministic for drivers.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Align configuration generation handling, SET_CONFIG, EVENT_CONFIG, and
device-status behavior more closely with the core virtio model.

Make nonzero SET_CONFIG writes all-or-nothing, keep strict generation
mismatch handling optional, add explicit driver rules for
GET_DEVICE_STATUS and GET_VQUEUE, and limit EVENT_CONFIG status
notifications to device-originated asynchronous changes.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Define deterministic GET_VQUEUE sentinel values for unavailable,
unimplemented, or out-of-range queues, clarify how GET_DEVICE_INFO
reports local administration virtqueue ranges, and tighten SET_VQUEUE
handling for invalid or unsupported updates.

Also make invalid SET_VQUEUE requests and unsupported RESET_VQUEUE
requests explicit no-op empty responses so reconfiguration and recovery
semantics remain deterministic.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Define count=0 as a valid GET_DEVICES request and response case,
clarify empty-bitmap handling for reduced windows, and require
next_offset to be 0 for terminal responses or strictly greater than
the request offset for nonterminal responses.

This removes zero-progress enumeration loops while preserving the
existing sparse-window response model.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Rewrite touched informative text to use neutral specification wording
and consistent virtio-msg terminology without changing wire format,
labels, or normative behavior.

Clean up the configuration, notification, initialization, and
GET_DEVICES explanations so reviewers can focus later patches on
semantic changes rather than editorial churn.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Mention the reviewer names and tighten a bit the list to reflect the
final result without intermediate states as we will merge everything
together.

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

@bertrand-marquis you have updated the virtio-msg FFA spec link in the cover letter but I don't see it added to the bibliography as we had discussed

Restore the 8-byte common header and 16-bit device-number model for
virtio-msg.

Revert bus-message device-number payloads and size bounds that were
widened for the 64-bit direction.

Document that larger deployments can scale with multiple bus instances
instead of a wider dev_num field.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Define GET_DEVICE_FEATURES as device-offered features and
SET_DRIVER_FEATURES as the driver-selected subset.

Keep FEATURES_OK as the point where the device accepts or rejects
the negotiated set.

Remove wording that implied GET_DEVICE_FEATURES later reflects
negotiated state.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Reference the Virtio Message Bus over FF-A specification through the
normative bibliography using a distinct FFA-BUS citation tag.

Attribute the DEN0153 document to Arm and keep the transport chapter
citing the bibliography entry instead of a raw URL.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Mention that we are not increasing dev_num size and mention the solution
using multiple bus instances instead.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Update common-spec text so Virtio Over Messages is referenced
from the core device facilities and introduction.

This is a proposal for changes in the virtio common
specification to properly insert the virtio message transport
in the transport-neutral text.

Keep the change minimal for now:
- update content.tex to mention Virtio Over Messages in the
  transport list and in VIRTIO_F_ADMIN_VQ text
- update introduction.tex to mention message-based transports

We could also adapt newtransport.tex, but that is intentionally
left out here to keep the proposal minimal.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Copy link
Copy Markdown
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.

In the April 23 meeting it was agreed to accept this PR as is and do any additional fix-up needed as additional PRs if needed.

@wmamills wmamills merged commit 8a2ca3a into Linaro:virtio-msg-patch1 Apr 23, 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