qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Laszlo Ersek <lersek@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH v2 for-1.6 v2 1/2] memory: export migration page size
Date: Mon, 12 Aug 2013 21:15:59 +0300	[thread overview]
Message-ID: <1376310634-20778-2-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1376310634-20778-1-git-send-email-mst@redhat.com>

Migration code assumes that each RAM block is a multiple of target page
size.
We can fix this in a variety of ways, for 1.6 the simplest way is
possibly exporting the required page size so callers can make regions
large enough.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 arch_init.c           | 3 +++
 include/exec/memory.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/arch_init.c b/arch_init.c
index 68a7ab7..61937e2 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -150,6 +150,9 @@ int qemu_read_default_config_files(bool userconfig)
     return 0;
 }
 
+/* Smallest page size for migrated RAM. */
+uint64_t qemu_migration_page_size = TARGET_PAGE_SIZE;
+
 static inline bool is_zero_page(uint8_t *p)
 {
     return buffer_find_nonzero_offset(p, TARGET_PAGE_SIZE) ==
diff --git a/include/exec/memory.h b/include/exec/memory.h
index ebe0d24..42450fe 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -1055,6 +1055,7 @@ void *address_space_map(AddressSpace *as, hwaddr addr,
 void address_space_unmap(AddressSpace *as, void *buffer, hwaddr len,
                          int is_write, hwaddr access_len);
 
+extern uint64_t qemu_migration_page_size;
 
 #endif
 
-- 
MST

  reply	other threads:[~2013-08-12 18:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-12 18:15 [Qemu-devel] [PATCH v2 for-1.6 0/2] future proof rom loading for cross versiom migration Michael S. Tsirkin
2013-08-12 18:15 ` Michael S. Tsirkin [this message]
2013-08-12 18:16 ` [Qemu-devel] [PATCH v2 for-1.6 v2 2/2] loader: put FW CFG ROM files into RAM Michael S. Tsirkin
2013-08-12 18:37   ` Peter Maydell
2013-08-12 18:56     ` Michael S. Tsirkin
2013-08-13 14:47       ` Paolo Bonzini
2013-08-13 15:11         ` Michael S. Tsirkin
2013-08-12 22:03     ` Paolo Bonzini
2013-08-12 18:18 ` [Qemu-devel] [PATCH v2 for-1.6 0/2] future proof rom loading for cross versiom migration Michael S. Tsirkin

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=1376310634-20778-2-git-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=lersek@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).