From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmQuk-0005Vc-Az for qemu-devel@nongnu.org; Tue, 11 Jun 2013 11:55:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmQui-0004eU-TW for qemu-devel@nongnu.org; Tue, 11 Jun 2013 11:55:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32603) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmQui-0004eI-M4 for qemu-devel@nongnu.org; Tue, 11 Jun 2013 11:55:16 -0400 Date: Tue, 11 Jun 2013 11:55:12 -0400 From: Luiz Capitulino Message-ID: <20130611115512.4862b852@redhat.com> In-Reply-To: <1370794247-28267-15-git-send-email-afaerber@suse.de> References: <1370794247-28267-1-git-send-email-afaerber@suse.de> <1370794247-28267-15-git-send-email-afaerber@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [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: Andreas =?UTF-8?B?RsOkcmJlcg==?= Cc: qiaonuohan@cn.fujitsu.com, qemu-devel@nongnu.org On Sun, 9 Jun 2013 18:10:43 +0200 Andreas F=C3=A4rber wrote: > Instead of calling cpu_synchronize_state() for each CPU, call the > existing cpu_synchronize_all_states() helper. >=20 > Signed-off-by: Andreas F=C3=A4rber Reviewed-by: Luiz Capitulino > --- > dump.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) >=20 > 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