[virtio-dev] Re: [PATCH v3 1/4] Add virtio Admin virtqueue

2022-02-03 Thread Cornelia Huck
On Thu, Feb 03 2022, Max Gurtovoy  wrote:

> In one of the many use cases a user wants to manipulate features and
> configuration of the virtio devices regardless of the device type
> (net/block/console). Some of this configuration is generic enough. i.e
> Number of MSI-X vectors of a virtio PCI VF device. There is a need to do
> such features query and manipulation by its parent PCI PF.
>
> Currently virtio specification defines control virtqueue to manipulate
> features and configuration of the device it operates on. However,
> control virtqueue commands are device type specific, which makes it very
> difficult to extend for device agnostic commands.
>
> To support this requirement in elegant way, this patch introduces a new
> admin virtqueue interface. Admin virtqueue is proposed as one of the
> interfaces to issue admin commands that have the same command format for
> all type of virtio devices.
>
> Manipulate features via admin virtqueue is asynchronous, scalable, easy
> to extend and doesn't require additional and expensive on-die resources
> to be allocated for every new feature that will be added in the future.
>
> Subsequent patches make use of this admin virtqueue.
>
> Reviewed-by: Parav Pandit 
> Signed-off-by: Max Gurtovoy 
> ---
>  admin.tex   | 94 +
>  conformance.tex |  1 +
>  content.tex |  8 +++--
>  3 files changed, 101 insertions(+), 2 deletions(-)
>  create mode 100644 admin.tex
>
> diff --git a/admin.tex b/admin.tex
> new file mode 100644
> index 000..fa9c993
> --- /dev/null
> +++ b/admin.tex
> @@ -0,0 +1,94 @@

[some wording only, have not yet thought about the rest]

> +\section{Admin Virtqueues}\label{sec:Basic Facilities of a Virtio Device / 
> Admin Virtqueues}
> +
> +Admin virtqueue is one of the management interface that used to send 
> administrative

"An admin virtqueue is a management interface of a device that can be used..."

> +commands to manipulate various features of the device and/or to manipulate
> +various features, if possible, of another device within the same group (e.g. 
> PCI VFs

Maybe add

"Which devices are actually considered a group is transport specific."

?

> +of a parent PCI PF device are grouped together. These devices can be 
> optionally
> +managed by its parent PCI PF using its admin virtqueue.).

I would move the content in the brackets to a separate paragraph. Maybe

"An example of a group is PCI virtual functions (VFs) being grouped
together with their parent PCI physical function (PF). These VFs can be
optionally managed by their parent PF using its admin virtqueue."

> +
> +An admin virtqueue exists for a certain device if VIRTIO_F_ADMIN_VQ is
> +negotiated. The index of the admin virtqueue exposed by the device in a

s/exposed/is exposed/

> +transport specific manner.
> +
> +When VIRTIO_F_ADMIN_VQ is negotiated with the device, driver will send all 
> admin commands
> +through the admin virtqueue.

That sounds a bit like the driver might use an alternative interface for
the admin commands as well? What about

"If VIRTIO_F_ADMIN_VQ has been negotiated, the driver used the admin
virtqueue to send admin commands."


-
To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org



Re: [virtio-dev] virtio-snd spec question

2022-02-03 Thread Stefan Hajnoczi
On Tue, Feb 01, 2022 at 03:57:10PM -0800, Roman Kiryanov wrote:
> Hello,
> 
> I work in Android Studio Emulator and I am currently implementing a
> virtio-snd device. We found a spec draft here:
> 
> https://github.com/oasis-tcs/virtio-spec/commit/e73c8cdf3e822fd83c26c6de964a947670f93cc3#diff-73045e70aeaf45f93087610437b705e2d320c82a9d29b4027721f5f5f3918dc5
> 
> It mentions four virtqueues: ctl, event, rx and tx. It is not very clear
> where a virtio-snd device should put responses to the ctl requests from the
> linux kernel driver. There is a kernel driver implementation and we have a
> virtio-snd device implemented in another emulator, it uses the same
> virtqueue (ctl) to put ctl responses and the current kernel driver seems
> happy with this.
> 
> Do you know if this is expected behavior? I am far from an expert here, but
> I believe the device and the kernel will race here by reading from the same
> virtqueue: the device could read VirtQueueElement produced by itself before
> the kernel if the kernel is not fast enough.

CCing Anton and Shreyansh.

Stefan


signature.asc
Description: PGP signature