From patchwork Mon Apr 27 08:55:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cornelia Huck X-Patchwork-Id: 464912 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5EF4614007D for ; Mon, 27 Apr 2015 18:58:07 +1000 (AEST) Received: from localhost ([::1]:53726 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ymerd-0006QQ-Cv for incoming@patchwork.ozlabs.org; Mon, 27 Apr 2015 04:58:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ymep0-0001Vp-58 for qemu-devel@nongnu.org; Mon, 27 Apr 2015 04:55:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ymeov-0004U8-Cn for qemu-devel@nongnu.org; Mon, 27 Apr 2015 04:55:22 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:44756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ymeov-0004T2-1O for qemu-devel@nongnu.org; Mon, 27 Apr 2015 04:55:17 -0400 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 27 Apr 2015 09:55:16 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 27 Apr 2015 09:55:14 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 7C38F17D8059 for ; Mon, 27 Apr 2015 09:55:54 +0100 (BST) Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t3R8tDDg4129192 for ; Mon, 27 Apr 2015 08:55:13 GMT Received: from d06av10.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t3R8tDpg030069 for ; Mon, 27 Apr 2015 02:55:13 -0600 Received: from gondolin.boeblingen.de.ibm.com (dyn-9-152-224-143.boeblingen.de.ibm.com [9.152.224.143]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t3R8tARe029818; Mon, 27 Apr 2015 02:55:13 -0600 From: Cornelia Huck To: qemu-devel@nongnu.org Date: Mon, 27 Apr 2015 10:55:06 +0200 Message-Id: <1430124906-22470-11-git-send-email-cornelia.huck@de.ibm.com> X-Mailer: git-send-email 2.3.6 In-Reply-To: <1430124906-22470-1-git-send-email-cornelia.huck@de.ibm.com> References: <1430124906-22470-1-git-send-email-cornelia.huck@de.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15042708-0041-0000-0000-0000040F012B X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.75.94.106 Cc: Cornelia Huck , borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, agraf@suse.de Subject: [Qemu-devel] [PATCH v2 10/10] kvm: better advice for failed s390x startup X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org If KVM_CREATE failed on s390x, we print a hint to enable the switch_amode kernel parameter. This only applies to old kernels, and only if the error was -EINVAL. Moreover, with new kernels, the most likely reason for -EINVAL is that pgstes were not enabled. Let's update the error message to give a better hint on where things may need fixing. Acked-by: Christian Borntraeger Signed-off-by: Cornelia Huck --- kvm-all.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index dd44f8c..4c272ea 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1544,8 +1544,17 @@ static int kvm_init(MachineState *ms) strerror(-ret)); #ifdef TARGET_S390X - fprintf(stderr, "Please add the 'switch_amode' kernel parameter to " - "your host kernel command line\n"); + if (ret == -EINVAL) { + fprintf(stderr, + "Host kernel setup problem detected. Please verify:\n"); + fprintf(stderr, "- for kernels supporting the switch_amode or" + " user_mode parameters, whether\n"); + fprintf(stderr, + " user space is running in primary address space\n"); + fprintf(stderr, + "- for kernels supporting the vm.allocate_pgste sysctl, " + "whether it is enabled\n"); + } #endif goto err; }