From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=37102 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PszSr-0003Vk-PN for qemu-devel@nongnu.org; Fri, 25 Feb 2011 10:20:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PszSp-0006dz-Nm for qemu-devel@nongnu.org; Fri, 25 Feb 2011 10:20:17 -0500 Received: from mail-vw0-f45.google.com ([209.85.212.45]:33880) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PszSp-0006du-K0 for qemu-devel@nongnu.org; Fri, 25 Feb 2011 10:20:15 -0500 Received: by vws19 with SMTP id 19so1597711vws.4 for ; Fri, 25 Feb 2011 07:20:15 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: From: Blue Swirl Date: Fri, 25 Feb 2011 17:19:42 +0200 Message-ID: Subject: Re: [Qemu-devel] when to check external interrupt request ? or what is the timing to check and arise external interrupt ? Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: wang sheng Cc: qemu-devel On Tue, Feb 22, 2011 at 6:47 AM, wang sheng wrote: > I'm porting qemu to an new architecture. I come across some difficulty > that I can't define the timing that enable qemu's main-thread to be > interrupt and check external interrupt . > > I understand the way that mips used to check external interrupt . > > in qemu-system-mips , =C2=A0 during do translation , =C2=A0if there is an > instruction that access CP0's Status register and Cause register, =C2=A0t= he > "target-mips/translate.c" will add =C2=A0a calling to function " > helper_interrupt_restart" =C2=A0in the end of the translation_block. > > But in my architecture which use "load/st" instruction to access =C2=A0th= e > contr register in interrupt controller . =C2=A0Because =C2=A0 I can't > distinguish the access for normal memory =C2=A0 and =C2=A0access for =C2= =A0interrupt > controller's register , =C2=A0I =C2=A0can't add =C2=A0"interrupt_restart"= function > calling in the end of translation block. > > How can I do =C2=A0to enable qemu have chance to check external interrupt= ? Please try something similar to how cpu_request_exit function and signal is used by hw/dma.c and hw/pc.c.