qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: qemu-devel@nongnu.org
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>,
	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
Date: Mon, 27 Apr 2015 10:55:06 +0200	[thread overview]
Message-ID: <1430124906-22470-11-git-send-email-cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <1430124906-22470-1-git-send-email-cornelia.huck@de.ibm.com>

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 <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
 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;
     }
-- 
2.3.6

      parent reply	other threads:[~2015-04-27  8:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27  8:54 [Qemu-devel] [PATCH v2 00/10] first batch of s390x patches for 2.4 Cornelia Huck
2015-04-27  8:54 ` [Qemu-devel] [PATCH v2 01/10] virtio-ccw: sort into categories Cornelia Huck
2015-04-27  8:54 ` [Qemu-devel] [PATCH v2 02/10] s390-virtio: " Cornelia Huck
2015-04-27  8:54 ` [Qemu-devel] [PATCH v2 03/10] sclp: " Cornelia Huck
2015-04-27  8:55 ` [Qemu-devel] [PATCH v2 04/10] s390x/ipl: " Cornelia Huck
2015-04-27  8:55 ` [Qemu-devel] [PATCH v2 05/10] s390x/mmu: Use access type definitions instead of magic values Cornelia Huck
2015-04-27  8:55 ` [Qemu-devel] [PATCH v2 06/10] linux-headers: update Cornelia Huck
2015-04-29 13:07   ` Eric Auger
2015-04-29 14:44     ` Cornelia Huck
2015-04-27  8:55 ` [Qemu-devel] [PATCH v2 07/10] s390x/kvm: Put vm name, extended name and UUID into STSI322 SYSIB Cornelia Huck
2015-04-27  8:55 ` [Qemu-devel] [PATCH v2 08/10] s390x/mmu: Use ioctl for reading and writing from/to guest memory Cornelia Huck
2015-04-27  8:55 ` [Qemu-devel] [PATCH v2 09/10] s390x/kvm: Support access register mode for KVM_S390_MEM_OP ioctl Cornelia Huck
2015-04-27  8:55 ` Cornelia Huck [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1430124906-22470-11-git-send-email-cornelia.huck@de.ibm.com \
    --to=cornelia.huck@de.ibm.com \
    --cc=agraf@suse.de \
    --cc=borntraeger@de.ibm.com \
    --cc=jfrei@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).