Received: from eggs.gnu.org ([2001:4830:134:3::10]:51975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UliCz-0002OJ-Un for qemu-devel@nongnu.org; Sun, 09 Jun 2013 12:11:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UliCy-0001wY-7I for qemu-devel@nongnu.org; Sun, 09 Jun 2013 12:11:09 -0400 Received: from cantor2.suse.de ([195.135.220.15]:39891 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UliCy-0001wQ-01 for qemu-devel@nongnu.org; Sun, 09 Jun 2013 12:11:08 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 9 Jun 2013 18:10:43 +0200 Message-Id: <1370794247-28267-15-git-send-email-afaerber@suse.de> In-Reply-To: <1370794247-28267-1-git-send-email-afaerber@suse.de> References: <1370794247-28267-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH qom-cpu v4 14/18] dump: Abstract dump_init() with cpu_synchronize_all_states() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qiaonuohan@cn.fujitsu.com, =?UTF-8?q?Andreas=20F=C3=A4rber?= , lcapitulino@redhat.com Instead of calling cpu_synchronize_state() for each CPU, call the existing cpu_synchronize_all_states() helper. Signed-off-by: Andreas F=C3=A4rber --- dump.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dump.c b/dump.c index b44dafc..44a1339 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" =20 @@ -732,12 +733,12 @@ static int dump_init(DumpState *s, int fd, bool pag= ing, 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 d= ump + * If we use KVM, we should synchronize the registers before we get = dump * info. */ + cpu_synchronize_all_states(); nr_cpus =3D 0; for (env =3D first_cpu; env !=3D NULL; env =3D env->next_cpu) { - cpu_synchronize_state(env); nr_cpus++; } =20 --=20 1.8.1.4