So the benefit as I see it would be that qemu will be able to list
supported devices by vendor id etc.
lspci has a database of readable vendor/device strings,
maybe we can import that.
And we could sort by device type, that's also helpful.

header type/prog interface  - not so sure.

On Fri, Apr 08, 2011 at 09:53:00PM +0900, Isaku Yamahata wrote:
> diff --git a/hw/pci.h b/hw/pci.h
> index c6a6eb6..f945798 100644
> --- a/hw/pci.h
> +++ b/hw/pci.h
> @@ -433,6 +433,15 @@ typedef struct {
>      PCIConfigReadFunc *config_read;
>      PCIConfigWriteFunc *config_write;
>  
> +    uint16_t vendor_id;
> +    uint16_t device_id;
> +    uint8_t revision;

This is good.

> +    uint8_t prog_interface;

Not sure about this one. What is wrong

> +    uint16_t class_id;

This is good.

> +    uint8_t header_type;

We have a flag for bridge already, right?
Let's fill this in automatically then.

> +    uint16_t subsystem_vendor_id;       /* only for header type = 0 */
> +    uint16_t subsystem_id;              /* only for header type = 0 */

add an assert then?

> +
>      /*
>       * pci-to-pci bridge or normal device.
>       * This doesn't mean pci host switch.
> -- 
> 1.7.1.1

Reply via email to