Commit 9f8fd69460b30bc3817deabd1d76455248b76da2

Authored by Mark McLoughlin
Committed by Anthony Liguori
1 parent 42fa1c2e

kvm: add error message for when SMP is requested

Right now, if you try e.g. '-smp 2' you just get 'failed to
initialize KVM'.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Showing 1 changed file with 3 additions and 1 deletions
kvm-all.c
@@ -338,8 +338,10 @@ int kvm_init(int smp_cpus) @@ -338,8 +338,10 @@ int kvm_init(int smp_cpus)
338 int ret; 338 int ret;
339 int i; 339 int i;
340 340
341 - if (smp_cpus > 1) 341 + if (smp_cpus > 1) {
  342 + fprintf(stderr, "No SMP KVM support, use '-smp 1'\n");
342 return -EINVAL; 343 return -EINVAL;
  344 + }
343 345
344 s = qemu_mallocz(sizeof(KVMState)); 346 s = qemu_mallocz(sizeof(KVMState));
345 347