From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luiz Capitulino Subject: Re: [PATCH V6 1/4 resend] nmi: convert cpu_index to cpu-index Date: Wed, 23 Feb 2011 15:56:51 -0300 Message-ID: <20110223155651.1d09e3f4@doriath> References: <4D58FF49.5090503@cn.fujitsu.com> <4D61C1F5.4080801@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: aliguori@us.ibm.com, Jiangshan , Lai, kvm@vger.kernel.org, Markus Armbruster , qemu-devel@nongnu.org, Avi Kivity To: Lai Jiangshan Return-path: In-Reply-To: <4D61C1F5.4080801@cn.fujitsu.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org On Mon, 21 Feb 2011 09:37:57 +0800 Lai Jiangshan wrote: > Hi, Luiz Capitulino > > Any problem? Sorry for the delay. Looks good in general to me know, there's only one small problem and it's the error message: (qemu) nmi 100 Parameter 'cpu-index' expects a CPU number (qemu) I would expect that kind of error message when no CPU number is provided, but in the case above the CPU number is provided but it happens to be invalid. Why? By the way, please add an introductory email with proper changelog when submitting series/patches, so that it's easier to review. > > Thanks, > Lai > > On 02/14/2011 06:09 PM, Lai Jiangshan wrote: > > "cpu-index" which uses hyphen is better name. > > > > Signed-off-by: Lai Jiangshan > > --- > > diff --git a/hmp-commands.hx b/hmp-commands.hx > > index 5d4cb9e..e43ac7c 100644 > > --- a/hmp-commands.hx > > +++ b/hmp-commands.hx > > @@ -721,7 +721,7 @@ ETEXI > > #if defined(TARGET_I386) > > { > > .name = "nmi", > > - .args_type = "cpu_index:i", > > + .args_type = "cpu-index:i", > > .params = "cpu", > > .help = "inject an NMI on the given CPU", > > .mhandler.cmd = do_inject_nmi, > > diff --git a/monitor.c b/monitor.c > > index 27883f8..a916771 100644 > > --- a/monitor.c > > +++ b/monitor.c > > @@ -2545,7 +2545,7 @@ static void do_wav_capture(Monitor *mon, const QDict *qdict) > > static void do_inject_nmi(Monitor *mon, const QDict *qdict) > > { > > CPUState *env; > > - int cpu_index = qdict_get_int(qdict, "cpu_index"); > > + int cpu_index = qdict_get_int(qdict, "cpu-index"); > > > > for (env = first_cpu; env != NULL; env = env->next_cpu) > > if (env->cpu_index == cpu_index) { > > -- > > To unsubscribe from this list: send the line "unsubscribe kvm" in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > >