Il 29/01/2014 06:50, Alexey Kardashevskiy ha scritto:
Since 64K system page size is quite popular configuration on PPC64,
the original patch breaks migration.
Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru>
---
include/exec/ram_addr.h | 54 +++++++++++++++++--------------------------------
1 file changed, 18 insertions(+), 36 deletions(-)
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
index 33c8acc..c6736ed 100644
--- a/include/exec/ram_addr.h
+++ b/include/exec/ram_addr.h
@@ -83,47 +83,29 @@ static inline void
cpu_physical_memory_set_dirty_lebitmap(unsigned long *bitmap,
ram_addr_t start,
ram_addr_t pages)
{
- unsigned long i, j;
+ unsigned int i, j;
unsigned long page_number, c;
hwaddr addr;
ram_addr_t ram_addr;
- unsigned long len = (pages + HOST_LONG_BITS - 1) / HOST_LONG_BITS;
+ unsigned int len = (pages + HOST_LONG_BITS - 1) / HOST_LONG_BITS;
unsigned long hpratio = getpagesize() / TARGET_PAGE_SIZE;
- unsigned long page = BIT_WORD(start >> TARGET_PAGE_BITS);
- /* start address is aligned at the start of a word? */
- if (((page * BITS_PER_LONG) << TARGET_PAGE_BITS) == start) {
Why not just add " && hpratio == 1" here?
Paolo