Commit 168ccc11c323af885de353d9e045c0c1f78f6f2f
Committed by
Blue Swirl
1 parent
4ca1a9c6
kvm: Improve upgrade notes when facing unsupported kernels
Users complained that it is not obvious what to do when kvm refuses to build or run due to an unsupported host kernel, so let's improve the hints. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Showing
2 changed files
with
11 additions
and
5 deletions
configure
... | ... | @@ -1158,7 +1158,9 @@ EOF |
1158 | 1158 | | grep "error: " \ |
1159 | 1159 | | awk -F "error: " '{if (NR>1) printf(", "); printf("%s",$2);}'` |
1160 | 1160 | if test "$kvmerr" != "" ; then |
1161 | - kvm="no - (${kvmerr})" | |
1161 | + kvm="no - (${kvmerr})\n\ | |
1162 | + NOTE: To enable KVM support, update your kernel to 2.6.29+ or install \ | |
1163 | +recent kvm-kmod from http://sourceforge.net/projects/kvm." | |
1162 | 1164 | fi |
1163 | 1165 | fi |
1164 | 1166 | fi |
... | ... | @@ -1377,7 +1379,7 @@ echo "vde support $vde" |
1377 | 1379 | echo "AIO support $aio" |
1378 | 1380 | echo "IO thread $io_thread" |
1379 | 1381 | echo "Install blobs $blobs" |
1380 | -echo "KVM support $kvm" | |
1382 | +echo -e "KVM support $kvm" | |
1381 | 1383 | echo "fdt support $fdt" |
1382 | 1384 | echo "preadv support $preadv" |
1383 | 1385 | ... | ... |
kvm-all.c
... | ... | @@ -404,6 +404,9 @@ static void kvm_reset_vcpus(void *opaque) |
404 | 404 | |
405 | 405 | int kvm_init(int smp_cpus) |
406 | 406 | { |
407 | + static const char upgrade_note[] = | |
408 | + "Please upgrade to at least kernel 2.6.29 or recent kvm-kmod\n" | |
409 | + "(see http://sourceforge.net/projects/kvm).\n"; | |
407 | 410 | KVMState *s; |
408 | 411 | int ret; |
409 | 412 | int i; |
... | ... | @@ -454,7 +457,8 @@ int kvm_init(int smp_cpus) |
454 | 457 | */ |
455 | 458 | if (!kvm_check_extension(s, KVM_CAP_USER_MEMORY)) { |
456 | 459 | ret = -EINVAL; |
457 | - fprintf(stderr, "kvm does not support KVM_CAP_USER_MEMORY\n"); | |
460 | + fprintf(stderr, "kvm does not support KVM_CAP_USER_MEMORY\n%s", | |
461 | + upgrade_note); | |
458 | 462 | goto err; |
459 | 463 | } |
460 | 464 | |
... | ... | @@ -465,8 +469,8 @@ int kvm_init(int smp_cpus) |
465 | 469 | ret = -EINVAL; |
466 | 470 | |
467 | 471 | fprintf(stderr, |
468 | - "KVM kernel module broken (DESTROY_MEMORY_REGION)\n" | |
469 | - "Please upgrade to at least kvm-81.\n"); | |
472 | + "KVM kernel module broken (DESTROY_MEMORY_REGION).\n%s", | |
473 | + upgrade_note); | |
470 | 474 | goto err; |
471 | 475 | } |
472 | 476 | ... | ... |