From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Alexey Kardashevskiy" <aik@ozlabs.ru>,
"Alexander Graf" <agraf@suse.de>,
"Markus Armbruster" <armbru@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
imammedo@redhat.com, pbonzini@redhat.com,
"Laszlo Ersek" <lersek@redhat.com>,
=?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de>
Subject: [Qemu-devel] [PATCH 3/3] loader: mark MR for resizeable blobs as extendable
Date: Mon, 28 Jul 2014 17:35:17 +0200 [thread overview]
Message-ID: <1406561650-29995-3-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1406561650-29995-1-git-send-email-mst@redhat.com>
This makes migration from older QEMU versions
more robust.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/core/loader.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/hw/core/loader.c b/hw/core/loader.c
index ad6ec67..fc00a87 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -745,6 +745,13 @@ void *rom_add_blob_resizeable(const char *name, const void *blob,
if (rom_file_has_mr) {
data = rom_set_mr(rom, OBJECT(fw_cfg), devpath);
+ /* If there's padding at tail, blob is resizeable.
+ * Set flag to allow migration from older QEMU versions
+ * where this region could have been smaller.
+ */
+ if (max_len != len) {
+ memory_region_permit_extendable_migration(rom->mr);
+ }
} else {
data = rom->data;
}
--
MST
next prev parent reply other threads:[~2014-07-28 15:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-28 15:35 [Qemu-devel] [PATCH 1/3] loader: add support for resizeable blobs Michael S. Tsirkin
2014-07-28 15:35 ` [Qemu-devel] [PATCH 2/3] migration: load smaller RAMBlock to a bigger one if permitted Michael S. Tsirkin
2014-07-28 15:35 ` Michael S. Tsirkin [this message]
2014-07-28 16:52 ` [Qemu-devel] [PATCH 1/3] loader: add support for resizeable blobs Dr. David Alan Gilbert
2014-07-28 19:07 ` Michael S. Tsirkin
2014-07-28 19:20 ` Paolo Bonzini
2014-07-29 8:02 ` Dr. David Alan Gilbert
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=1406561650-29995-3-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=armbru@redhat.com \
--cc=imammedo@redhat.com \
--cc=kraxel@redhat.com \
--cc=lersek@redhat.com \
--cc=pbonzini@redhat.com \
--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).