From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuQUg-0006Av-Iz for qemu-devel@nongnu.org; Tue, 10 Jun 2014 14:10:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WuQUY-0007co-V7 for qemu-devel@nongnu.org; Tue, 10 Jun 2014 14:09:58 -0400 Message-ID: <539749EB.2050608@suse.de> Date: Tue, 10 Jun 2014 20:09:47 +0200 From: Alexander Graf 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> In-Reply-To: <53973277.4090500@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: Paolo Bonzini Cc: Stefan Hajnoczi , Alexey Kardashevskiy , qemu-devel@nongnu.org, Markus Armbruster , qemu-ppc@nongnu.org, Alex Bligh , Cornelia Huck , Luiz Capitulino , =?ISO-8859-1?Q?Andreas_F=E4rber?= , Richard Henderson 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). 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. Alex