OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [PATCH v3] transitional issues: add new IDs for all devices


On Mon, Sep 23, 2013 at 06:27:46PM +0300, Michael S. Tsirkin wrote:
> non-transitional devices should have been able to simply update
> revision ID to make sure legacy drivers are not loaded.
> Unfortunately, mistakes were made:
> - we didn't stress that drivers must check revision ID,
>   and of course there's no easy way for drivers to
>   test this failure path,
>   so older versions of Windows drivers ignored revision
>   (latest vision matches revision correctly)
> - CCW lacks revision ID field
> 
> Both facts mean a non-transitional device would need
> a separate mechanism to prevent legacy drivers from
> loading.
> We aren't running out of device IDs yet, so
> let's use up some to resolve this.
> 
> I incremented all IDs by 0x100 intentionally -
> for the PCI bindings, this should help remind people they can't
> just stick the Subsystem ID into the low byte of the Device ID.
> 
> VIRTIO-34
> 
> Changes from v1:
> 	drop an unrelated chunk erroneously inserted here
> changes from v2:
> 	address Rusty's comments:
> 	use rfc-2119 MUST/SHOULD/MAY
> 	stress that all drivers match all devices,
> 	and add motivation
> 
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

So after seeing the complex tricks that each transport is
doing to solve compatibility problems, I am
really beginning to think we should just go back to this approach.

Two possible IDs for devices that same driver supports
is not at all unusual in the physical world.
It removes any need for drivers to play with versions:

devices that want to support old drivers use the old ID
and check feature bit _1 dynamically.

devices that do not want to support old drivers use the new ID.

Maybe this will be acceptable to people if we switch the additional
ID from 0x101 to 0x21 (so it fits in 1 byte)?

Let me phrase the question in this way: does anyone
have objections against allowing multiple IDs per
device in the spec? Specifically just the part below.

If people are ok with that we can discuss the
transitional issues separately.

> @@ -1126,37 +1126,65 @@ defined in this standard.
>  
>  Discovering what devices are available and their type is bus-dependent.
>  
> ++-------------+--------------------+
> +| Device IDs  |   Virtio Device    |
> ++-------------+--------------------+
> ++-------------+--------------------+
> +| 0x0         | reserved (invalid) |
>  +------------+--------------------+
> -| Device ID  |   Virtio Device    |
> +| 0x1, 0x101  |   network card     |
>  +------------+--------------------+
> +| 0x2, 0x102  |   block device     |
>  +------------+--------------------+
> -| 0          | reserved (invalid) |
> +| 0x3, 0x103  |      console       |
>  +------------+--------------------+
> -| 1          |   network card     |
> +| 0x4, 0x104  |  entropy source    |
>  +------------+--------------------+
> -| 2          |   block device     |
> +| 0x5, 0x105  | memory ballooning  |
>  +------------+--------------------+
> -| 3          |      console       |
> +| 0x6, 0x106  |     ioMemory       |
>  +------------+--------------------+
> -| 4          |  entropy source    |
> +| 0x7, 0x107  |       rpmsg        |
>  +------------+--------------------+
> -| 5          | memory ballooning  |
> +| 0x8, 0x108  |     SCSI host      |
>  +------------+--------------------+
> -| 6          |     ioMemory       |
> +| 0x9, 0x109  |   9P transport     |
>  +------------+--------------------+
> -| 7          |       rpmsg        |
> +| 0xA, 0x10A  |   mac80211 wlan    |
>  +------------+--------------------+
> -| 8          |     SCSI host      |
> +| 0xB, 0x10B  |   rproc serial     |
>  +------------+--------------------+
> -| 9          |   9P transport     |
> -+------------+--------------------+
> -| 10         |   mac80211 wlan    |
> -+------------+--------------------+
> -| 11         |   rproc serial     |
> -+------------+--------------------+
> -| 12         |   virtio CAIF      |
> +| 0xC, 0x10C  |   virtio CAIF      |
>  +------------+--------------------+
>  
> +Where multiple IDs specify a specific device type,
> +drivers MUST match all IDs for a given device type.
> +


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]