From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQLB2-0001Hw-Iu for qemu-devel@nongnu.org; Fri, 04 May 2012 12:16:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQLAx-0007jZ-Fo for qemu-devel@nongnu.org; Fri, 04 May 2012 12:16:16 -0400 Received: from cantor2.suse.de ([195.135.220.15]:43901 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQLAx-0007jR-68 for qemu-devel@nongnu.org; Fri, 04 May 2012 12:16:11 -0400 Message-ID: <4FA400C9.20405@suse.de> Date: Fri, 04 May 2012 18:16:09 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <03886a52f402947d679b559c227acbede52e6c0d.1336128412.git.quintela@redhat.com> In-Reply-To: <03886a52f402947d679b559c227acbede52e6c0d.1336128412.git.quintela@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 02/35] vmstate: make all architectures export a way to migrate cpu's 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: > This makes several changes: > - exports VMStateDescription vmstate_cpu non-static. > - makes sure that every cpu has a vmstate_cpu or cpu_save/load defined > - for the architecture that had nothing, it just register the cpu as un= migratable. > - Depending on CPU_SAVE_VERSION we register old/new migration style > - Add copyrights to the new files >=20 > Signed-off-by: Juan Quintela > --- > exec.c | 2 ++ > target-alpha/machine.c | 12 +----------- > target-i386/machine.c | 2 +- > target-lm32/machine.c | 2 +- > target-m68k/machine.c | 21 +++++++++++++++++++++ > target-s390x/machine.c | 14 ++++++-------- > target-sh4/machine.c | 21 +++++++++++++++++++++ > target-xtensa/machine.c | 14 ++++++-------- > vmstate.h | 2 ++ > 9 files changed, 61 insertions(+), 29 deletions(-) >=20 > diff --git a/exec.c b/exec.c > index cba333f..85f0d61 100644 > --- a/exec.c > +++ b/exec.c > @@ -722,6 +722,8 @@ void cpu_exec_init(CPUArchState *env) > #if defined(CPU_SAVE_VERSION) > register_savevm(NULL, "cpu", cpu_index, CPU_SAVE_VERSION, > cpu_save, cpu_load, env); > +#else > + vmstate_register(NULL, cpu_index, &vmstate_cpu, env); > #endif > #endif > } We have QOM CPUState now, so please add a vmsd field to CPUClass instead of exporting global vmstate_cpu variables. It then matches what we do for former qdev devices and will in the future allow to compile this code only twice. Andreas --=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