mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
memory: add memory_region_ram_resize
This is a simple MemoryRegion wrapper for qemu_ram_resize. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
e95205e1f9
commit
37d7c08413
2 changed files with 19 additions and 0 deletions
7
memory.c
7
memory.c
|
@ -1452,6 +1452,13 @@ void *memory_region_get_ram_ptr(MemoryRegion *mr)
|
|||
return qemu_get_ram_ptr(mr->ram_addr & TARGET_PAGE_MASK);
|
||||
}
|
||||
|
||||
void memory_region_ram_resize(MemoryRegion *mr, ram_addr_t newsize, Error **errp)
|
||||
{
|
||||
assert(mr->terminates);
|
||||
|
||||
qemu_ram_resize(mr->ram_addr, newsize, errp);
|
||||
}
|
||||
|
||||
static void memory_region_update_coalesced_range_as(MemoryRegion *mr, AddressSpace *as)
|
||||
{
|
||||
FlatView *view;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue