[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 02/62] ppc: add helpful message when KVM fails to sta
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 02/62] ppc: add helpful message when KVM fails to start VCPU |
Date: |
Fri, 5 Jun 2015 17:15:03 +0200 |
From: Laurent Vivier <address@hidden>
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 <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
kvm-all.c | 8 ++++++++
1 file changed, 8 insertions(+)
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;
}
--
2.4.1
- [Qemu-devel] [PULL 00/62] KVM, dirty bitmap, build system, SMM, icount changes for 2015-06-05, Paolo Bonzini, 2015/06/05
- [Qemu-devel] [PULL 01/62] Move parallel_hds_isa_init to hw/isa/isa-bus.c, Paolo Bonzini, 2015/06/05
- [Qemu-devel] [PULL 02/62] ppc: add helpful message when KVM fails to start VCPU,
Paolo Bonzini <=
- [Qemu-devel] [PULL 04/62] exec: optimize phys_page_set_level, Paolo Bonzini, 2015/06/05
- [Qemu-devel] [PULL 03/62] qemu-nbd: Switch to qemu_set_fd_handler, Paolo Bonzini, 2015/06/05
- [Qemu-devel] [PULL 06/62] memory: the only dirty memory flag for users is DIRTY_MEMORY_VGA, Paolo Bonzini, 2015/06/05
- [Qemu-devel] [PULL 05/62] Makefile.target: set master BUILD_DIR, Paolo Bonzini, 2015/06/05
- [Qemu-devel] [PULL 07/62] g364fb: remove pointless call to memory_region_set_coalescing, Paolo Bonzini, 2015/06/05
- [Qemu-devel] [PULL 08/62] display: enable DIRTY_MEMORY_VGA tracking explicitly, Paolo Bonzini, 2015/06/05
- [Qemu-devel] [PULL 09/62] display: add memory_region_sync_dirty_bitmap calls, Paolo Bonzini, 2015/06/05
- [Qemu-devel] [PULL 10/62] memory: differentiate memory_region_is_logging and memory_region_get_dirty_log_mask, Paolo Bonzini, 2015/06/05
- [Qemu-devel] [PULL 11/62] memory: prepare for multiple bits in the dirty log mask, Paolo Bonzini, 2015/06/05
- [Qemu-devel] [PULL 12/62] framebuffer: check memory_region_is_logging, Paolo Bonzini, 2015/06/05