From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NatP3-0006bu-RK for qemu-devel@nongnu.org; Fri, 29 Jan 2010 11:09:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NatOz-0006a5-4O for qemu-devel@nongnu.org; Fri, 29 Jan 2010 11:09:01 -0500 Received: from [199.232.76.173] (port=32835 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NatOy-0006Zw-Q0 for qemu-devel@nongnu.org; Fri, 29 Jan 2010 11:08:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53514) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NatOx-0001oA-OB for qemu-devel@nongnu.org; Fri, 29 Jan 2010 11:08:56 -0500 Date: Fri, 29 Jan 2010 18:08:50 +0200 From: Gleb Natapov Message-ID: <20100129160850.GJ14348@redhat.com> References: <4B5DCAF2.3010105@redhat.com> <20100126002447.GA8800@morn.localdomain> <4B5F640C.2030907@redhat.com> <20100128043917.GA3623@morn.localdomain> <4B62A47B.5070807@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B62A47B.5070807@redhat.com> Subject: [Qemu-devel] Re: [PATCH] Seabios - read e820 table from qemu_cfg List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jes Sorensen Cc: Anthony Liguori , kvm@vger.kernel.org, seabios@seabios.org, qemu-devel@nongnu.org, Alexander Graf , Kevin O'Connor , Avi Kivity On Fri, Jan 29, 2010 at 10:03:55AM +0100, Jes Sorensen wrote: > On 01/28/10 05:39, Kevin O'Connor wrote: > >I think defining accessor functions for every piece of data passed > >through qemu-cfg interface is going to get tiring. I'd prefer to > >extend the existing qemu-cfg "file" interface for new content. > > > >For example, add a helper with something like: > > > >int qemu_cfg_get_file(const char *name, void *dest, int maxsize); > > Hi Kevin, > > I think switching qemu_cfg to use a file name based interface would be > a nice feature, but I think it should be independent of this patch. I am > CC'ing Gleb on this as he did the original design I believe. > There is already file like interface on top of fw_cfg. Look for qemu_cfg_read_file(). I am not sure this is a good idea to start using it for something that is not actually a file. I have no problem with adding accessors for each new data time. As you noted below this way we don't need to load the whole e820 map into the memory, but can do entry by entry. -- Gleb.