qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/7] pci: move ids of config space into PCIDeviceInfo
Date: Thu, 5 May 2011 15:48:53 +0300	[thread overview]
Message-ID: <20110505124853.GB30119@redhat.com> (raw)
In-Reply-To: <744e7922dc2a3259fd2fd371c1de3077c63c0a5a.1302266896.git.yamahata@valinux.co.jp>

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	other threads:[~2011-05-05 12:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08 12:52 [Qemu-devel] [PATCH 0/7] pci: initialize ids in pci common code Isaku Yamahata
2011-04-08 12:53 ` [Qemu-devel] [PATCH 1/7] pci: move ids of config space into PCIDeviceInfo Isaku Yamahata
2011-05-05 12:48   ` Michael S. Tsirkin [this message]
2011-04-08 12:53 ` [Qemu-devel] [PATCH 2/7] usb-uhci: convert to PCIDEviceInfo to initialize ids Isaku Yamahata
2011-04-08 12:53 ` [Qemu-devel] [PATCH 3/7] eepro100: convert to PCIDeviceInfo " Isaku Yamahata
2011-04-08 12:53 ` [Qemu-devel] [PATCH 4/7] dec_pci: " Isaku Yamahata
2011-04-08 12:53 ` [Qemu-devel] [PATCH 5/7] apb_pci: " Isaku Yamahata
2011-04-08 12:53 ` [Qemu-devel] [PATCH 6/7] ide/piix: " Isaku Yamahata
2011-04-08 12:53 ` [Qemu-devel] [PATCH 7/7] vmware_vga.c: " Isaku Yamahata
2011-05-05 12:41 ` [Qemu-devel] [PATCH 0/7] pci: initialize ids in pci common code Michael S. Tsirkin
2011-05-05 15:52   ` Isaku Yamahata

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110505124853.GB30119@redhat.com \
    --to=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yamahata@valinux.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).