Received: from eggs.gnu.org ([2001:4830:134:3::10]:42397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Umvff-0008IP-3w for qemu-devel@nongnu.org; Wed, 12 Jun 2013 20:45:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Umvfc-0005XM-11 for qemu-devel@nongnu.org; Wed, 12 Jun 2013 20:45:46 -0400 Received: from cantor2.suse.de ([195.135.220.15]:32937 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Umvfb-0005Ws-F6 for qemu-devel@nongnu.org; Wed, 12 Jun 2013 20:45:43 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E4FF5A5388 for ; Thu, 13 Jun 2013 02:45:42 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Thu, 13 Jun 2013 02:45:26 +0200 Message-Id: <1371084329-814-15-git-send-email-afaerber@suse.de> In-Reply-To: <1371084329-814-1-git-send-email-afaerber@suse.de> References: <1371084329-814-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] [PULL 14/17] 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: =?UTF-8?q?Andreas=20F=C3=A4rber?= Instead of calling cpu_synchronize_state() for each CPU, call the existing cpu_synchronize_all_states() helper. Reviewed-by: Luiz Capitulino 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 c0d3da5..87ca12c 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 @@ -731,12 +732,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