From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUJXK-0006Pm-7x for qemu-devel@nongnu.org; Tue, 15 May 2012 11:19:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUJXD-00027c-2b for qemu-devel@nongnu.org; Tue, 15 May 2012 11:19:41 -0400 Received: from cantor2.suse.de ([195.135.220.15]:56119 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUJXC-00026y-TD for qemu-devel@nongnu.org; Tue, 15 May 2012 11:19:35 -0400 Message-ID: <4FB27400.3010908@suse.de> Date: Tue, 15 May 2012 17:19:28 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1512121653.606644.1337094765947.JavaMail.www@wwinf8306> In-Reply-To: <1512121653.606644.1337094765947.JavaMail.www@wwinf8306> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Get current env within io_handler ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "nicolas.sauzede" Cc: qemu-devel@nongnu.org Am 15.05.2012 17:12, schrieb nicolas.sauzede: > [...] when trying smp mode, I can't manage to retrieve the current env > (ie: current smp processor number, registers, etc..), > because it seems like the "cpu_single_env" variable is set to NULL > explicitly in cpu-exec.c : > /* fail safe : never use cpu_single_env outside cpu_exec() */ > cpu_single_env =3D NULL; > return ret; > } >=20 > Is this intentional ? Would it be very bad to get access to the current > env in io_handler ? (it works if commenting out "cpu_single_env =3D NUL= L;") I don't understand what io_handler you mean, but usually you have access to an "env" variable, either passed explicitly or available pinned to AREG0 register. cpu_single_env by contrary is most likely not the solution you are looking for. Andreas --=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