From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60344 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZkkb-0002v9-1M for qemu-devel@nongnu.org; Mon, 03 Jan 2011 08:47:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PZkkZ-0008SX-9i for qemu-devel@nongnu.org; Mon, 03 Jan 2011 08:47:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45298) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PZkkZ-0008SS-36 for qemu-devel@nongnu.org; Mon, 03 Jan 2011 08:47:03 -0500 Date: Mon, 3 Jan 2011 11:46:52 -0200 From: Luiz Capitulino Subject: Re: [Qemu-devel] Re: [PATCH v3] qemu, qmp: convert do_inject_nmi() to QObject, QError Message-ID: <20110103114652.23e49d02@doriath> In-Reply-To: <4D0EF301.8040903@cn.fujitsu.com> References: <4D088F27.8000909@cn.fujitsu.com> <20101215150911.14e1693f@doriath> <4D08F868.5090100@redhat.com> <20101215152606.078147ad@doriath> <20101215160000.16f85795@doriath> <4D09D5EA.7070000@redhat.com> <20101216084815.3ca77188@doriath> <4D0A0B00.3070108@redhat.com> <20101216110917.646779b7@doriath> <4D0A1016.7060408@redhat.com> <20101216111752.77757c00@doriath> <4D0B011F.8060502@cn.fujitsu.com> <20101217092234.0e43101d@doriath> <4D0B80E2.4070307@redhat.com> <4D0EF301.8040903@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lai Jiangshan Cc: qemu-devel@nongnu.org, aliguori@us.ibm.com, Avi Kivity , kvm@vger.kernel.org, Markus Armbruster On Mon, 20 Dec 2010 14:09:05 +0800 Lai Jiangshan wrote: > On 12/17/2010 11:25 PM, Avi Kivity wrote: > > On 12/17/2010 01:22 PM, Luiz Capitulino wrote: > >> > > >> > I think Avi's suggest is better, and I will use > >> > "inject-nmi" (without cpu-index argument) to send NMI to all cpus, > >> > like physical GUI. If some one want to send NMI to a set of cpus, > >> > he can use "inject-nmi" multiple times. > >> > >> His suggestion is to drop _all_ arguments, right Avi? > > > > Yes. > > > > We don't need to drop the cpu-index argument, > the upstream tools(libvirt etc.) can just issue "inject-nmi" > command without any argument when need. > > Reasons to keep this argument > 1) Useful for kernel developer or debuger sending NMI to a special CPU. Ok. > 2) Share the code with nmi of hmp version. Share the way how to > use these two commands.(hmp version and qmp version) This is bad. As a general rule, we shouldn't tweak QMP interfaces with the intention of sharing code with HMP or anything like that. Anyway, I buy your first argument, although I'm not a kernel developer so I'm just trusting your use case.