From: Cornelia Huck <cohuck@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>
Cc: virtio-comment@lists.oasis-open.org,
"Michael S . Tsirkin" <mst@redhat.com>,
Stefan Hajnoczi <stefanha@gmail.com>, Amit Shah <amit@kernel.org>
Subject: Re: [virtio-comment] [PATCH] virtio-rng: add a control queue
Date: Mon, 3 Aug 2020 15:57:29 +0200 [thread overview]
Message-ID: <20200803155729.4d30fb01.cohuck@redhat.com> (raw)
In-Reply-To: <20200803132431.139149-1-lvivier@redhat.com>
On Mon, 3 Aug 2020 15:24:31 +0200
Laurent Vivier <lvivier@redhat.com> wrote:
> A control queue is needed to send command to ask the device to
> release the request buffers if it cannot provide data.
>
> Changes:
>
> 5.4.2 Virtqueues
> 0 requestq
> 1 controlq
> controlq only exists if VIRTIO_RNG_F_CTRL_VQ set.
>
> 5.4.3 Feature bits
> VIRTIO_RNG_F_CTRL_VQ (0)
> Device has a control queue
>
> 5.4.5 Device Initialization
> Identify and initialize the request virtqueue.
> If the VIRTIO_RNG_F_CTRL_VQ feature bit is negotiated,
> identify the control virtqueue.
>
> 5.4.6.3 Control Virtqueue
> The driver uses the control virtqueue (if VIRTIO_RNG_F_CTRL_VQ is negotiated)
> to send commands to control the device.
> All commands are of the following form:
> struct virtio_rng_ctrl_hdr {
> u8 cmd;
> };
>
> 5.4.6.3.1 Request Virtqueue Flushing
> When the device is not able to provide enough entropy to the driver,
> the driver can be stuck. And for instance, it cannot be removed from the
> system to switch to another one. The flush command allows the driver to ask
> the device to release all the buffers sent to the device and to unlock the
> driver.
> #define VIRTIO_RNG_CMD_FLUSH 0
>
> Bug-Link: https://github.com/oasis-tcs/virtio-spec/issues/83
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
> content.tex | 38 ++++++++++++++++++++++++++++++++++++--
> 1 file changed, 36 insertions(+), 2 deletions(-)
(...)
> +\paragraph{Request Virtqueue Flushing}\label{sec:Device Types / Entropy Device / Device Operation / Control Virtqueue / Request Virtqueue Flushing}
> +
> +When the device is not able to provide enough entropy to the driver, the driver can be stuck.
> +And for instance, it cannot be removed from the system to switch to another one.
Maybe
"...the driver may be stuck waiting for the device returning buffers,
and cannot be removed..." ?
> +The flush command allows the driver to ask the device to release all the buffers sent to the
> +device and to unlock the driver.
What does "unlock the driver" mean?
You'll probably also want a device normative statement for that, something like
"When the driver sends a flush request, the device MUST release all
outstanding buffers."
> +
> +\begin{lstlisting}
> +#define VIRTIO_RNG_CMD_FLUSH 0
> +\end{lstlisting}
As we (currently) have only that one command, I think we need to
specify that (a) negotiation of the CTRL_VQ feature implies that the
flush command is available, and that (b) any other value of cmd should
(must?) be ignored by the device. (I'd assume that new commands would
require new feature bits.)
> +
> \section{Traditional Memory Balloon Device}\label{sec:Device Types / Memory Balloon Device}
>
> This is the traditional balloon device. The device number 13 is
This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.
In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.
Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/
next prev parent reply other threads:[~2020-08-03 13:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-03 13:24 [virtio-comment] [PATCH] virtio-rng: add a control queue Laurent Vivier
2020-08-03 13:57 ` Cornelia Huck [this message]
2020-08-03 15:00 ` Laurent Vivier
2020-08-03 15:48 ` 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=20200803155729.4d30fb01.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=amit@kernel.org \
--cc=lvivier@redhat.com \
--cc=mst@redhat.com \
--cc=stefanha@gmail.com \
--cc=virtio-comment@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.