From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuWIR-0004l8-Ld for qemu-devel@nongnu.org; Tue, 10 Jun 2014 20:21:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WuWIL-000540-E2 for qemu-devel@nongnu.org; Tue, 10 Jun 2014 20:21:43 -0400 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) From: Alexander Graf In-Reply-To: <53979F06.3050801@ozlabs.ru> Date: Wed, 11 Jun 2014 02:21:35 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <4BCED356-82CC-4AC1-8B02-05B77CCAD11C@suse.de> 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> <53979F06.3050801@ozlabs.ru> 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: Alexey Kardashevskiy Cc: Stefan Hajnoczi , "qemu-devel@nongnu.org" , Markus Armbruster , "qemu-ppc@nongnu.org" , Alex Bligh , Cornelia Huck , Paolo Bonzini , Luiz Capitulino , =?utf-8?Q?Andreas_F=C3=A4rber?= , Richard Henderson > Am 11.06.2014 um 02:12 schrieb Alexey Kardashevskiy : >=20 >> 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. >>>>=20 >>>> 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). >>>=20 >>> 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. >>>=20 >>> The amount of churn that Alexey is going through for this feature is >>> unreasonable. >>=20 >> I agree. I see two different paths forward: >>=20 >> 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). >=20 >=20 > Ufff... A button? Any good existing example? I think the closest thing we have today is the system_reset call ;). > A device like hw/input/ps2.c? > And HMP's do_mouse_button()? There are queues, I'll need to fight against > them... Yeah, nmi is a debug feature. As I said, I don't care all that much. IMHO we= can just declare that the nmi call runs on vcpu0 always and call it a day. Alex >=20 >=20 >> I don't mind much either way - option 2 is the architecturally correct wa= y >> of doing this. Option 1 probably won't hurt us either. >=20 >=20 >=20 > --=20 > Alexey