From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UogVa-0002r0-2G for qemu-devel@nongnu.org; Mon, 17 Jun 2013 16:58:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UogVZ-00024L-43 for qemu-devel@nongnu.org; Mon, 17 Jun 2013 16:58:38 -0400 Received: from cantor2.suse.de ([195.135.220.15]:60818 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UogVY-00024H-Tf for qemu-devel@nongnu.org; Mon, 17 Jun 2013 16:58:37 -0400 Message-ID: <51BF787A.7030100@suse.de> Date: Mon, 17 Jun 2013 22:58:34 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1371398269-6213-1-git-send-email-afaerber@suse.de> <1371398269-6213-3-git-send-email-afaerber@suse.de> <51BF67A0.3030307@twiddle.net> In-Reply-To: <51BF67A0.3030307@twiddle.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH qom-cpu v2 02/29] kvm: Change cpu_synchronize_state() argument to CPUState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org Am 17.06.2013 21:46, schrieb Richard Henderson: > On 06/16/2013 08:57 AM, Andreas F=C3=A4rber wrote: >> @@ -627,7 +627,7 @@ static void vapic_write(void *opaque, hwaddr addr,= uint64_t data, >> hwaddr rom_paddr; >> VAPICROMState *s =3D opaque; >> =20 >> - cpu_synchronize_state(env); >> + cpu_synchronize_state(CPU(x86_env_get_cpu(env))); >=20 > ENV_GET_CPU, surely. No, ENV_GET_CPU() is only a compatibility macro for generic code and shouldn't be used in target-specific code. Background is that foo_env_get_cpu() can coexist with bar_env_get_cpu() whereas ENV_GET_CPU() relies on there being only one arch per executable, which we hope to fix for heterogeneous emulations. Andreas >> @@ -66,7 +66,7 @@ static uint64_t vmport_ioport_read(void *opaque, hwa= ddr addr, >> unsigned char command; >> uint32_t eax; >> =20 >> - cpu_synchronize_state(env); >> + cpu_synchronize_state(CPU(x86_env_get_cpu(env))); >=20 > Likewise. >=20 >> @@ -78,7 +78,7 @@ void dump_slb(FILE *f, fprintf_function cpu_fprintf,= CPUPPCState *env) >> int i; >> uint64_t slbe, slbv; >> =20 >> - cpu_synchronize_state(env); >> + cpu_synchronize_state(CPU(ppc_env_get_cpu(env))); >=20 > Likewise. >=20 >> @@ -9534,7 +9534,7 @@ void cpu_dump_state (CPUPPCState *env, FILE *f, = fprintf_function cpu_fprintf, >> =20 >> int i; >> =20 >> - cpu_synchronize_state(env); >> + cpu_synchronize_state(CPU(ppc_env_get_cpu(env))); >=20 > Likewise. >=20 >=20 >=20 > r~ >=20 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg