From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCHv4 15/15] Pass boot device list to firmware. Date: Mon, 15 Nov 2010 15:36:25 +0200 Message-ID: <20101115133625.GN7948@redhat.com> References: <1289749181-12070-1-git-send-email-gleb@redhat.com> <1289749181-12070-16-git-send-email-gleb@redhat.com> <20101115034033.GA1309@morn.localdomain> <20101115074008.GF7948@redhat.com> <20101115132635.GA14119@morn.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, blauwirbel@gmail.com, armbru@redhat.com, alex.williamson@redhat.com, mst@redhat.com To: "Kevin O'Connor" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46564 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755348Ab0KONgg (ORCPT ); Mon, 15 Nov 2010 08:36:36 -0500 Content-Disposition: inline In-Reply-To: <20101115132635.GA14119@morn.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Nov 15, 2010 at 08:26:35AM -0500, Kevin O'Connor wrote: > On Mon, Nov 15, 2010 at 09:40:08AM +0200, Gleb Natapov wrote: > > On Sun, Nov 14, 2010 at 10:40:33PM -0500, Kevin O'Connor wrote: > > > Why not just return a newline separated list that is null terminated? > > > > > Doing it like this will needlessly complicate firmware side. How do you > > know how much memory to allocate before reading device list? > > My preference would be for the size to be exposed via the > QEMU_CFG_FILE_DIR selector. (My preference would be for all objects > in fw_cfg to have entries in QEMU_CFG_FILE_DIR describing their size > in a reliable manner.) > Will interface suggested by Blue will be good for you? The one with two fw_cfg ids. BOOTINDEX_LEN for len and BOOTINDEX_DATA for device list. I already changed my implementation to this one. Using FILE_DIR requires us to generate synthetic name. Hmm BTW I do not see proper endianness handling in FILE_DIR. -- Gleb.