From patchwork Thu Apr 1 16:42:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 49222 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D494AB7D12 for ; Fri, 2 Apr 2010 03:50:14 +1100 (EST) Received: from localhost ([127.0.0.1]:58488 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxNat-0007Ek-NP for incoming@patchwork.ozlabs.org; Thu, 01 Apr 2010 12:50:11 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NxNTq-00054O-3K for qemu-devel@nongnu.org; Thu, 01 Apr 2010 12:42:54 -0400 Received: from [140.186.70.92] (port=33801 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxNTl-00052T-W2 for qemu-devel@nongnu.org; Thu, 01 Apr 2010 12:42:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NxNTf-0004Mt-Fb for qemu-devel@nongnu.org; Thu, 01 Apr 2010 12:42:49 -0400 Received: from cantor.suse.de ([195.135.220.2]:55568 helo=mx1.suse.de) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NxNTf-0004MS-8x for qemu-devel@nongnu.org; Thu, 01 Apr 2010 12:42:43 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 607FA945D8; Thu, 1 Apr 2010 18:42:42 +0200 (CEST) From: Alexander Graf To: qemu-devel@nongnu.org Date: Thu, 1 Apr 2010 18:42:37 +0200 Message-Id: <1270140161-17216-3-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1270140161-17216-1-git-send-email-agraf@suse.de> References: <1270140161-17216-1-git-send-email-agraf@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 Cc: waldi@debian.org, Carsten Otte , aurelien@aurel32.net Subject: [Qemu-devel] [PATCH 2/6] S390: Tell user why VM creation failed X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.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 40b5a51..9de66c9 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