qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Anthony Liguori <aliguori@us.ibm.com>,
	pbonzini@redhat.com, qemu-devel@nongnu.org, kraxel@redhat.com
Subject: Re: [Qemu-devel] [PATCH v4 2/2] loader: store FW CFG ROM files in RAM
Date: Mon, 19 Aug 2013 20:05:22 +0200	[thread overview]
Message-ID: <52125E62.7020306@redhat.com> (raw)
In-Reply-To: <1376922370-5681-3-git-send-email-mst@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 <mst@redhat.com>
> ---
>  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 <lersek@redhat.com>

  parent reply	other threads:[~2013-08-19 18:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-19 14:26 [Qemu-devel] [PATCH v4 0/2] future proof rom loading for cross versiom migration Michael S. Tsirkin
2013-08-19 14:26 ` [Qemu-devel] [PATCH v4 1/2] arch_init: align MR size to target page size Michael S. Tsirkin
2013-08-19 17:37   ` Laszlo Ersek
2013-08-19 17:45     ` Peter Maydell
2013-08-19 17:51       ` Michael S. Tsirkin
2013-08-19 17:48     ` Michael S. Tsirkin
2013-08-19 18:04       ` Laszlo Ersek
2013-08-19 14:26 ` [Qemu-devel] [PATCH v4 2/2] loader: store FW CFG ROM files in RAM Michael S. Tsirkin
2013-08-19 17:28   ` Paolo Bonzini
2013-08-19 17:40     ` Michael S. Tsirkin
2013-08-19 17:50       ` Paolo Bonzini
2013-08-19 18:05   ` Laszlo Ersek [this message]
2013-08-19 16:35 ` [Qemu-devel] [PATCH v4 0/2] future proof rom loading for cross versiom migration Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52125E62.7020306@redhat.com \
    --to=lersek@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=kraxel@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).