[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 49/57] Round up RAMBlock sizes to host page sizes
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 49/57] Round up RAMBlock sizes to host page sizes |
Date: |
Mon, 9 Nov 2015 18:28:53 +0100 |
From: "Dr. David Alan Gilbert" <address@hidden>
RAMBlocks that are not a multiple of host pages in length
cause problems for postcopy (I've seen an ACPI table on aarch64
be 5k in length - i.e. 5x target-page), so round RAMBlock sizes
up to a host-page.
This potentially breaks migration compatibility due to changes
in RAMBlock sizes; however:
1) x86 and s390 I think always have host=target page size
2) When I've tried on Power the block sizes already seem aligned.
3) I don't think there's anything else that maintains per-version
machine-types for compatibility.
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
exec.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/exec.c b/exec.c
index 36886ee..b09f18b 100644
--- a/exec.c
+++ b/exec.c
@@ -1452,7 +1452,7 @@ int qemu_ram_resize(ram_addr_t base, ram_addr_t newsize,
Error **errp)
assert(block);
- newsize = TARGET_PAGE_ALIGN(newsize);
+ newsize = HOST_PAGE_ALIGN(newsize);
if (block->used_length == newsize) {
return 0;
@@ -1596,7 +1596,7 @@ ram_addr_t qemu_ram_alloc_from_file(ram_addr_t size,
MemoryRegion *mr,
return -1;
}
- size = TARGET_PAGE_ALIGN(size);
+ size = HOST_PAGE_ALIGN(size);
new_block = g_malloc0(sizeof(*new_block));
new_block->mr = mr;
new_block->used_length = size;
@@ -1632,8 +1632,8 @@ ram_addr_t qemu_ram_alloc_internal(ram_addr_t size,
ram_addr_t max_size,
ram_addr_t addr;
Error *local_err = NULL;
- size = TARGET_PAGE_ALIGN(size);
- max_size = TARGET_PAGE_ALIGN(max_size);
+ size = HOST_PAGE_ALIGN(size);
+ max_size = HOST_PAGE_ALIGN(max_size);
new_block = g_malloc0(sizeof(*new_block));
new_block->mr = mr;
new_block->resized = resized;
--
2.5.0
- [Qemu-devel] [PULL 36/57] postcopy: Incoming initialisation, (continued)
- [Qemu-devel] [PULL 36/57] postcopy: Incoming initialisation, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 34/57] Postcopy: Maintain unsentmap, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 38/57] Postcopy: Postcopy startup in migration thread, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 37/57] postcopy: ram_enable_notify to switch on userfault, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 39/57] Postcopy: End of iteration, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 40/57] Page request: Add MIG_RP_MSG_REQ_PAGES reverse command, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 42/57] Page request: Consume pages off the post-copy queue, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 46/57] Don't sync dirty bitmaps in postcopy, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 44/57] Postcopy: Use helpers to map pages during migration, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 43/57] postcopy_ram.c: place_page and helpers, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 49/57] Round up RAMBlock sizes to host page sizes,
Juan Quintela <=
- [Qemu-devel] [PULL 41/57] Page request: Process incoming page request, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 47/57] Don't iterate on precopy-only devices during postcopy, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 45/57] postcopy: Check order of received target pages, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 52/57] postcopy: Wire up loadvm_postcopy_handle_ commands, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 54/57] End of migration for postcopy, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 50/57] Postcopy; Handle userfault requests, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 53/57] Postcopy: Mark nohugepage before discard, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 48/57] Host page!=target page: Cleanup bitmaps, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 51/57] Start up a postcopy/listener thread ready for incoming page data, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 57/57] migration: qemu_savevm_state_cleanup becomes mandatory operation, Juan Quintela, 2015/11/09