From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NfEVm-0006UC-3H for qemu-devel@nongnu.org; Wed, 10 Feb 2010 10:29:54 -0500 Received: from [199.232.76.173] (port=60503 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfEVl-0006Tw-QX for qemu-devel@nongnu.org; Wed, 10 Feb 2010 10:29:53 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NfEVi-0002SF-Vd for qemu-devel@nongnu.org; Wed, 10 Feb 2010 10:29:52 -0500 Received: from mail.valinux.co.jp ([210.128.90.3]:46714) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NfEVg-0002Rl-JA for qemu-devel@nongnu.org; Wed, 10 Feb 2010 10:29:48 -0500 Date: Thu, 11 Feb 2010 00:30:22 +0900 From: Isaku Yamahata Message-ID: <20100210153022.GA4897@valinux.co.jp> References: <20100210065930.GK22624@valinux.co.jp> <20100210094548.GE14063@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100210094548.GE14063@redhat.com> Subject: [Qemu-devel] Re: [PATCH] pci: introduce get_dev_dict callback. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Blue Swirl , qemu-devel@nongnu.org On Wed, Feb 10, 2010 at 11:45:48AM +0200, Michael S. Tsirkin wrote: > On Wed, Feb 10, 2010 at 03:59:30PM +0900, Isaku Yamahata wrote: > > This patch fixes 525e05147d5a3bdc08caa422d108c1ef71b584b5 > > Could you please clarify what exactly is the bug, > and how this patch fixes it? How about the following? The change set of 525e05147d5a3bdc08caa422d108c1ef71b584b5 wrongly assumes that pci host bridge class device has header type of pci-pci bridge. But this isn't true. In fact i440fx pci host bridge has header type of normal device. Header type should be checked, instead of device class. The change set's purpose is to show PBM pci host bridge info which doesn't conform to PCI specification. So introduce get_info_quirk callback and use it for PBM. > > by introducing device specific get_dev_dict callback. > > pci host bridge doesn't always have header type of bridge. > > > > Especially PBM which is emulated doesn't conform to PCI spec > > at the moment. So by introducing get_dev_dict, allow each pci device > > to return specific infos. > > This patch also makes it easier to enhance info pci command in the future. > > For example returning pcie stuff. > > > > Cc: Blue Swirl > > Cc: "Michael S. Tsirkin" > > Signed-off-by: Isaku Yamahata > > If the idea is to allow quirk mode, how about we call the hook > get_info_quirk, and only use it for non-spec compliant devices? > The point being making it clear that most devices should not use it. Ok. I'll respin the patch with get_info_quirk. -- yamahata