aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-06-09 16:48:29 +0200
committerAndreas Färber <afaerber@suse.de>2013-06-11 19:01:39 +0200
commit1b3509ca5bbd8e7d2be92ac42196a3ee2e31cb03 (patch)
tree1b13463c1d666beff15d37f3d8fdae7c2609865d
parent6db297ea361f4e03c096a0f28f26b060f0060de5 (diff)
dump: Abstract dump_init() with cpu_synchronize_all_states()
Instead of calling cpu_synchronize_state() for each CPU, call the existing cpu_synchronize_all_states() helper. Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
-rw-r--r--dump.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dump.c b/dump.c
index c0d3da515b..87ca12cee0 100644
--- a/dump.c
+++ b/dump.c
@@ -21,6 +21,7 @@
#include "sysemu/dump.h"
#include "sysemu/sysemu.h"
#include "sysemu/memory_mapping.h"
+#include "sysemu/cpus.h"
#include "qapi/error.h"
#include "qmp-commands.h"
@@ -731,12 +732,12 @@ static int dump_init(DumpState *s, int fd, bool paging, bool has_filter,
* If the target architecture is not supported, cpu_get_dump_info() will
* return -1.
*
- * if we use kvm, we should synchronize the register before we get dump
+ * If we use KVM, we should synchronize the registers before we get dump
* info.
*/
+ cpu_synchronize_all_states();
nr_cpus = 0;
for (env = first_cpu; env != NULL; env = env->next_cpu) {
- cpu_synchronize_state(env);
nr_cpus++;
}