Patchwork [1/2] Use ram_bytes_remaining() where possible

login
register
mail settings
Submitter Pierre Riteau
Date May 12, 2010, 1:12 p.m.
Message ID <1273669950-29739-1-git-send-email-Pierre.Riteau@irisa.fr>
Download mbox | patch
Permalink /patch/52381/
State New
Headers show

Comments

Pierre Riteau - May 12, 2010, 1:12 p.m.
Signed-off-by: Pierre Riteau <Pierre.Riteau@irisa.fr>
---
 arch_init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/arch_init.c b/arch_init.c
index cfc03ea..cf6b7b0 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -235,7 +235,7 @@  int ram_save_live(Monitor *mon, QEMUFile *f, int stage, void *opaque)
 
     qemu_put_be64(f, RAM_SAVE_FLAG_EOS);
 
-    expected_time = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth;
+    expected_time = ram_bytes_remaining() / bwidth;
 
     return (stage == 2) && (expected_time <= migrate_max_downtime());
 }