Received: from eggs.gnu.org ([2001:4830:134:3::10]:34975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnnAi-0006kb-8M for qemu-devel@nongnu.org; Thu, 30 Apr 2015 08:02:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnnAb-0005x6-Fz for qemu-devel@nongnu.org; Thu, 30 Apr 2015 08:02:28 -0400 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:56352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnnAb-0005wj-6I for qemu-devel@nongnu.org; Thu, 30 Apr 2015 08:02:21 -0400 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 30 Apr 2015 13:02:20 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 73DBA17D8059 for ; Thu, 30 Apr 2015 13:02:59 +0100 (BST) Received: from d06av08.portsmouth.uk.ibm.com (d06av08.portsmouth.uk.ibm.com [9.149.37.249]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t3UC2Hh69241022 for ; Thu, 30 Apr 2015 12:02:17 GMT Received: from d06av08.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av08.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t3UC2GfI021794 for ; Thu, 30 Apr 2015 06:02:16 -0600 From: Cornelia Huck Date: Thu, 30 Apr 2015 14:02:10 +0200 Message-Id: <1430395330-26437-11-git-send-email-cornelia.huck@de.ibm.com> In-Reply-To: <1430395330-26437-1-git-send-email-cornelia.huck@de.ibm.com> References: <1430395330-26437-1-git-send-email-cornelia.huck@de.ibm.com> Subject: [Qemu-devel] [PULL 10/10] kvm: better advice for failed s390x startup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.maydell@linaro.org Cc: Cornelia Huck , borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, qemu-devel@nongnu.org, agraf@suse.de 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 2a717e5..3f7061a 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; } -- 2.3.7