Skip to contentSkip to conversation

kvm: add error message for when SMP is requested

PATCH New Mark McLoughlin 1 participant 1 message May 12, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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'.

---
 kvm-all.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
kvm-all.c +3 -1
index 0ac4b1e..73e814a 100644
@@ -338,8 +338,10 @@ int kvm_init(int smp_cpus)
     int ret;
     int i;
 
-    if (smp_cpus > 1)
+    if (smp_cpus > 1) {
+        fprintf(stderr, "No SMP KVM support, use '-smp 1'\n");
         return -EINVAL;
+    }
 
     s = qemu_mallocz(sizeof(KVMState));
 
Signature · 1 line
1.6.0.6