summaryrefslogtreecommitdiffstats
path: root/kvm-all.c
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2015-05-18 21:06:47 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-06-05 17:09:58 +0200
commitdae02ba55a66cb3194a2410c7725734e5bc6166f (patch)
treed4fb3a29809548ede42210546f68c56701cc40c6 /kvm-all.c
parent9157eee1b1c076ff3316361b760e891dda13e9bf (diff)
downloadhqemu-dae02ba55a66cb3194a2410c7725734e5bc6166f.zip
hqemu-dae02ba55a66cb3194a2410c7725734e5bc6166f.tar.gz
ppc: add helpful message when KVM fails to start VCPU
On POWER8 systems, KVM checks if VCPU is running on primary threads, and that secondary threads are offline. If this is not the case, ioctl() fails with errno set to EBUSY. QEMU aborts with a non explicit error message: $ ./qemu-system-ppc64 --nographic -machine pseries,accel=kvm error: kvm run failed Device or resource busy To help user to diagnose the problem, this patch adds an informative error message. There is no easy way to check if SMT is enabled before starting the VCPU, and as this case is the only one setting errno to EBUSY, we just check the errno value to display a message. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Message-Id: <1431976007-20503-1-git-send-email-lvivier@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kvm-all.c b/kvm-all.c
index b2b1bc3..44a34a5 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1828,6 +1828,14 @@ int kvm_cpu_exec(CPUState *cpu)
}
fprintf(stderr, "error: kvm run failed %s\n",
strerror(-run_ret));
+#ifdef TARGET_PPC
+ if (run_ret == -EBUSY) {
+ fprintf(stderr,
+ "This is probably because your SMT is enabled.\n"
+ "VCPU can only run on primary threads with all "
+ "secondary threads offline.\n");
+ }
+#endif
ret = -1;
break;
}
OpenPOWER on IntegriCloud