[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/7] pci: move ids of config space into PCIDevic
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH 1/7] pci: move ids of config space into PCIDeviceInfo |
Date: |
Thu, 5 May 2011 15:48:53 +0300 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH 1/7] pci: move ids of config space into PCIDeviceInfo,
Michael S. Tsirkin <=