From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHxzQ-0004Po-1u for qemu-devel@nongnu.org; Thu, 05 May 2011 08:49:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHxzP-0006yC-A4 for qemu-devel@nongnu.org; Thu, 05 May 2011 08:49:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8268) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHxzP-0006y6-1n for qemu-devel@nongnu.org; Thu, 05 May 2011 08:49:07 -0400 Date: Thu, 5 May 2011 15:48:53 +0300 From: "Michael S. Tsirkin" Message-ID: <20110505124853.GB30119@redhat.com> References: <744e7922dc2a3259fd2fd371c1de3077c63c0a5a.1302266896.git.yamahata@valinux.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <744e7922dc2a3259fd2fd371c1de3077c63c0a5a.1302266896.git.yamahata@valinux.co.jp> Subject: Re: [Qemu-devel] [PATCH 1/7] pci: move ids of config space into PCIDeviceInfo List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: qemu-devel@nongnu.org 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