kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [uq/master PATCH] kvm-all: exit in case max vcpus exceeded
@ 2014-02-26  2:22 Marcelo Tosatti
  2014-02-26 10:27 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Tosatti @ 2014-02-26  2:22 UTC (permalink / raw)
  To: kvm-devel; +Cc: Paolo Bonzini


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


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

* Re: [uq/master PATCH] kvm-all: exit in case max vcpus exceeded
  2014-02-26  2:22 [uq/master PATCH] kvm-all: exit in case max vcpus exceeded Marcelo Tosatti
@ 2014-02-26 10:27 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2014-02-26 10:27 UTC (permalink / raw)
  To: Marcelo Tosatti, kvm-devel

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

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

end of thread, other threads:[~2014-02-26 10:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-26  2:22 [uq/master PATCH] kvm-all: exit in case max vcpus exceeded Marcelo Tosatti
2014-02-26 10:27 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).