From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBTnG-000136-8B for qemu-devel@nongnu.org; Mon, 19 Aug 2013 14:03:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VBTn7-0000Pj-5I for qemu-devel@nongnu.org; Mon, 19 Aug 2013 14:03:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39330) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBTn6-0000Pb-Sk for qemu-devel@nongnu.org; Mon, 19 Aug 2013 14:02:57 -0400 Message-ID: <52125E62.7020306@redhat.com> Date: Mon, 19 Aug 2013 20:05:22 +0200 From: Laszlo Ersek MIME-Version: 1.0 References: <1376922370-5681-1-git-send-email-mst@redhat.com> <1376922370-5681-3-git-send-email-mst@redhat.com> In-Reply-To: <1376922370-5681-3-git-send-email-mst@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 2/2] loader: store FW CFG ROM files in RAM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Peter Maydell , Anthony Liguori , pbonzini@redhat.com, qemu-devel@nongnu.org, kraxel@redhat.com On 08/19/13 16:26, Michael S. Tsirkin wrote: > 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 change two bytes in such a ROM this breaks 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. > > Future-proof this by creating, for each such ROM, > an MR serving as the backing store. > This MR is never mapped into guest memory, but it's registered > as RAM so it's migrated with the guest. > > Naturally, this only helps for -M 1.7 and up, older machine types > will still have the cross-version migration bug. > Luckily the race window for the problem to trigger is very small, > which is also likely why we didn't notice the cross-version > migration bug in testing yet. > > Signed-off-by: Michael S. Tsirkin > --- > hw/core/loader.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- > hw/i386/pc_piix.c | 2 ++ > hw/i386/pc_q35.c | 2 ++ > include/hw/loader.h | 1 + > 4 files changed, 51 insertions(+), 3 deletions(-) checked the v3->v4 diff in v4 0/2. Reviewed-by: Laszlo Ersek