From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=37296 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGUte-00081z-DZ for qemu-devel@nongnu.org; Thu, 11 Nov 2010 06:00:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PGUtd-0004jR-BG for qemu-devel@nongnu.org; Thu, 11 Nov 2010 06:00:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:17648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PGUtd-0004j9-21 for qemu-devel@nongnu.org; Thu, 11 Nov 2010 06:00:49 -0500 Message-ID: <4CDBCCD1.6020608@redhat.com> Date: Thu, 11 Nov 2010 12:00:33 +0100 From: Gerd Hoffmann MIME-Version: 1.0 References: <1289409261-5418-1-git-send-email-gleb@redhat.com> <1289409261-5418-9-git-send-email-gleb@redhat.com> <20101110173412.GE3891@redhat.com> <4CDBC045.3070902@redhat.com> <20101111101717.GW9036@redhat.com> In-Reply-To: <20101111101717.GW9036@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCHv3 08/14] Add get_fw_dev_path callback for pci bus. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gleb Natapov Cc: kvm@vger.kernel.org, "Michael S. Tsirkin" , armbru@redhat.com, qemu-devel@nongnu.org, blauwirbel@gmail.com, alex.williamson@redhat.com >> Oh, we already have a table to map pci classes to descriptions for >> 'info pci'. I'd strongly suggest to just add the fw names to that >> table instead of creating a second one ... >> > Do you mean pci_class_descriptions? Exactly. > For some classes open firmware spec > defines single name for all subclasses. For instance all 0Axx should be > called "dock" no matter what xx is. This can't be encoded in a simple > table. Well, actually it is a list not a table. Should be easy to extend, like adding a mask, so you can have { .class = 0xa000, .mask = 0xff00, .fw_name = "dock", .desc = "whatever" } to match 0xA0xx ... cheers, Gerd