Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NAV8T-0000C3-B7 for qemu-devel@nongnu.org; Tue, 17 Nov 2009 15:58:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NAV8O-00007i-Nu for qemu-devel@nongnu.org; Tue, 17 Nov 2009 15:58:48 -0500 Received: from [199.232.76.173] (port=58594 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAV8O-00007e-Du for qemu-devel@nongnu.org; Tue, 17 Nov 2009 15:58:44 -0500 Received: from mail-yw0-f176.google.com ([209.85.211.176]:63371) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NAV8N-0004Gh-Vg for qemu-devel@nongnu.org; Tue, 17 Nov 2009 15:58:44 -0500 Received: by ywh6 with SMTP id 6so424583ywh.4 for ; Tue, 17 Nov 2009 12:58:43 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20091116223521.GC12063@shareable.org> References: <20091116223521.GC12063@shareable.org> From: Blue Swirl Date: Tue, 17 Nov 2009 22:45:14 +0200 Message-ID: Subject: Re: [Qemu-devel] Re: [PATCH] sparc32 irq clearing (guest Solaris performance+NetBSD) fix Content-Type: text/plain; charset=UTF-8 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier Cc: qemu-devel , Artyom Tarasenko On Tue, Nov 17, 2009 at 12:35 AM, Jamie Lokier wrote: > Artyom Tarasenko wrote: >> I don't know, how the real sun4m reacts in the case where irq stays >> on, not being cleared. >> It can not be though that it would try to process irq for every next >> tick. The CPU must have some time to clear the pending irq, so it must >> be edge triggered too, at least in a way. > > In general, most CPUs have a "disable interrupts" flag which is set at > the same time as calling the irq handler. > > That's enough, even if everything about interrupts is level triggered, > so you can't assume anything is edge triggered just from that alone. > > However if a CPU doesn't have an "disable interrupts" flag, then of > course the triggering must be edge triggered somewhere. Sparc has a flag for disabling all traps. Also the minimum allowed interrupt level (PIL) can be selected from 0 to 14, level 15 is non-maskable from CPU point of view. This level allows interrupt handlers to be interrupted by a higher priority interrupt, if the traps are enabled.