Received: from eggs.gnu.org ([2001:4830:134:3::10]:48867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhuXL-0003UU-IW for qemu-devel@nongnu.org; Tue, 14 Apr 2015 02:41:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YhuXG-0004EL-0Z for qemu-devel@nongnu.org; Tue, 14 Apr 2015 02:41:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34164) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhuXF-0004Dh-QC for qemu-devel@nongnu.org; Tue, 14 Apr 2015 02:41:25 -0400 Date: Tue, 14 Apr 2015 08:41:18 +0200 From: "Michael S. Tsirkin" Message-ID: <20150414083617-mutt-send-email-mst@redhat.com> References: <1428436304-24044-1-git-send-email-minyard@acm.org> <1428436304-24044-11-git-send-email-minyard@acm.org> <20150412160524.GA13212@redhat.com> <552B1B56.1000709@acm.org> <20150413085824-mutt-send-email-mst@redhat.com> <552BF029.4040609@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <552BF029.4040609@acm.org> Subject: Re: [Qemu-devel] [PATCH 10/15] smbios: Add a function to directly add an entry List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Corey Minyard Cc: Corey Minyard , qemu-devel@nongnu.org On Mon, Apr 13, 2015 at 11:34:49AM -0500, Corey Minyard wrote: > On 04/13/2015 02:00 AM, Michael S. Tsirkin wrote: > > On Sun, Apr 12, 2015 at 08:26:46PM -0500, Corey Minyard wrote: > >> On 04/12/2015 11:05 AM, Michael S. Tsirkin wrote: > >>> On Tue, Apr 07, 2015 at 02:51:39PM -0500, minyard@acm.org wrote: > >>>> From: Corey Minyard > >>>> > >>>> There was no way to directly add a table entry to the SMBIOS table, > >>>> even though the BIOS supports this. So add a function to do this. > >>>> This is in preparation for the IPMI handler adding it's SMBIOS table > >>>> entry. > >>>> > >>>> Signed-off-by: Corey Minyard > >>> Do we have to use a callback for this? > >>> > >>> It seems that if smbios_table_entry_add just added the table > >>> itself to some array or a linked list, then devices could just call > >>> smbios_table_entry_add instead of registering a handler. > >>> > >>> And smbios_get_tables would scan that and get the tables. > >> Well, there are many ways you could handle this, and it doesn't seem > >> much different in the end to me. You either have a list of items to add > >> to the table or a list of callbacks to fill in the data. > >> > >> I made this the same as the ACPI code, which you have to have as a > >> callback if you are adding it to a common SSDT. > > Not really I think. > > The AML functions require that you have a tree to attach what you are > adding. If you did your own SSDT, you wouldn't need a callback. You > could add a binary blob that gets put into the SSDT, but I think that > would require adding some AML functions. Oh, you are using functions from aml-build.c. I forgot that they can only be used within ssdt ATM. Maybe that's worth fixing. I need to ponder this a bit. -- MST