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] pci: reserve revision > 1


On Sun, Jun 01, 2014 at 11:09:19AM +0300, Michael S. Tsirkin wrote:
> If the proposed change to resolve VIRTIO-102 is accepted,
> devices can use all 16 bits of the subsystem device id for
> versioning. This makes it unnecessary to reserve revision ID for
> this purpose. Let's use it for the interface version again:
> it served us in the 0.X -> 1.X transition, will be handy for 1.X
> -> 2.X as well.
> 
> Require that devices have revision <= 1.
> Require that drivers not match devices with revision > 1.
> 
> This way, if devices ever want to make an incompatible change,
> they can prevent drivers from loading by incrementing the
> revision ID.
> 
> VIRTIO-109
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

OK it turns out our PCI Discovery is even messier than I thought,
and we will have to either stick to using the subsystem ID or
allocate a new ID range with cleaner allocation rules.

So after all, the interface version that we reserved wasn't helpful even
for 0.x -> 1.x and even for linux.
Self-NACK this patch, and I'll close the issue.


> ---
>  content.tex | 16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/content.tex b/content.tex
> index 7f1eecb..c16f79c 100644
> --- a/content.tex
> +++ b/content.tex
> @@ -969,6 +969,12 @@ indicates which virtio device is supported by the device.
>  The PCI Device ID is calculated by adding 0xFFF to the Virtio Device ID,
>  as indicated in section \ref{sec:Device Types}.
>  
> +The PCI Revision ID reflects the lowest interface version
> +supported by the device. This is to allow future backwards-incompatible
> +changes. Drivers check the device revision to avoid conflicts
> +with future versions of the specification.
> +
> +
>  \devicenormative{\subsubsection}{PCI Device Discovery}{Virtio Transport Options / Virtio Over PCI Bus / PCI Device Discovery}
>  
>  Devices MUST have the PCI Vendor ID 0x1AF4.
> @@ -981,8 +987,9 @@ has the PCI Device ID 0x1000.
>  The PCI Subsystem Vendor ID and the PCI Subsystem Device ID MAY reflect
>  the PCI Vendor and Device ID of the environment (for informational purposes by the driver).
>  
> -Non-transitional devices SHOULD have a PCI Revision ID of 1 or higher.
> -Non-transitional devices SHOULD have a PCI Subsystem Device ID of 0x40 or higher.
> +Devices MUST have the PCI Revision ID not higher than 1.
> +Non-transitional devices MUST have a PCI Revision ID of 1.
> +Non-transitional devices MUST have a PCI Subsystem Device ID of 0x40 or higher.
>  
>  This is to reduce the chance of a legacy driver attempting
>  to drive the device.
> @@ -992,12 +999,13 @@ Drivers MUST match devices with the PCI Vendor ID 0x1AF4 and
>  the PCI Device ID calculated by adding 0xFFF to the Virtio Device ID,
>  as indicated in section \ref{sec:Device Types}.
>  
> -Drivers MUST match devices with any Revision ID, and
> +Drivers MUST match devices with any Revision ID not higher than 1, and
>  MAY match devices with any Subsystem Vendor ID and
>  Subsystem Device ID, this is to allow devices to be
>  versioned without breaking drivers.
>  
> -Drivers MUST match any PCI Revision ID value.
> +Drivers MUST match any PCI Revision ID value that does not exceed 1.
> +Drivers MUST NOT match PCI Revision ID values higher than 1.
>  Drivers MAY match any PCI Subsystem Vendor ID and any
>  PCI Subsystem Device ID value.
>  
> -- 
> MST


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