All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V6 1/4 resend] nmi: convert cpu_index to cpu-index
@ 2011-02-14 10:09 ` Lai Jiangshan
  0 siblings, 0 replies; 8+ messages in thread
From: Lai Jiangshan @ 2011-02-14 10:09 UTC (permalink / raw)
  To: Luiz Capitulino, Markus Armbruster, qemu-devel, aliguori, kvm,
	Avi Kivity, Lai

"cpu-index" which uses hyphen is better name.

Signed-off-by:  Lai Jiangshan <laijs@cn.fujitsu.com>
---
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) {

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH V6 1/4 resend] nmi: convert cpu_index to cpu-index
@ 2011-02-14 10:09 ` Lai Jiangshan
  0 siblings, 0 replies; 8+ messages in thread
From: Lai Jiangshan @ 2011-02-14 10:09 UTC (permalink / raw)
  To: Luiz Capitulino, Markus Armbruster, qemu-devel, aliguori, kvm,
	Avi Kivity, Lai Jiangshan

"cpu-index" which uses hyphen is better name.

Signed-off-by:  Lai Jiangshan <laijs@cn.fujitsu.com>
---
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) {

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH V6 1/4 resend] nmi: convert cpu_index to cpu-index
  2011-02-14 10:09 ` [Qemu-devel] " Lai Jiangshan
@ 2011-02-21  1:37   ` Lai Jiangshan
  -1 siblings, 0 replies; 8+ messages in thread
From: Lai Jiangshan @ 2011-02-21  1:37 UTC (permalink / raw)
  To: Luiz Capitulino, Markus Armbruster, qemu-devel, aliguori, kvm,
	Avi Kivity, Lai

Hi, Luiz Capitulino

Any problem?

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 <laijs@cn.fujitsu.com>
> ---
> 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
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] Re: [PATCH V6 1/4 resend] nmi: convert cpu_index to cpu-index
@ 2011-02-21  1:37   ` Lai Jiangshan
  0 siblings, 0 replies; 8+ messages in thread
From: Lai Jiangshan @ 2011-02-21  1:37 UTC (permalink / raw)
  To: Luiz Capitulino, Markus Armbruster, qemu-devel, aliguori, kvm,
	Avi Kivity, Lai Jiangshan

Hi, Luiz Capitulino

Any problem?

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 <laijs@cn.fujitsu.com>
> ---
> 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
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH V6 1/4 resend] nmi: convert cpu_index to cpu-index
  2011-02-21  1:37   ` [Qemu-devel] " Lai Jiangshan
@ 2011-02-23 18:56     ` Luiz Capitulino
  -1 siblings, 0 replies; 8+ messages in thread
From: Luiz Capitulino @ 2011-02-23 18:56 UTC (permalink / raw)
  To: Lai Jiangshan
  Cc: aliguori, Jiangshan, Lai, kvm, Markus Armbruster, qemu-devel, Avi Kivity

On Mon, 21 Feb 2011 09:37:57 +0800
Lai Jiangshan <laijs@cn.fujitsu.com> 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 <laijs@cn.fujitsu.com>
> > ---
> > 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
> > 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] Re: [PATCH V6 1/4 resend] nmi: convert cpu_index to cpu-index
@ 2011-02-23 18:56     ` Luiz Capitulino
  0 siblings, 0 replies; 8+ messages in thread
From: Luiz Capitulino @ 2011-02-23 18:56 UTC (permalink / raw)
  To: Lai Jiangshan
  Cc: aliguori, Jiangshan, Lai, kvm, Markus Armbruster, qemu-devel, Avi Kivity

On Mon, 21 Feb 2011 09:37:57 +0800
Lai Jiangshan <laijs@cn.fujitsu.com> 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 <laijs@cn.fujitsu.com>
> > ---
> > 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
> > 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Re: [PATCH V6 1/4 resend] nmi: convert cpu_index to cpu-index
  2011-02-23 18:56     ` [Qemu-devel] " Luiz Capitulino
@ 2011-02-24  7:49       ` Markus Armbruster
  -1 siblings, 0 replies; 8+ messages in thread
From: Markus Armbruster @ 2011-02-24  7:49 UTC (permalink / raw)
  To: Luiz Capitulino
  Cc: Lai Jiangshan, aliguori, Jiangshan, Lai, kvm, qemu-devel, Avi Kivity

Luiz Capitulino <lcapitulino@redhat.com> writes:

> On Mon, 21 Feb 2011 09:37:57 +0800
> Lai Jiangshan <laijs@cn.fujitsu.com> 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?

This is not Lai Jiangshan's fault.  It's what
QERR_INVALID_PARAMETER_VALUE reports.  The current design of QError
makes it hard to do better.

"expects a valid CPU number" could be done, if you think that's better.

> By the way, please add an introductory email with proper changelog
> when submitting series/patches, so that it's easier to review.

Also make sure the parts are threaded together properly with In-Reply-To
and References headers, because that helps e-mail readers to keep the
parts together.  Lack of threading is annoying, and annoying reviewers
intentionally would be rude :)

Suggested workflow:

git-format-patch --cover-letter -ns ...
look over patch files, edit the cover letter to taste
git-send-email --to qemu-devel@nongnu.org 0*.patch

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Re: [PATCH V6 1/4 resend] nmi: convert cpu_index to cpu-index
@ 2011-02-24  7:49       ` Markus Armbruster
  0 siblings, 0 replies; 8+ messages in thread
From: Markus Armbruster @ 2011-02-24  7:49 UTC (permalink / raw)
  To: Luiz Capitulino
  Cc: aliguori, Jiangshan, Lai Jiangshan, kvm, qemu-devel, Avi Kivity, Lai

Luiz Capitulino <lcapitulino@redhat.com> writes:

> On Mon, 21 Feb 2011 09:37:57 +0800
> Lai Jiangshan <laijs@cn.fujitsu.com> 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?

This is not Lai Jiangshan's fault.  It's what
QERR_INVALID_PARAMETER_VALUE reports.  The current design of QError
makes it hard to do better.

"expects a valid CPU number" could be done, if you think that's better.

> By the way, please add an introductory email with proper changelog
> when submitting series/patches, so that it's easier to review.

Also make sure the parts are threaded together properly with In-Reply-To
and References headers, because that helps e-mail readers to keep the
parts together.  Lack of threading is annoying, and annoying reviewers
intentionally would be rude :)

Suggested workflow:

git-format-patch --cover-letter -ns ...
look over patch files, edit the cover letter to taste
git-send-email --to qemu-devel@nongnu.org 0*.patch

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-02-24  7:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-14 10:09 [PATCH V6 1/4 resend] nmi: convert cpu_index to cpu-index Lai Jiangshan
2011-02-14 10:09 ` [Qemu-devel] " Lai Jiangshan
2011-02-21  1:37 ` Lai Jiangshan
2011-02-21  1:37   ` [Qemu-devel] " Lai Jiangshan
2011-02-23 18:56   ` Luiz Capitulino
2011-02-23 18:56     ` [Qemu-devel] " Luiz Capitulino
2011-02-24  7:49     ` Markus Armbruster
2011-02-24  7:49       ` Markus Armbruster

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.