From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KwbpT-0001kJ-Dg for qemu-devel@nongnu.org; Sun, 02 Nov 2008 07:13:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KwbpQ-0001jO-S8 for qemu-devel@nongnu.org; Sun, 02 Nov 2008 07:13:14 -0500 Received: from [199.232.76.173] (port=57052 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KwbpQ-0001jL-O1 for qemu-devel@nongnu.org; Sun, 02 Nov 2008 07:13:12 -0500 Received: from mail.codesourcery.com ([65.74.133.4]:59289) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KwbpQ-0001rz-Aq for qemu-devel@nongnu.org; Sun, 02 Nov 2008 07:13:12 -0500 From: Paul Brook Subject: Re: [Qemu-devel] [5601] Halt the CPU using a qemu_irq Date: Sun, 2 Nov 2008 13:12:53 +0100 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811021213.05223.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl > +static void cpu_halt_signal(void *opaque, int irq, int level) > +{ > + if (level && cpu_single_env) > + cpu_interrupt(cpu_single_env, CPU_INTERRUPT_HALT); > +} >... > + cpu_halt = qemu_allocate_irqs(cpu_halt_signal, NULL, 1); Will this DTRT for SMP, or should we be including cpu_env as an argument to cpu_halt_signal? Relying on cpu_single_env being set in an IRQ handler seems kinda sketchy. Paul