From: Matias Ezequiel Vara Larsen <mvaralar@redhat.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
virtio-comment@lists.linux.dev,
"Vincent Guittot" <vincent.guittot@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
stratos-dev@op-lists.linaro.org,
"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
"Cornelia Huck" <cohuck@redhat.com>
Subject: Re: [PATCH V3 Resend] virtio-transport: Clarify requirements
Date: Wed, 29 May 2024 13:12:40 +0200 [thread overview]
Message-ID: <ZlcNqO1ZxmGuUhVO@fedora> (raw)
In-Reply-To: <20240529102424.s7rnq7zqqjy6bfdw@vireshk-i7>
Hello,
I added very minor comments.
On Wed, May 29, 2024 at 03:54:24PM +0530, Viresh Kumar wrote:
> On 21-05-24, 07:40, Michael S. Tsirkin wrote:
> > I feel a non-normative section is enough for this.
> > Just convert should/must to direct speech.
>
> Like this ?
>
> diff --git a/content.tex b/content.tex
> index 0a62dce5f65f..8af005398877 100644
> --- a/content.tex
> +++ b/content.tex
> @@ -631,8 +631,84 @@ \section{Device Cleanup}\label{sec:General Initialization And Device Operation /
>
> \chapter{Virtio Transport Options}\label{sec:Virtio Transport Options}
>
> -Virtio can use various different buses, thus the standard is split
> -into virtio general and bus-specific sections.
> +Devices and drivers can use different transport methods to enable
> +interaction, for example PCI, MMIO, or Channel I/O. The transport
> +methods define various aspects of the communication between the device
> +and the driver, like device discovery, exchanging capabilities,
> +interrupt handling, data transfer, etc. For example, in a host/guest
> +architecture, the host might expose a device to the guest on a PCI bus,
> +and the guest will use a PCI-specific driver to interact with it.
> +
> +The standard contains sections describing the transport-agnostic parts
> +of virtio, and sections describing how individual transports implement
> +virtio.
> +
> +\section{Virtio Transport Requirements}\label{sec:Virtio Transport Options / Virtio Transport Requirements}
> +
> +\subsection{Transport Requirements}\label{sec:Virtio Transport Options / Virtio Transport Requirements / Transport Requirements}
> +
> +The transport provides a mechanism for the driver to discover the
> +device.
> +
> +The transport provides a mechanism for the driver to identify the device
> +type.
> +
> +The transport provides a mechanism for communicating virtqueue
> +configurations between the device and the driver.
> +
> +The transport allows multiple virtqueues per device. The number of
> +virtqueues for a pair of device-driver are governed by the individual
> +device protocol.
> +
> +The transport provides a mechanism that the device and the driver use to
> +access memory for implementing virtqueues.
> +
> +The transport provides a mechanism for the device to notify the driver
> +and a mechanism for the driver to notify the device, for example
> +regarding availability of a buffer on the virtqueue.
> +
> +The transport may provide a mechanism for the driver to initiate a reset
> +of the virtqueues and device.
> +
> +The transport provides a mechanism for the driver to read the device
> +status. The transport MUST provide a mechanism for the driver to change
> +the device status.
> +
> +The transport provides a mechanism to implement configuration space
> +between the device and the driver.
> +
> +\subsection{Device Requirements}\label{sec:Virtio Transport Options / Virtio Transport Requirements / Device Requirements}
> +
> +The device keeps any data associated with a device-initiated transaction
> +accessible to the driver until the driver acknowledges the transaction
> +to be complete.
> +
> +The device doesn't access the contents of a virtqueue before the driver
> +notifies, in a transport defined way, the device that the virtqueue is
> +ready to be accessed.
> +
> +The device doesn't access or modify buffers on a virtqueue after it has
> +notified the driver about their availability.
> +
> +The device resets the virtqueues if requested by the driver, in a
> +transport defined way, if the transport provides such a method.
> +
> +\subsection{Driver Requirements}\label{sec:Virtio Transport Options / Virtio Transport Requirements / Driver Requirements}
> +
> +The driver acknowledges device notifications, as mandated by the
> +transport.
> +
> +The driver doesn't access virtqueue contents before the device notifies
> +about the readiness of the same.
> +
> +The driver doesn't access buffers, after it has added them to the
> +virtqueue and notified the device about their availability. The driver
> +MAY access them after the device has processed them and notified the
> +driver of their availability, in a transport defined way.
> +
I think last sentence could be rewritten as:
- The driver accesses queued buffers after the device has processed them
and notified the driver of their availability. This mechanism is
transport defined.
> +The driver may ask the device to reset the virtqueues if, for example,
> +the driver times out waiting for a notification from the device for a
> +previously queued request.
>
I would rewrite last sentence as:
- The driver asks the device to reset the virtqueues if, for example,
the driver times out waiting for a notification from the device for a
previously queued request.
With that, LGTM!
Matias
next prev parent reply other threads:[~2024-05-29 11:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 9:29 [PATCH V3 Resend] virtio-transport: Clarify requirements Viresh Kumar
2024-05-20 9:42 ` Parav Pandit
2024-05-20 12:25 ` Michael S. Tsirkin
2024-05-20 12:29 ` Parav Pandit
2024-05-20 13:05 ` Michael S. Tsirkin
2024-05-21 6:44 ` Viresh Kumar
2024-05-20 10:20 ` Stefano Garzarella
2024-05-21 10:10 ` Viresh Kumar
2024-05-29 10:42 ` Stefano Garzarella
2024-05-30 6:37 ` Viresh Kumar
2024-05-20 13:27 ` Michael S. Tsirkin
2024-05-21 10:57 ` Viresh Kumar
2024-05-21 11:40 ` Michael S. Tsirkin
2024-05-21 12:25 ` Cornelia Huck
2024-05-29 10:24 ` Viresh Kumar
2024-05-29 11:12 ` Matias Ezequiel Vara Larsen [this message]
2024-05-30 6:36 ` Viresh Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZlcNqO1ZxmGuUhVO@fedora \
--to=mvaralar@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=cohuck@redhat.com \
--cc=manos.pitsidianakis@linaro.org \
--cc=mst@redhat.com \
--cc=stratos-dev@op-lists.linaro.org \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
--cc=virtio-comment@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox