From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuWAB-000218-RN for qemu-devel@nongnu.org; Tue, 10 Jun 2014 20:13:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WuWA2-0001m2-I4 for qemu-devel@nongnu.org; Tue, 10 Jun 2014 20:13:11 -0400 Received: from mail-pb0-f50.google.com ([209.85.160.50]:57775) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuWA2-0001lq-DQ for qemu-devel@nongnu.org; Tue, 10 Jun 2014 20:13:02 -0400 Received: by mail-pb0-f50.google.com with SMTP id rp16so1351182pbb.37 for ; Tue, 10 Jun 2014 17:13:01 -0700 (PDT) Message-ID: <53979F06.3050801@ozlabs.ru> Date: Wed, 11 Jun 2014 10:12:54 +1000 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <1401869330-32449-1-git-send-email-aik@ozlabs.ru> <1401869330-32449-2-git-send-email-aik@ozlabs.ru> <20140610093951.6dd64ea4@redhat.com> <20140610164107.249d8290.cornelia.huck@de.ibm.com> <20140610104847.1cb5a424@redhat.com> <53973277.4090500@redhat.com> <539749EB.2050608@suse.de> In-Reply-To: <539749EB.2050608@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 1/4] cpus: Define NMI callback List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf , Paolo Bonzini Cc: Stefan Hajnoczi , qemu-devel@nongnu.org, Markus Armbruster , qemu-ppc@nongnu.org, Alex Bligh , Cornelia Huck , Luiz Capitulino , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , Richard Henderson On 06/11/2014 04:09 AM, Alexander Graf wrote: > On 06/10/2014 06:29 PM, Paolo Bonzini wrote: >> Il 10/06/2014 16:48, Luiz Capitulino ha scritto: >>> > The s390 restart interrupt is a per-vcpu interrupt, which we really >>> > don't want to inject on _all_ vcpus. OTOH, we want to inject that >>> > interrupt on any vcpu - we don't care which one it is. So I'd really >>> > like an "inject nmi on default cpu" option. >>> >>> We could define a default CPU for the command. What isn't going to work >>> is to use the human monitor's "current CPU" concept (set with the cpu >>> command). >> >> It isn't going to work, but to me it seems like a bug. Why was the NMI >> command even converted to QAPI if it cannot work? Let's just use >> monitor_set_cpu from qmp_cpu and call it a day. >> >> The amount of churn that Alexey is going through for this feature is >> unreasonable. > > I agree. I see two different paths forward: > > 1) Use the patches as they are - they seem pretty sound and take the > existing x86/s390 only feature to spapr > 2) Model an "NMI" button. That button would get instantiated by the > machine model. That would allow the wiring to be defined by the board. > Monitor / QMP would only "press" that button (trigger an edge interrupt? > call a function? something). Ufff... A button? Any good existing example? A device like hw/input/ps2.c? And HMP's do_mouse_button()? There are queues, I'll need to fight against them... > I don't mind much either way - option 2 is the architecturally correct way > of doing this. Option 1 probably won't hurt us either. -- Alexey