summaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@web.de>2009-06-07 11:30:25 +0200
committerBlue Swirl <blauwirbel@gmail.com>2009-06-07 16:40:22 +0300
commitf6e96670cf288192213ce4d342c46d5015727826 (patch)
treed75e9a932496d36c94f274aad5d0039f6df0f6a2 /kvm-all.c
parent5d617808c891de18a6b7bb4b44a11795bcb2cf27 (diff)
downloadqemu-f6e96670cf288192213ce4d342c46d5015727826.tar.gz
qemu-f6e96670cf288192213ce4d342c46d5015727826.tar.bz2
qemu-f6e96670cf288192213ce4d342c46d5015727826.zip
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>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/kvm-all.c b/kvm-all.c
index c89e3b1cfe..b24d8766f4 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -404,6 +404,9 @@ static void kvm_reset_vcpus(void *opaque)
int kvm_init(int smp_cpus)
{
+ static const char upgrade_note[] =
+ "Please upgrade to at least kernel 2.6.29 or recent kvm-kmod\n"
+ "(see http://sourceforge.net/projects/kvm).\n";
KVMState *s;
int ret;
int i;
@@ -454,7 +457,8 @@ int kvm_init(int smp_cpus)
*/
if (!kvm_check_extension(s, KVM_CAP_USER_MEMORY)) {
ret = -EINVAL;
- fprintf(stderr, "kvm does not support KVM_CAP_USER_MEMORY\n");
+ fprintf(stderr, "kvm does not support KVM_CAP_USER_MEMORY\n%s",
+ upgrade_note);
goto err;
}
@@ -465,8 +469,8 @@ int kvm_init(int smp_cpus)
ret = -EINVAL;
fprintf(stderr,
- "KVM kernel module broken (DESTROY_MEMORY_REGION)\n"
- "Please upgrade to at least kvm-81.\n");
+ "KVM kernel module broken (DESTROY_MEMORY_REGION).\n%s",
+ upgrade_note);
goto err;
}