[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v9 49/56] Round up RAMBlock sizes to host page sizes
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[Qemu-devel] [PATCH v9 49/56] Round up RAMBlock sizes to host page sizes |
Date: |
Thu, 5 Nov 2015 18:11:16 +0000 |
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>
---
exec.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/exec.c b/exec.c
index f8aad39..065096a 100644
--- a/exec.c
+++ b/exec.c
@@ -1450,7 +1450,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;
@@ -1594,7 +1594,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;
@@ -1630,8 +1630,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] [PATCH v9 42/56] Page request: Consume pages off the post-copy queue, (continued)
- [Qemu-devel] [PATCH v9 42/56] Page request: Consume pages off the post-copy queue, Dr. David Alan Gilbert (git), 2015/11/05
- [Qemu-devel] [PATCH v9 44/56] Postcopy: Use helpers to map pages during migration, Dr. David Alan Gilbert (git), 2015/11/05
- [Qemu-devel] [PATCH v9 43/56] postcopy_ram.c: place_page and helpers, Dr. David Alan Gilbert (git), 2015/11/05
- [Qemu-devel] [PATCH v9 45/56] postcopy: Check order of received target pages, Dr. David Alan Gilbert (git), 2015/11/05
- [Qemu-devel] [PATCH v9 46/56] Don't sync dirty bitmaps in postcopy, Dr. David Alan Gilbert (git), 2015/11/05
- [Qemu-devel] [PATCH v9 47/56] Don't iterate on precopy-only devices during postcopy, Dr. David Alan Gilbert (git), 2015/11/05
- [Qemu-devel] [PATCH v9 48/56] Host page!=target page: Cleanup bitmaps, Dr. David Alan Gilbert (git), 2015/11/05
- [Qemu-devel] [PATCH v9 49/56] Round up RAMBlock sizes to host page sizes,
Dr. David Alan Gilbert (git) <=
- [Qemu-devel] [PATCH v9 50/56] Postcopy; Handle userfault requests, Dr. David Alan Gilbert (git), 2015/11/05
- [Qemu-devel] [PATCH v9 51/56] Start up a postcopy/listener thread ready for incoming page data, Dr. David Alan Gilbert (git), 2015/11/05
- [Qemu-devel] [PATCH v9 52/56] postcopy: Wire up loadvm_postcopy_handle_ commands, Dr. David Alan Gilbert (git), 2015/11/05
- [Qemu-devel] [PATCH v9 53/56] Postcopy: Mark nohugepage before discard, Dr. David Alan Gilbert (git), 2015/11/05
- [Qemu-devel] [PATCH v9 54/56] End of migration for postcopy, Dr. David Alan Gilbert (git), 2015/11/05
- [Qemu-devel] [PATCH v9 55/56] Disable mlock around incoming postcopy, Dr. David Alan Gilbert (git), 2015/11/05
- [Qemu-devel] [PATCH v9 56/56] Inhibit ballooning during postcopy, Dr. David Alan Gilbert (git), 2015/11/05
- Re: [Qemu-devel] [PATCH v9 00/56] Postcopy implementation, Bharata B Rao, 2015/11/05