From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nunaa-0003JI-C4 for qemu-devel@nongnu.org; Thu, 25 Mar 2010 09:59:13 -0400 Received: from [140.186.70.92] (port=43317 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NunaV-0003H5-5m for qemu-devel@nongnu.org; Thu, 25 Mar 2010 09:59:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NunaS-0000xn-SY for qemu-devel@nongnu.org; Thu, 25 Mar 2010 09:59:06 -0400 Received: from cantor2.suse.de ([195.135.220.15]:35524 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NunaS-0000xN-La for qemu-devel@nongnu.org; Thu, 25 Mar 2010 09:59:04 -0400 From: Alexander Graf Date: Thu, 25 Mar 2010 14:59:01 +0100 Message-Id: <1269525542-6113-3-git-send-email-agraf@suse.de> In-Reply-To: <1269525542-6113-1-git-send-email-agraf@suse.de> References: <1269525542-6113-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH 2/3] S390: Tell user why VM creation failed List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 -- 1.6.0.2