From 5dfbee893063f93b2097bfe367e2444fcc5a548b Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Fri, 2 Mar 2018 13:01:17 -0500 Subject: [PATCH] memory_region: Fix name comments The 'name' parameter to memory_region_init_* had been marked as debug only, however vmstate_region_ram uses it as a parameter to qemu_ram_set_idstr to set RAMBlock names and these form part of the migration stream. Backports commit e8f5fe2de125a0bfbefbaa6a69af81f4817cb7a0 from qemu --- qemu/include/exec/memory.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/qemu/include/exec/memory.h b/qemu/include/exec/memory.h index b19c8785..cfa218a0 100644 --- a/qemu/include/exec/memory.h +++ b/qemu/include/exec/memory.h @@ -343,7 +343,8 @@ void memory_region_init_io(struct uc_struct *uc, * * @mr: the #MemoryRegion to be initialized. * @owner: the object that tracks the region's reference count - * @name: the name of the region. + * @name: Region name, becomes part of RAMBlock name used in migration stream + * must be unique within any device * @size: size of the region. * @perms: permissions on the region (UC_PROT_READ, UC_PROT_WRITE, UC_PROT_EXEC). * @errp: pointer to Error*, to store an error if it happens. @@ -363,7 +364,8 @@ void memory_region_init_ram(struct uc_struct *uc, * * @mr: the #MemoryRegion to be initialized. * @owner: the object that tracks the region's reference count - * @name: the name of the region. + * @name: Region name, becomes part of RAMBlock name used in migration stream + * must be unique within any device * @size: size of the region. * @ptr: memory to be mapped; must contain at least @size bytes. */ @@ -388,7 +390,8 @@ void memory_region_init_ram_ptr(struct uc_struct *uc, * * @mr: the #MemoryRegion to be initialized. * @owner: the object that tracks the region's reference count - * @name: the name of the region. + * @name: Region name, becomes part of RAMBlock name used in migration stream + * must be unique within any device * @size: size of the region. * @ptr: memory to be mapped; must contain at least @size bytes. */ @@ -428,7 +431,8 @@ void memory_region_init_alias(struct uc_struct *uc, * * @mr: the #MemoryRegion to be initialized. * @owner: the object that tracks the region's reference count - * @name: the name of the region. + * @name: Region name, becomes part of RAMBlock name used in migration stream + * must be unique within any device * @size: size of the region. * @errp: pointer to Error*, to store an error if it happens. */ @@ -446,7 +450,8 @@ void memory_region_init_rom(struct uc_struct *uc, * @mr: the #MemoryRegion to be initialized. * @owner: the object that tracks the region's reference count * @ops: callbacks for write access handling (must not be NULL). - * @name: the name of the region. + * @name: Region name, becomes part of RAMBlock name used in migration stream + * must be unique within any device * @size: size of the region. * @errp: pointer to Error*, to store an error if it happens. */ @@ -468,7 +473,8 @@ void memory_region_init_rom_device(struct uc_struct *uc, * * @mr: the #MemoryRegion to be initialized. * @owner: the object that tracks the region's reference count - * @name: the name of the region. + * @name: Region name, becomes part of RAMBlock name used in migration stream + * must be unique within any device * @size: used size of the region. * @max_size: max size of the region. * @resized: callback to notify owner about used size change.