From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBNkB-0005hD-Uv for qemu-devel@nongnu.org; Mon, 19 Aug 2013 07:35:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VBNk4-0007rl-9d for qemu-devel@nongnu.org; Mon, 19 Aug 2013 07:35:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59004) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBNk4-0007rb-0V for qemu-devel@nongnu.org; Mon, 19 Aug 2013 07:35:24 -0400 Message-ID: <5212038C.2050803@redhat.com> Date: Mon, 19 Aug 2013 13:37:48 +0200 From: Laszlo Ersek MIME-Version: 1.0 References: <1376347400-21035-1-git-send-email-mst@redhat.com> In-Reply-To: <1376347400-21035-1-git-send-email-mst@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 0/2] future proof rom loading for cross versiom migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Peter Maydell , pbonzini@redhat.com, qemu-devel@nongnu.org, kraxel@redhat.com On 08/13/13 00:43, Michael S. Tsirkin wrote: > Changes from v2: address comments on v2 by Peter Maydell > - switch from global constant to function > - use memory_region_init_ram instead of _ram_ptr > - disable for 1.6 > > Changes from v1: address comments by Peter Maydell > - drop useless data=data line > - rename target_page_size to migration_page_size to make use clear > Peter, you also suggested somehow hiding this within memory core. > I don't see a clean way to do this without lots of code > changes, I think what I propose here is acceptable for now > and we can always rework APIs without wire format changes. > > Please review, and consider for merging. > > Original cover letter below. > > > ROM files that are put in FW CFG are copied to guest ram, by BIOS, but > they are not backed by RAM so they don't get migrated. > > Each time we'll change at least two bytes in such a ROM this will break > cross-version migration: since we can migrate after BIOS has read the first > byte but before it has read the second one, getting an inconsistent state. > > This patchset makes QEMU future-proof against such changes. > > Naturally, this only helps for -M 1.6 and up, older machine types > will still have the cross-version migration bug. > > I think this should be applied for 1.6, this way we won't > have this problem from 1.7 and on. > > Michael S. Tsirkin (2): > memory: export migration page size > loader: put FW CFG ROM files into RAM > > arch_init.c | 6 ++++++ > hw/core/loader.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++--- > hw/i386/pc_piix.c | 2 ++ > hw/i386/pc_q35.c | 2 ++ > include/exec/memory.h | 1 + > include/hw/loader.h | 1 + > 6 files changed, 63 insertions(+), 3 deletions(-) > Reviewed-by: Laszlo Ersek