From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: patches@linaro.org, Paolo Bonzini <pbonzini@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>,
Marcel Apfelbaum <marcel@redhat.com>,
Igor Mammedov <imammedo@redhat.com>
Subject: [Qemu-devel] [PATCH 02/11] memory: Document that the RAM MR initializers do not handle migration
Date: Fri, 7 Jul 2017 15:42:48 +0100 [thread overview]
Message-ID: <1499438577-7674-3-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1499438577-7674-1-git-send-email-peter.maydell@linaro.org>
The various functions for initializing RAM MemoryRegions do not do
anything to cause the data in the MemoryRegion to be migrated.
Note in their documentation comments that this is the responsibility
of the caller.
(We will shortly add a new function that *does* do this for you.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
include/exec/memory.h | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/include/exec/memory.h b/include/exec/memory.h
index 8503685..55cb5e7 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -412,6 +412,9 @@ void memory_region_init_io(MemoryRegion *mr,
* must be unique within any device
* @size: size of the region.
* @errp: pointer to Error*, to store an error if it happens.
+ *
+ * Note that this function does not do anything to cause the data in the
+ * RAM memory region to be migrated; that is the responsibility of the caller.
*/
void memory_region_init_ram(MemoryRegion *mr,
struct Object *owner,
@@ -434,6 +437,9 @@ void memory_region_init_ram(MemoryRegion *mr,
* @max_size: max size of the region.
* @resized: callback to notify owner about used size change.
* @errp: pointer to Error*, to store an error if it happens.
+ *
+ * Note that this function does not do anything to cause the data in the
+ * RAM memory region to be migrated; that is the responsibility of the caller.
*/
void memory_region_init_resizeable_ram(MemoryRegion *mr,
struct Object *owner,
@@ -457,6 +463,9 @@ void memory_region_init_resizeable_ram(MemoryRegion *mr,
* @share: %true if memory must be mmaped with the MAP_SHARED flag
* @path: the path in which to allocate the RAM.
* @errp: pointer to Error*, to store an error if it happens.
+ *
+ * Note that this function does not do anything to cause the data in the
+ * RAM memory region to be migrated; that is the responsibility of the caller.
*/
void memory_region_init_ram_from_file(MemoryRegion *mr,
struct Object *owner,
@@ -477,6 +486,9 @@ void memory_region_init_ram_from_file(MemoryRegion *mr,
* @share: %true if memory must be mmaped with the MAP_SHARED flag
* @fd: the fd to mmap.
* @errp: pointer to Error*, to store an error if it happens.
+ *
+ * Note that this function does not do anything to cause the data in the
+ * RAM memory region to be migrated; that is the responsibility of the caller.
*/
void memory_region_init_ram_from_fd(MemoryRegion *mr,
struct Object *owner,
@@ -498,6 +510,9 @@ void memory_region_init_ram_from_fd(MemoryRegion *mr,
* must be unique within any device
* @size: size of the region.
* @ptr: memory to be mapped; must contain at least @size bytes.
+ *
+ * Note that this function does not do anything to cause the data in the
+ * RAM memory region to be migrated; that is the responsibility of the caller.
*/
void memory_region_init_ram_ptr(MemoryRegion *mr,
struct Object *owner,
@@ -522,6 +537,9 @@ void memory_region_init_ram_ptr(MemoryRegion *mr,
* @name: the name of the region.
* @size: size of the region.
* @ptr: memory to be mapped; must contain at least @size bytes.
+ *
+ * Note that this function does not do anything to cause the data in the
+ * RAM memory region to be migrated; that is the responsibility of the caller.
*/
void memory_region_init_ram_device_ptr(MemoryRegion *mr,
struct Object *owner,
--
2.7.4
next prev parent reply other threads:[~2017-07-07 14:43 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-07 14:42 [Qemu-devel] [PATCH 00/11] Make memory_region_init_ram() and friends handle migration Peter Maydell
2017-07-07 14:42 ` [Qemu-devel] [PATCH 01/11] include/hw/boards.h: Document memory_region_allocate_system_memory() Peter Maydell
2017-07-10 9:42 ` Paolo Bonzini
2017-07-07 14:42 ` Peter Maydell [this message]
2017-07-10 10:01 ` [Qemu-devel] [PATCH 02/11] memory: Document that the RAM MR initializers do not handle migration Paolo Bonzini
2017-07-10 10:04 ` Peter Maydell
2017-07-10 10:05 ` Paolo Bonzini
2017-07-10 10:08 ` Peter Maydell
2017-07-07 14:42 ` [Qemu-devel] [PATCH 03/11] memory: Rename memory_region_init_ram() to memory_region_init_ram_nomigrate() Peter Maydell
2017-07-07 14:42 ` [Qemu-devel] [PATCH 04/11] memory: Rename memory_region_init_rom() and _rom_device() to _nomigrate() Peter Maydell
2017-07-07 14:42 ` [Qemu-devel] [PATCH 05/11] memory.h: Add memory_region_init_{ram, rom, rom_device}() handling migration Peter Maydell
2017-07-07 14:42 ` [Qemu-devel] [PATCH 06/11] scripts/coccinelle/memory-region-init-ram.cocci: New script Peter Maydell
2017-07-07 14:42 ` [Qemu-devel] [PATCH 07/11] hw: Use new memory_region_init_{ram, rom, rom_device}() functions Peter Maydell
2017-07-07 14:42 ` [Qemu-devel] [PATCH 08/11] hw/block/pflash_cfi01, pflash_cfi02: Use memory_region_init_rom_device() Peter Maydell
2017-07-07 14:42 ` [Qemu-devel] [PATCH 09/11] hw/pci/pci.c: Use memory_region_init_rom() Peter Maydell
2017-07-07 14:42 ` [Qemu-devel] [PATCH 10/11] hw/display/qxl.c Use memory_region_init_ram() Peter Maydell
2017-07-07 14:42 ` [Qemu-devel] [PATCH 11/11] docs/devel/memory.txt: Add section about RAM migration Peter Maydell
2017-07-10 10:05 ` [Qemu-devel] [PATCH 00/11] Make memory_region_init_ram() and friends handle migration Paolo Bonzini
2017-07-14 17:01 ` Peter Maydell
2017-07-17 9:01 ` Peter Maydell
2017-07-22 4:47 ` Philippe Mathieu-Daudé
2017-07-23 19:58 ` Peter Maydell
2017-07-25 5:28 ` Philippe Mathieu-Daudé
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=1499438577-7674-3-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=marcel@redhat.com \
--cc=patches@linaro.org \
--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).