mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-31 23:35:38 +00:00
exec: round up size on MR resize
Block size must fundamentally be a multiple of target page size. Aligning automatically removes need to worry about the alignment from callers. Note: the only caller of qemu_ram_resize (acpi) already happens to have size padded to a power of 2, but we would like to drop the padding in ACPI core, and don't want to expose target page size knowledge to ACPI Backports commit 129ddaf31be583fb7c97812e07e028661005ce42 from qemu
This commit is contained in:
parent
024ec1755e
commit
1cc51e4b53
|
@ -1033,6 +1033,8 @@ int qemu_ram_resize(struct uc_struct *uc, ram_addr_t base, ram_addr_t newsize, E
|
|||
|
||||
assert(block);
|
||||
|
||||
newsize = TARGET_PAGE_ALIGN(newsize);
|
||||
|
||||
if (block->used_length == newsize) {
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue