All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: virtio-dev@lists.oasis-open.org, Paolo Bonzini <bonzini@gnu.org>,
	anthony.xu@intel.com, acrn-dev@lists.projectacrn.org,
	acrn-tsc@lists.projectacrn.org, wei.a.deng@intel.com
Subject: [virtio-dev] reserving virtio device IDs (was Re: [virtio] [PATCH] Reserve id for virtio-audio device)
Date: Mon, 29 Jul 2019 07:20:37 -0400	[thread overview]
Message-ID: <20190729062417-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20190326094106.17760-1-pbonzini@redhat.com>

On Tue, Mar 26, 2019 at 10:41:06AM +0100, Paolo Bonzini wrote:
> From: Paolo Bonzini <bonzini@gnu.org>
> 
> Project ACRN has a virtio-audio device. Unfortunately, the id they are using is
> already reserved in the virtio specification, but it is nevertheless useful to
> have one.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  content.tex | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/content.tex b/content.tex
> index ede0ef6..96e2bad 100644
> --- a/content.tex
> +++ b/content.tex
> @@ -2634,6 +2634,8 @@ Device ID  &  Virtio Device    \\
>  \hline
>  24         &   Memory device \\
>  \hline
> +25         &   Audio device \\
> +\hline
>  \end{tabular}
>  
>  Some of the devices above are unspecified by this document,


Below's the list of virtio ids used by project ACRN.

Dear project acrn developers, would you like to reserve virtio device
IDs in use by your project?  The process is quite easy, minimally
subscribe to virtio-comment and then email virtio-comment mailing list.

If you want to go the extra mile you can prepare a spec patch along the
lines shown above by Paolo.

This of course only makes sense assumes you are ready to settle on
specific IDs and interested in interoperating with drivers written by
others.  If not I wonder whether your purpose could be best served by the
experimental range.


I am concerned that projects assigning themselves IDs without being
listed in a central place will sooner or later lead to incorrect drivers
loading on incorrect devices.

More specifically, it looks like you are implementing legacy virtio
devices (not 1.0 spec compliant) in the hypervisor. That's of course
your choice but in that case I think it would be preferable to use ID
values below 0x1040, which have been reserved for this purpose. In
particular that will allow adding virtio 1.0 support with minimal pain
down the road.

Here's a list of IDs I found in the source:


#define	VIRTIO_DEV_RPMB		0x8601
#define	VIRTIO_DEV_HECI		0x8602
#define	VIRTIO_DEV_AUDIO	0x8603
#define	VIRTIO_DEV_IPU		0x8604
#define	VIRTIO_DEV_TSN		0x8605
#define	VIRTIO_DEV_HYPERDMABUF	0x8606
#define	VIRTIO_DEV_HDCP		0x8607
#define	VIRTIO_DEV_COREU	0x8608
#define	VIRTIO_DEV_GPIO		0x8609
#define VIRTIO_DEV_I2C		0x860a


Does this reflect what you are using now?  Also, would you happen to
know whether the ID 25 is used anywhere?  That would correspond to PCI
IDs 0x1059 (modern) or 0x19 (legacy/transitional).

Thanks in advance!
-- 
MST

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


           reply	other threads:[~2019-07-29 11:20 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20190326094106.17760-1-pbonzini@redhat.com>]

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=20190729062417-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=acrn-dev@lists.projectacrn.org \
    --cc=acrn-tsc@lists.projectacrn.org \
    --cc=anthony.xu@intel.com \
    --cc=bonzini@gnu.org \
    --cc=pbonzini@redhat.com \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=wei.a.deng@intel.com \
    /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.