From patchwork Thu Mar 25 13:59:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/3] S390: Tell user why VM creation failed Date: Thu, 25 Mar 2010 03:59:01 -0000 From: Alexander Graf X-Patchwork-Id: 48520 Message-Id: <1269525542-6113-3-git-send-email-agraf@suse.de> To: qemu-devel@nongnu.org Cc: blauwirbel@gmail.com, cotte@de.ibm.com, waldi@debian.org 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 --- kvm-all.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 534ead0..acf7e31 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -609,8 +609,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