From: Viresh Kumar <viresh.kumar@linaro.org>
To: virtio-dev@lists.oasis-open.org,
Cornelia Huck <cohuck@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Cc: "Viresh Kumar" <viresh.kumar@linaro.org>,
"Vincent Guittot" <vincent.guittot@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
stratos-dev@op-lists.linaro.org,
"Erik Schilling" <erik.schilling@linaro.org>,
"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
"Mathieu Poirier" <mathieu.poirier@linaro.org>
Subject: [virtio-dev] [PATCH] virtio-transport: Clarify requirements
Date: Tue, 5 Dec 2023 15:50:51 +0530 [thread overview]
Message-ID: <3fbb010e96124cfbffd70709d9ce7a2a458322c8.1701771424.git.viresh.kumar@linaro.org> (raw)
The virtio documentation currently doesn't define any generic
requirements that are applicable to all transports. They can be useful
while adding support for a new transport.
This commit tries to define the same.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
content.tex | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 46 insertions(+), 2 deletions(-)
diff --git a/content.tex b/content.tex
index 0a62dce5f65f..d4d5e7d7045b 100644
--- a/content.tex
+++ b/content.tex
@@ -631,8 +631,52 @@ \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.
+The virtio devices are exposed to the guest as if they are physical
+devices using a specific transport method, like 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.. Virtio can use
+various different buses, thus the standard is split into virtio general
+and bus-specific sections.
+
+\section{Virtio Transport Requirements}\label{sec:Virtio Transport Options / Virtio Transport Requirements}
+
+\devicenormative{\subsection}{Virtio Transport Requirements}{Virtio Transport Options}
+
+The device MUST present each event, in a transport defined way, from the
+moment it takes place until the driver acknowledges the event.
+
+The device MUST NOT access virtqueue's contents before the driver
+notifies that the queue is ready for access, in a transport defined way.
+
+The device MUST NOT access buffers on the virtqueue, after it has
+modified them and notified the driver about their availability.
+
+The device MUST reset the virtqueues if requested by the driver, in a
+transport defined way.
+
+\drivernormative{\subsection}{Virtio Transport Requirements}{Virtio Transport Options}
+
+The driver MUST NOT access guest memory locations outside what's made
+available by the device to the driver.
+
+The driver MUST NOT write to the read-only memory area and MUST NOT read
+from the write-only memory area.
+
+The driver MUST acknowledge events presented by the device, as mandated
+by the transport.
+
+The driver MUST NOT access virtqueue contents before the device notifies
+about the readiness of the same.
+
+The driver MUST NOT 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.
+
+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.
\input{transport-pci.tex}
\input{transport-mmio.tex}
--
2.31.1.272.g89b43f80a514
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
next reply other threads:[~2023-12-05 10:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-05 10:20 Viresh Kumar [this message]
2023-12-05 13:18 ` [virtio-dev] Re: [PATCH] virtio-transport: Clarify requirements Cornelia Huck
2023-12-05 13:54 ` Alex Bennée
2023-12-18 13:12 ` Cornelia Huck
2023-12-18 14:09 ` Alex Bennée
2023-12-20 12:43 ` Cornelia Huck
2023-12-06 9:43 ` Viresh Kumar
2023-12-18 7:00 ` Viresh Kumar
2023-12-18 14:02 ` Cornelia Huck
2023-12-18 14:19 ` Alex Bennée
[not found] ` <8b278f33-4702-4a7c-bb80-e11c316234c4@linaro.org>
2023-12-20 13:50 ` Cornelia Huck
2024-01-29 10:35 ` Viresh Kumar
2024-01-29 16:22 ` Cornelia Huck
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=3fbb010e96124cfbffd70709d9ce7a2a458322c8.1701771424.git.viresh.kumar@linaro.org \
--to=viresh.kumar@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=cohuck@redhat.com \
--cc=erik.schilling@linaro.org \
--cc=manos.pitsidianakis@linaro.org \
--cc=mathieu.poirier@linaro.org \
--cc=mst@redhat.com \
--cc=stratos-dev@op-lists.linaro.org \
--cc=vincent.guittot@linaro.org \
--cc=virtio-dev@lists.oasis-open.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).