summaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2010-04-01 18:42:37 +0200
committerAurelien Jarno <aurelien@aurel32.net>2010-04-01 21:51:59 +0200
commit0104dcacf374cb9ceff078e9470cc0cc5bb7c8ec (patch)
tree79397f6bcbb18047a6c1a382a9a8ec42a5ccb648 /kvm-all.c
parentc92114b1fb9b8e3cd0ee503fbb2a4c96bd0e300c (diff)
S390: Tell user why VM creation failed
The KVM kernel module on S390 refuses to create a VM when the switch_amode kernel parameter is not used. Since that is not exactly obvious, let's give the user a nice warning. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 6324635d3f..7aa5e57e88 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -607,8 +607,13 @@ int kvm_init(int smp_cpus)
}
s->vmfd = kvm_ioctl(s, KVM_CREATE_VM, 0);
- if (s->vmfd < 0)
+ if (s->vmfd < 0) {
+#ifdef TARGET_S390X
+ fprintf(stderr, "Please add the 'switch_amode' kernel parameter to "
+ "your host kernel command line\n");
+#endif
goto err;
+ }
/* initially, KVM allocated its own memory and we had to jump through
* hooks to make phys_ram_base point to this. Modern versions of KVM