From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:48254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVK9C-0005ZV-N3 for qemu-devel@nongnu.org; Tue, 29 Nov 2011 04:38:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RVK98-00082M-8U for qemu-devel@nongnu.org; Tue, 29 Nov 2011 04:38:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:62324) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVK98-00081r-1P for qemu-devel@nongnu.org; Tue, 29 Nov 2011 04:38:38 -0500 Message-ID: <4ED4A818.1030702@redhat.com> Date: Tue, 29 Nov 2011 11:38:32 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1322447198-6328-1-git-send-email-jordan.l.justen@intel.com> <4ED36240.9020401@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v8 0/2] PC system flash support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jordan Justen Cc: Markus Armbruster , qemu-devel@nongnu.org, Gerd Hoffmann On 11/29/2011 09:03 AM, Jordan Justen wrote: > On Mon, Nov 28, 2011 at 02:28, Avi Kivity wrote: > > On 11/28/2011 04:26 AM, Jordan Justen wrote: > >> Enable flash emulation in a PC system using pflash_cfi01. > > > > The new memory layout should be made conditional on the machine type (-M > > pc-1.1 or later) to allow migration from/to pc-1.0 and earlier. > > > > Memory layout in this context are the names of memory ranges given to > > memory_region_init_ram(), sizes, and locations. Also, the flash > > interface should not be there for older machines. > > Is this the right way to go about it? > 1. Create a new pc-sysfw qdev > 2. Use a flash property in pc_piix.c to selectively enable the flash > > Or, is there an easier or better way to say pc > pc-1.0? No idea, copying some qdev people. > How do I enable "migration from/to pc-1.0 and earlier"? It seems like > some code will need to shuttle the data (rom <=> pflash). Can you > point me an an example? It should be completely transparent, so long as you instantiate a ROM for <= pc-1.0 (say based on a property) and flash for >= pc-1.1. One way to verify is to to 'info qdev' and 'info mtree' with qemu-1.0 and qemu-1.1 -M pc-1.0, and see that you get the same results. -- error compiling committee.c: too many arguments to function