From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3W79-0002o8-IM for qemu-devel@nongnu.org; Tue, 13 Sep 2011 12:45:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3W75-0001GG-Of for qemu-devel@nongnu.org; Tue, 13 Sep 2011 12:45:39 -0400 Received: from ch1ehsobe006.messaging.microsoft.com ([216.32.181.186]:56787 helo=ch1outboundpool.messaging.microsoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3W75-0001GB-L7 for qemu-devel@nongnu.org; Tue, 13 Sep 2011 12:45:35 -0400 Message-ID: <4E6F8860.6030807@freescale.com> Date: Tue, 13 Sep 2011 11:44:16 -0500 From: Scott Wood MIME-Version: 1.0 References: <1314865231-24433-1-git-send-email-chouteau@adacore.com> <7F526FE3-48CD-45BE-8135-94901C26121D@suse.de> <4E6782AC.9070603@adacore.com> <765F067E-9AD5-4626-8740-1E6FC3A7571F@suse.de> <4E69EC24.4030606@adacore.com> <57B05115-B9BC-4E06-BA27-F415B27B0E86@suse.de> <4E6A1440.9010201@adacore.com> <67C14AF0-B34A-43C8-B9FB-43270D929F87@suse.de> <4E6A212C.30709@adacore.com> <1C102E0E-5ACA-4457-997D-DE4FCAC1F625@suse.de> <4E6E4018.3020106@freescale.com> <4E6F5560.4000506@adacore.com> <4E6F55D8.20802@suse In-Reply-To: <4E6F55D8.20802@suse.de> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-ppc] [RESEND][PATCH] booke timers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: qemu-ppc@nongnu.org, "qemu-devel@nongnu.org Developers" , Fabien Chouteau On 09/13/2011 08:08 AM, Alexander Graf wrote: > Fabien Chouteau wrote: >> static void booke_update_irq(CPUState *env) >> { >> ppc_set_irq(env, PPC_INTERRUPT_DECR, >> (env->spr[SPR_BOOKE_TSR] & TSR_DIS >> && env->spr[SPR_BOOKE_TCR] & TCR_DIE)); >> >> ppc_set_irq(env, PPC_INTERRUPT_WDT, >> (env->spr[SPR_BOOKE_TSR] & TSR_WIS >> && env->spr[SPR_BOOKE_TCR] & TCR_WIE)); >> >> ppc_set_irq(env, PPC_INTERRUPT_FIT, >> (env->spr[SPR_BOOKE_TSR] & TSR_FIS >> && env->spr[SPR_BOOKE_TCR] & TCR_FIE)); >> } >> > > Awesome! Please also check on MSR.EE and send a new patch then :) If you check on EE here, then you'll need to call booke_update_irq() when EE changes (not sure whether that's the plan). Another option would be to unset the irq if the condition is not valid. This would also be better in that you could have all three set (DIS, DIE, EE) and not deliver the interrupt because there's a higher priority exception. -Scott