aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2017-03-21 17:44:30 +0100
committerJuan Quintela <quintela@redhat.com>2017-04-21 12:25:40 +0200
commitb8c4899398126a1dd80377e14d4ba471018293d3 (patch)
tree5a440b00d317c8d2d79ab06846826ee440940a0e /exec.c
parentf20e2865167d2c147ccb42a445764e1ec99483e0 (diff)
downloadqemu-b8c4899398126a1dd80377e14d4ba471018293d3.zip
qemu-b8c4899398126a1dd80377e14d4ba471018293d3.tar.gz
qemu-b8c4899398126a1dd80377e14d4ba471018293d3.tar.bz2
ram: rename last_ram_offset() last_ram_pages()
We always use it as pages anyways. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/exec.c b/exec.c
index 7a640c7..de843f4 100644
--- a/exec.c
+++ b/exec.c
@@ -1528,7 +1528,7 @@ static ram_addr_t find_ram_offset(ram_addr_t size)
return offset;
}
-ram_addr_t last_ram_offset(void)
+unsigned long last_ram_page(void)
{
RAMBlock *block;
ram_addr_t last = 0;
@@ -1538,7 +1538,7 @@ ram_addr_t last_ram_offset(void)
last = MAX(last, block->offset + block->max_length);
}
rcu_read_unlock();
- return last;
+ return last >> TARGET_PAGE_BITS;
}
static void qemu_ram_setup_dump(void *addr, ram_addr_t size)
@@ -1727,7 +1727,7 @@ static void ram_block_add(RAMBlock *new_block, Error **errp)
ram_addr_t old_ram_size, new_ram_size;
Error *err = NULL;
- old_ram_size = last_ram_offset() >> TARGET_PAGE_BITS;
+ old_ram_size = last_ram_page();
qemu_mutex_lock_ramlist();
new_block->offset = find_ram_offset(new_block->max_length);