From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQGyI-0000c9-E4 for qemu-devel@nongnu.org; Fri, 04 May 2012 07:46:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQGyB-0007fC-6e for qemu-devel@nongnu.org; Fri, 04 May 2012 07:46:49 -0400 Received: from cantor2.suse.de ([195.135.220.15]:57218 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQGyA-0007f5-TR for qemu-devel@nongnu.org; Fri, 04 May 2012 07:46:43 -0400 Message-ID: <4FA3C1A1.8010907@suse.de> Date: Fri, 04 May 2012 13:46:41 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <426453fa2757fc516046dd54832f62503cc95391.1336128412.git.quintela@redhat.com> In-Reply-To: <426453fa2757fc516046dd54832f62503cc95391.1336128412.git.quintela@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 01/35] vmstate: Simplify test for CPU_SAVE_VERSION List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org Am 04.05.2012 12:54, schrieb Juan Quintela: > Some cpu's definitions define CPU_SAVE_VERSION, others not, but they ha= ve "CPUs' definitions"? > defined cpu_save/load. This commit message sounds wrong. Use of cpu_save/load is still coupled to CPU_SAVE_VERSION AFAICS. What really changes is that vmstate_cpu_common is now registered whether or not the target supports loading/saving the target-specific parts, isn't it? Is that really useful? Either way, the commit message should be updated. Andreas >=20 > Signed-off-by: Juan Quintela > --- > exec.c | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) >=20 > diff --git a/exec.c b/exec.c > index 0607c9b..cba333f 100644 > --- a/exec.c > +++ b/exec.c > @@ -650,7 +650,7 @@ void cpu_exec_init_all(void) > #endif > } >=20 > -#if defined(CPU_SAVE_VERSION) && !defined(CONFIG_USER_ONLY) > +#if !defined(CONFIG_USER_ONLY) >=20 > static int cpu_common_post_load(void *opaque, int version_id) > { > @@ -717,11 +717,13 @@ void cpu_exec_init(CPUArchState *env) > #if defined(CONFIG_USER_ONLY) > cpu_list_unlock(); > #endif > -#if defined(CPU_SAVE_VERSION) && !defined(CONFIG_USER_ONLY) > +#if !defined(CONFIG_USER_ONLY) > vmstate_register(NULL, cpu_index, &vmstate_cpu_common, env); > +#if defined(CPU_SAVE_VERSION) > register_savevm(NULL, "cpu", cpu_index, CPU_SAVE_VERSION, > cpu_save, cpu_load, env); > #endif > +#endif > } >=20 > /* Allocate a new translation block. Flush the translation buffer if --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg