softmmu/memory: Pass ram_flags to memory_region_init_ram_shared_nomigrate()

Let's forward ram_flags instead, renaming
memory_region_init_ram_shared_nomigrate() into
memory_region_init_ram_flags_nomigrate().

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Acked-by: Eduardo Habkost <ehabkost@redhat.com> for memory backend and machine core
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20210510114328.21835-6-david@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
David Hildenbrand 2021-05-10 13:43:18 +02:00 committed by Paolo Bonzini
parent d5015b8013
commit 7f863cba4d
5 changed files with 31 additions and 29 deletions

View file

@ -940,27 +940,27 @@ void memory_region_init_ram_nomigrate(MemoryRegion *mr,
Error **errp);
/**
* memory_region_init_ram_shared_nomigrate: Initialize RAM memory region.
* Accesses into the region will
* modify memory directly.
* memory_region_init_ram_flags_nomigrate: Initialize RAM memory region.
* Accesses into the region will
* modify memory directly.
*
* @mr: the #MemoryRegion to be initialized.
* @owner: the object that tracks the region's reference count
* @name: Region name, becomes part of RAMBlock name used in migration stream
* must be unique within any device
* @size: size of the region.
* @share: allow remapping RAM to different addresses
* @ram_flags: RamBlock flags. Supported flags: RAM_SHARED.
* @errp: pointer to Error*, to store an error if it happens.
*
* Note that this function is similar to memory_region_init_ram_nomigrate.
* The only difference is part of the RAM region can be remapped.
* 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_shared_nomigrate(MemoryRegion *mr,
Object *owner,
const char *name,
uint64_t size,
bool share,
Error **errp);
void memory_region_init_ram_flags_nomigrate(MemoryRegion *mr,
Object *owner,
const char *name,
uint64_t size,
uint32_t ram_flags,
Error **errp);
/**
* memory_region_init_resizeable_ram: Initialize memory region with resizeable