From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53134 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PLg0E-00073Q-6h for qemu-devel@nongnu.org; Thu, 25 Nov 2010 12:53:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PLg0C-0000dk-C4 for qemu-devel@nongnu.org; Thu, 25 Nov 2010 12:53:02 -0500 Received: from mail.codesourcery.com ([38.113.113.100]:58402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PLg0C-0000dM-3A for qemu-devel@nongnu.org; Thu, 25 Nov 2010 12:53:00 -0500 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH REPOST] fw_cfg: Allow guest to read kernel etc via fast, synchronous "DMA"-type operation. Date: Thu, 25 Nov 2010 17:52:49 +0000 References: <20100803144931.GE22211@amd.home.annexia.org> In-Reply-To: <20100803144931.GE22211@amd.home.annexia.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201011251752.49551.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "Richard W.M. Jones" > I rebased this and rechecked it. The *total* libguestfs boot time > goes from 86 seconds down to 7.7 seconds. The proportion of that > attributable to loading the appliance is approximately 650 times [sic] > faster. Nack. > +/* Target address and size for DMA operations. This is only used > + * during boot and across 32 and 64 bit architectures, so only writes > + * to lower 4GB addresses are supported. > + */ > +static uint32_t dma_addr = 0; > +static uint32_t dma_size = 0; Storing per-device state in global variables is just plain wrong. Limiting addresses to 32-bits is just lame. You can do better. It's also completely broken on big-endian hosts. Paul