mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 16:55:35 +00:00
memory: Document that the RAM MR initializers do not handle migration
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.) Backports commit a5c0234bb2754f5248e67929a34c843dbe039da5 from qemu
This commit is contained in:
parent
3c2d3d8363
commit
152c56f6a9
|
@ -354,6 +354,9 @@ void memory_region_init_io(struct uc_struct *uc,
|
||||||
* @size: size of the region.
|
* @size: size of the region.
|
||||||
* @perms: permissions on the region (UC_PROT_READ, UC_PROT_WRITE, UC_PROT_EXEC).
|
* @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.
|
* @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(struct uc_struct *uc,
|
void memory_region_init_ram(struct uc_struct *uc,
|
||||||
MemoryRegion *mr,
|
MemoryRegion *mr,
|
||||||
|
@ -374,6 +377,9 @@ void memory_region_init_ram(struct uc_struct *uc,
|
||||||
* must be unique within any device
|
* must be unique within any device
|
||||||
* @size: size of the region.
|
* @size: size of the region.
|
||||||
* @ptr: memory to be mapped; must contain at least @size bytes.
|
* @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(struct uc_struct *uc,
|
void memory_region_init_ram_ptr(struct uc_struct *uc,
|
||||||
MemoryRegion *mr,
|
MemoryRegion *mr,
|
||||||
|
@ -400,6 +406,10 @@ void memory_region_init_ram_ptr(struct uc_struct *uc,
|
||||||
* must be unique within any device
|
* must be unique within any device
|
||||||
* @size: size of the region.
|
* @size: size of the region.
|
||||||
* @ptr: memory to be mapped; must contain at least @size bytes.
|
* @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.
|
||||||
|
* (For RAM device memory regions, migrating the contents rarely makes sense.)
|
||||||
*/
|
*/
|
||||||
void memory_region_init_ram_device_ptr(struct uc_struct *uc,
|
void memory_region_init_ram_device_ptr(struct uc_struct *uc,
|
||||||
MemoryRegion *mr,
|
MemoryRegion *mr,
|
||||||
|
@ -485,6 +495,9 @@ void memory_region_init_rom_device(struct uc_struct *uc,
|
||||||
* @max_size: max size of the region.
|
* @max_size: max size of the region.
|
||||||
* @resized: callback to notify owner about used size change.
|
* @resized: callback to notify owner about used size change.
|
||||||
* @errp: pointer to Error*, to store an error if it happens.
|
* @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(struct uc_struct *uc,
|
void memory_region_init_resizeable_ram(struct uc_struct *uc,
|
||||||
MemoryRegion *mr,
|
MemoryRegion *mr,
|
||||||
|
|
Loading…
Reference in a new issue