Received: from eggs.gnu.org ([208.118.235.92]:54879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUJQj-0000Fp-Ho for qemu-devel@nongnu.org; Tue, 15 May 2012 11:12:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUJQf-00005q-5D for qemu-devel@nongnu.org; Tue, 15 May 2012 11:12:53 -0400 Received: from smtpout2.laposte.net ([193.253.67.227]:46974 helo=smtpout.laposte.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUJQe-0008U7-RZ for qemu-devel@nongnu.org; Tue, 15 May 2012 11:12:49 -0400 Date: Tue, 15 May 2012 17:12:46 +0200 From: "nicolas.sauzede" Message-ID: <1512121653.606644.1337094765947.JavaMail.www@wwinf8306> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_606643_415991634.1337094765945" Subject: [Qemu-devel] Get current env within io_handler ? Reply-To: "nicolas.sauzede" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ------=_Part_606643_415991634.1337094765945 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi list, I've implemented a way to link a qemu instance (arm) to a running TLM simul= ation. That allows me to use qemu-system-arm as a minimal ARM ISS without any hard= ware device implemented within qemu, all the peripherals are implemented in the TLM simulation. This works by entering the TLM world when called back in the io_handlers. This works fine for uniprocessor mode. But when trying smp mode, I can't manage to retrieve the current env (ie: c= urrent smp processor number, registers, etc..), because it seems like the "cpu_single_env" variable is set to NULL explicit= ly in cpu-exec.c : =C2=A0=C2=A0=C2=A0=C2=A0 /* fail safe : never use cpu_single_env outside cp= u_exec() */ =C2=A0=C2=A0=C2=A0=C2=A0 cpu_single_env =3D NULL; =C2=A0=C2=A0=C2=A0=C2=A0 return ret; =C2=A0} 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 NULL;") Thanks by advance, NS. Une messagerie gratuite, garantie =C3=A0 vie et des services en plus, =C3= =A7a vous tente ? Je cr=C3=A9e ma bo=C3=AEte mail www.laposte.net ------=_Part_606643_415991634.1337094765945 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi list,

I've im= plemented a way to link a qemu instance (arm) to a running TLM simulation.<= br />That allows me to use qemu-system-arm as a minimal ARM ISS without any= hardware device implemented within qemu,
all the peripherals are impl= emented in the TLM simulation.
This works by entering the TLM world wh= en called back in the io_handlers.

This works fine for uniproces= sor mode.
But when trying smp mode, I can't manage to retrieve the cur= rent env (ie: current smp processor number, registers, etc..),
because= it seems like the "cpu_single_env" variable is set to NULL expli= citly in cpu-exec.c :
     /* fail safe : never us= e cpu_single_env outside cpu_exec() */
     cpu_si= ngle_env =3D NULL;
     return ret;
 }
Is this intentional ? Would it be very bad to get access to the c= urrent env in io_handler ? (it works if commenting out "cpu_single_env= =3D NULL;")

Thanks by advance,
NS.

------=_Part_606643_415991634.1337094765945--