This allows us to use fastest path for bitmap operations.
This was based on Paolo idea/code.

Signed-off-by: Juan Quintela <quint...@redhat.com>
---
 exec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/exec.c b/exec.c
index be421e5..faf3f59 100644
--- a/exec.c
+++ b/exec.c
@@ -1108,7 +1108,7 @@ static ram_addr_t find_ram_offset(ram_addr_t size)
     QTAILQ_FOREACH(block, &ram_list.blocks, next) {
         ram_addr_t end, next = RAM_ADDR_MAX;

-        end = block->offset + block->length;
+        end = ROUND_UP(block->offset + block->length, TARGET_PAGE_SIZE * 64);

         QTAILQ_FOREACH(next_block, &ram_list.blocks, next) {
             if (next_block->offset >= end) {
-- 
1.8.3.1


Reply via email to