Skip to contentSkip to conversation

kvm-all: exit in case max vcpus exceeded

PATCH In review Marcelo Tosatti 2 participants 2 messages Feb 26, 2014 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm-all: exit in case max vcpus exceeded

Rather than fall back to TCG (so the user has to discover whats happening, in case of no access to qemu stdout/stderr).

kvm-all.c +1 -2
index 3937754..3f6841d 100644
@@ -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++;
maintainer
#1 lore raw

Il 26/02/2014 03:22, Marcelo Tosatti ha scritto:

Quoted 14 lines

Rather than fall back to TCG (so the user has to discover whats happening, in case of no access to qemu stdout/stderr).

kvm-all.c +0 -0
index 3937754..3f6841d 100644
@@ -1432,11 +1432,10 @@ int kvm_init(void)
                     nc->name, nc->num, soft_vcpus_limit);
 

kvm-all.c int kvm_init(void) · line 1441

Quoted 10 lines
kvm-all.c +1 -2
             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