From: "Michael S. Tsirkin" <mst@redhat.com>
To: virtio@lists.oasis-open.org, virtio-dev@lists.oasis-open.org
Subject: [virtio] [PATCH v7 05/11] content: generalize transport ring part naming
Date: Tue, 23 Jan 2018 02:01:04 +0200 [thread overview]
Message-ID: <1516665617-30748-5-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1515577653-9336-1-git-send-email-mst@redhat.com>
Replace descriptor table/available ring/used ring
with descriptor area/driver area/device area
in all transports.
Document what's in which area.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
content.tex | 61 ++++++++++++++++++++++++++++++++++++++--------------------
split-ring.tex | 6 +++---
2 files changed, 43 insertions(+), 24 deletions(-)
diff --git a/content.tex b/content.tex
index 4350ecf..9fc9673 100644
--- a/content.tex
+++ b/content.tex
@@ -245,6 +245,24 @@ a device event - i.e. send an interrupt to the driver.
Device reports the number of bytes it has written to memory for
each buffer it uses. This is referred to as ``used length''.
+Each virtqueue can consist of up to 3 parts:
+\begin{itemize}
+\item Descriptor Area - used for describing buffers
+\item Driver Area - extra data supplied by driver to the device
+\item Device Area - extra data supplied by device to driver
+\end{itemize}
+
+\begin{note}
+Note that previous versions of this spec used different names for
+these parts (following \ref{sec:Basic Facilities of a Virtio Device / Split Virtqueues}):
+\begin{itemize}
+\item Descriptor Table - for the Descriptor Area
+\item Available Ring - for the Driver Area
+\item Used Ring - for the Device Area
+\end{itemize}
+
+\end{note}
+
\input{split-ring.tex}
\chapter{General Initialization And Device Operation}\label{sec:General Initialization And Device Operation}
@@ -667,8 +685,8 @@ struct virtio_pci_common_cfg {
le16 queue_enable; /* read-write */
le16 queue_notify_off; /* read-only for driver */
le64 queue_desc; /* read-write */
- le64 queue_avail; /* read-write */
- le64 queue_used; /* read-write */
+ le64 queue_driver; /* read-write */
+ le64 queue_device; /* read-write */
};
\end{lstlisting}
@@ -728,13 +746,13 @@ struct virtio_pci_common_cfg {
\end{note}
\item[\field{queue_desc}]
- The driver writes the physical address of Descriptor Table here. See section \ref{sec:Basic Facilities of a Virtio Device / Virtqueues}.
+ The driver writes the physical address of Descriptor Area here. See section \ref{sec:Basic Facilities of a Virtio Device / Virtqueues}.
-\item[\field{queue_avail}]
- The driver writes the physical address of Available Ring here. See section \ref{sec:Basic Facilities of a Virtio Device / Virtqueues}.
+\item[\field{queue_driver}]
+ The driver writes the physical address of Driver Area here. See section \ref{sec:Basic Facilities of a Virtio Device / Virtqueues}.
-\item[\field{queue_used}]
- The driver writes the physical address of Used Ring here. See section \ref{sec:Basic Facilities of a Virtio Device / Virtqueues}.
+\item[\field{queue_device}]
+ The driver writes the physical address of Device Area here. See section \ref{sec:Basic Facilities of a Virtio Device / Virtqueues}.
\end{description}
\devicenormative{\paragraph}{Common configuration structure layout}{Virtio Transport Options / Virtio Over PCI Bus / PCI Device Layout / Common configuration structure layout}
@@ -1496,24 +1514,24 @@ All register values are organized as Little Endian.
See also p. \ref{sec:Virtio Transport Options / Virtio Over MMIO / MMIO-specific Initialization And Device Operation / Device Initialization}~\nameref{sec:Virtio Transport Options / Virtio Over MMIO / MMIO-specific Initialization And Device Operation / Device Initialization}.
}
\hline
- \mmiodreg{QueueDescLow}{QueueDescHigh}{Virtual queue's Descriptor Table 64 bit long physical address}{0x080}{0x084}{W}{%
+ \mmiodreg{QueueDescLow}{QueueDescHigh}{Virtual queue's Descriptor Area 64 bit long physical address}{0x080}{0x084}{W}{%
Writing to these two registers (lower 32 bits of the address
to \field{QueueDescLow}, higher 32 bits to \field{QueueDescHigh}) notifies
- the device about location of the Descriptor Table of the queue
+ the device about location of the Descriptor Area of the queue
selected by writing to \field{QueueSel} register.
}
\hline
- \mmiodreg{QueueAvailLow}{QueueAvailHigh}{Virtual queue's Available Ring 64 bit long physical address}{0x090}{0x094}{W}{%
+ \mmiodreg{QueueDriverLow}{QueueDriverHigh}{Virtual queue's Driver Area 64 bit long physical address}{0x090}{0x094}{W}{%
Writing to these two registers (lower 32 bits of the address
to \field{QueueAvailLow}, higher 32 bits to \field{QueueAvailHigh}) notifies
- the device about location of the Available Ring of the queue
+ the device about location of the Driver Area of the queue
selected by writing to \field{QueueSel}.
}
\hline
- \mmiodreg{QueueUsedLow}{QueueUsedHigh}{Virtual queue's Used Ring 64 bit long physical address}{0x0a0}{0x0a4}{W}{%
+ \mmiodreg{QueueDeviceLow}{QueueDeviceHigh}{Virtual queue's Device Area 64 bit long physical address}{0x0a0}{0x0a4}{W}{%
Writing to these two registers (lower 32 bits of the address
to \field{QueueUsedLow}, higher 32 bits to \field{QueueUsedHigh}) notifies
- the device about location of the Used Ring of the queue
+ the device about location of the Device Area of the queue
selected by writing to \field{QueueSel}.
}
\hline
@@ -1631,11 +1649,11 @@ The driver will typically initialize the virtual queue in the following way:
\item Notify the device about the queue size by writing the size to
\field{QueueNum}.
-\item Write physical addresses of the queue's Descriptor Table,
- Available Ring and Used Ring to (respectively) the
+\item Write physical addresses of the queue's Descriptor Area,
+ Driver Area and Device Area to (respectively) the
\field{QueueDescLow}/\field{QueueDescHigh},
- \field{QueueAvailLow}/\field{QueueAvailHigh} and
- \field{QueueUsedLow}/\field{QueueUsedHigh} register pairs.
+ \field{QueueDriverLow}/\field{QueueDriverHigh} and
+ \field{QueueDeviceLow}/\field{QueueDeviceHigh} register pairs.
\item Write 0x1 to \field{QueueReady}.
\end{enumerate}
@@ -2025,13 +2043,14 @@ struct vq_info_block {
be32 res0;
be16 index;
be16 num;
- be64 avail;
- be64 used;
+ be64 driver;
+ be64 device;
};
\end{lstlisting}
-\field{desc}, \field{avail} and \field{used} contain the guest addresses for the descriptor table,
-available ring and used ring for queue \field{index}, respectively. The actual
+\field{desc}, \field{driver} and \field{device} contain the guest
+addresses for the descriptor area,
+available area and used area for queue \field{index}, respectively. The actual
virtqueue size (number of allocated buffers) is transmitted in \field{num}.
\devicenormative{\paragraph}{Configuring a Virtqueue}{Virtio Transport Options / Virtio over channel I/O / Device Initialization / Configuring a Virtqueue}
diff --git a/split-ring.tex b/split-ring.tex
index 724bb82..acdee7d 100644
--- a/split-ring.tex
+++ b/split-ring.tex
@@ -15,9 +15,9 @@ of the queue.
Each virtqueue consists of three parts:
\begin{itemize}
-\item Descriptor Table
-\item Available Ring
-\item Used Ring
+\item Descriptor Table - occupies the Descriptor Area
+\item Available Ring - occupies the Driver Area
+\item Used Ring - occupies the Device Area
\end{itemize}
where each part is physically-contiguous in guest memory,
--
MST
---------------------------------------------------------------------
To unsubscribe from this mail list, you must leave the OASIS TC that
generates this mail. Follow this link to all your TCs in OASIS at:
https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php
next prev parent reply other threads:[~2018-01-23 0:01 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-10 9:47 [virtio] [PATCH v6 0/5] packed ring layout spec Michael S. Tsirkin
2018-01-10 9:47 ` [virtio] [PATCH v6 1/5] content: move 1.0 queue format out to a separate section Michael S. Tsirkin
2018-01-10 12:45 ` Cornelia Huck
2018-01-10 9:47 ` [virtio] [PATCH v6 2/5] content: move ring text out to a separate file Michael S. Tsirkin
2018-01-10 12:46 ` Cornelia Huck
2018-01-10 9:47 ` [virtio] [PATCH v6 3/5] content: move virtqueue operation description Michael S. Tsirkin
2018-01-10 12:48 ` Cornelia Huck
2018-01-10 9:47 ` [virtio] [PATCH v6 4/5] packed virtqueues: more efficient virtqueue layout Michael S. Tsirkin
2018-01-10 10:47 ` Cornelia Huck
2018-01-10 13:49 ` [virtio-dev] " Jens Freimann
2018-01-10 14:39 ` [virtio] " Michael S. Tsirkin
2018-01-10 14:08 ` Tiwei Bie
2018-01-10 14:39 ` [virtio] " Michael S. Tsirkin
2018-01-10 14:15 ` [virtio] " Cornelia Huck
2018-01-10 15:37 ` Michael S. Tsirkin
2018-01-10 9:47 ` [virtio] [PATCH v6 5/5] packed-ring: add in order request support Michael S. Tsirkin
2018-01-10 10:33 ` [virtio] [PATCH v6 0/5] packed ring layout spec Cornelia Huck
2018-01-10 11:10 ` Michael S. Tsirkin
2018-01-10 11:14 ` Cornelia Huck
2018-01-10 11:16 ` Michael S. Tsirkin
2018-01-23 0:01 ` [virtio] [PATCH v7 02/11] content: move ring text out to a separate file Michael S. Tsirkin
2018-01-30 10:07 ` Cornelia Huck
2018-01-23 0:01 ` [virtio] [PATCH v7 01/11] content: move 1.0 queue format out to a separate section Michael S. Tsirkin
2018-01-30 10:06 ` Cornelia Huck
2018-02-05 22:54 ` Halil Pasic
2018-02-06 0:05 ` Michael S. Tsirkin
2018-02-06 8:38 ` Cornelia Huck
2018-02-06 11:10 ` [virtio] Re: [virtio-dev] " Halil Pasic
2018-02-06 11:20 ` Cornelia Huck
2018-02-06 12:03 ` Halil Pasic
2018-02-06 22:58 ` Michael S. Tsirkin
2018-01-23 0:01 ` [virtio] [PATCH v7 03/11] content: move virtqueue operation description Michael S. Tsirkin
2018-01-30 10:12 ` Cornelia Huck
2018-01-23 0:01 ` [virtio] [PATCH v7 04/11] content: replace mentions of len with used length Michael S. Tsirkin
2018-01-30 10:16 ` Cornelia Huck
2018-01-30 16:38 ` Michael S. Tsirkin
2018-01-23 0:01 ` Michael S. Tsirkin [this message]
2018-01-30 10:27 ` [virtio] [PATCH v7 05/11] content: generalize transport ring part naming Cornelia Huck
2018-01-23 0:01 ` [virtio] [PATCH v7 06/11] content: generalize rest of text Michael S. Tsirkin
2018-01-30 10:31 ` Cornelia Huck
2018-01-30 16:40 ` Michael S. Tsirkin
2018-01-23 0:01 ` [virtio] [PATCH v7 07/11] split-ring: generalize text Michael S. Tsirkin
2018-01-30 10:45 ` Cornelia Huck
2018-01-30 16:42 ` Michael S. Tsirkin
2018-01-23 0:01 ` [virtio] [PATCH v7 08/11] packed virtqueues: more efficient virtqueue layout Michael S. Tsirkin
2018-01-30 7:16 ` [virtio-dev] " Tiwei Bie
2018-01-30 16:45 ` [virtio] " Michael S. Tsirkin
2018-01-30 13:07 ` Jens Freimann
2018-01-30 13:50 ` [virtio] " Cornelia Huck
2018-01-30 19:40 ` Michael S. Tsirkin
2018-02-01 3:05 ` [virtio-dev] " Tiwei Bie
2018-02-01 10:11 ` [virtio] " Cornelia Huck
2018-02-01 14:43 ` Michael S. Tsirkin
2018-02-05 11:54 ` Halil Pasic
2018-02-05 14:33 ` Michael S. Tsirkin
2018-02-05 16:57 ` Halil Pasic
2018-02-05 17:00 ` Paolo Bonzini
2018-02-05 18:16 ` Cornelia Huck
2018-02-05 18:21 ` Michael S. Tsirkin
2018-02-05 18:26 ` Cornelia Huck
2018-02-05 17:55 ` Michael S. Tsirkin
2018-02-05 22:57 ` [virtio] Re: [virtio-dev] " Halil Pasic
2018-01-23 0:01 ` [virtio] [PATCH v7 09/11] content: in-order buffer use Michael S. Tsirkin
2018-02-01 11:01 ` Cornelia Huck
2018-02-12 13:18 ` Stefan Hajnoczi
2018-01-23 0:01 ` [virtio] [PATCH v7 10/11] packed-ring: add in order support Michael S. Tsirkin
2018-02-02 11:03 ` Cornelia Huck
2018-02-12 13:22 ` Stefan Hajnoczi
2018-01-23 0:01 ` [virtio] [PATCH v7 11/11] split-ring: in order feature Michael S. Tsirkin
2018-02-02 11:06 ` Cornelia Huck
2018-02-12 13:23 ` Stefan Hajnoczi
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=1516665617-30748-5-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=virtio-dev@lists.oasis-open.org \
--cc=virtio@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