diff mbox

[uq/master] kvm-all: exit in case max vcpus exceeded

Message ID 20140226022207.GA2787@amt.cnet (mailing list archive)
State New, archived
Headers show

Commit Message

Marcelo Tosatti Feb. 26, 2014, 2:22 a.m. UTC
Rather than fall back to TCG (so the user has to discover 
whats happening, in case of no access to qemu stdout/stderr).

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>


--
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

Comments

Paolo Bonzini Feb. 26, 2014, 10:27 a.m. UTC | #1
Il 26/02/2014 03:22, Marcelo Tosatti ha scritto:
>
> Rather than fall back to TCG (so the user has to discover
> whats happening, in case of no access to qemu stdout/stderr).
>
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
>
> diff --git a/kvm-all.c b/kvm-all.c
> index 3937754..3f6841d 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -1432,11 +1432,10 @@ int kvm_init(void)
>                      nc->name, nc->num, soft_vcpus_limit);
>
>              if (nc->num > hard_vcpus_limit) {
> -                ret = -EINVAL;
>                  fprintf(stderr, "Number of %s cpus requested (%d) exceeds "
>                          "the maximum cpus supported by KVM (%d)\n",
>                          nc->name, nc->num, hard_vcpus_limit);
> -                goto err;
> +                exit(1);
>              }
>          }
>          nc++;
>

Thanks, I applied this locally.  I'll push to uq/master once the pending 
pull request is processed.

Paolo
--
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
diff mbox

Patch

diff --git a/kvm-all.c b/kvm-all.c
index 3937754..3f6841d 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1432,11 +1432,10 @@  int kvm_init(void)
                     nc->name, nc->num, soft_vcpus_limit);
 
             if (nc->num > hard_vcpus_limit) {
-                ret = -EINVAL;
                 fprintf(stderr, "Number of %s cpus requested (%d) exceeds "
                         "the maximum cpus supported by KVM (%d)\n",
                         nc->name, nc->num, hard_vcpus_limit);
-                goto err;
+                exit(1);
             }
         }
         nc++;