Next in thread → Next in month →

Re: [virtio-dev] [PATCHv2] pci: switch from subsystem id to device id

From
Rusty Russell <>
Date
2014-06-03T06:28:42+00:00
ID
Thread
Re: [virtio-dev] [PATCHv2] pci: switch from subsystem id to device id
"Michael S. Tsirkin" <> writes:
> Switch virtio pci to use standard device id instead of using the
> subsystem id.

> +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
> +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 Revision ID value. 
> +Drivers MUST match any PCI Revision ID value.
> +Drivers MAY match any PCI Subsystem Vendor ID and any
> +PCI Subsystem Device ID value.

Looks like those last two are a repeated paragraph?

Otherwise it looks reasonable.

Here's a diagram of my current understanding:

 +----------------+----------------+
 |  Device ID     | Vendor ID      |
 +----------------+----------------+
 |  Status        | Command        |
 +----------------+----------------+
 |  Class code            | Rev ID |
 +----------------+----------------+
 | BIST  |Header T|Lat tim|Cache LS|
 +----------------+----------------+
 |  Base Address registers         |
 |                                 |
 |                                 |
 |                                 |
 |                                 |
 |                                 |
 +----------------+----------------+
 |  Cardbus CIS Pointer            |
 +----------------+----------------+
 |Subsys Device ID|Subsys Vendor ID|
 +----------------+----------------+
...

Old spec:
        Device ID: 0x1000 - 0x103F (val ignored)
        Vendor ID: 0x1AF4
        Subsys Device ID: virtio type (eg. 1 - 13)
        Subsys Vendor ID: device author
        Revision ID: 0 (transitional) 1 (non-trans)

Proposed spec:
        Device ID: 0x1000 - 0x103F (== type + 0x0FFF)
        Vendor ID: 0x1AF4
        Subsys Device ID: virtio type (trans) 0x40+ (non-trans)
        Subsys Vendor ID: device author
        Revision ID: 0 (transitional) any (non-trans)

Thanks!
Rusty.
Next in thread → Next in month →