qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: qemu-devel@nongnu.org
Cc: Carsten Otte <cotte@de.ibm.com>
Subject: [Qemu-devel] [PATCH 2/3] S390: Tell user why VM creation failed
Date: Wed, 24 Mar 2010 18:30:39 +0100	[thread overview]
Message-ID: <1269451840-13941-3-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1269451840-13941-1-git-send-email-agraf@suse.de>

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 <agraf@suse.de>
---
 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

  parent reply	other threads:[~2010-03-24 17:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-24 17:30 [Qemu-devel] [PATCH 0/3] Fix S390x target Alexander Graf
2010-03-24 17:30 ` [Qemu-devel] [PATCH 1/3] S390: Add stub for cpu_get_phys_page_debug Alexander Graf
2010-03-24 17:30 ` Alexander Graf [this message]
2010-03-24 17:30 ` [Qemu-devel] [PATCH 3/3] S390: Don't compile in virtio-pci Alexander Graf
2010-03-24 18:22   ` Blue Swirl
2010-03-24 18:24     ` Alexander Graf
2010-03-24 19:17       ` Blue Swirl
  -- strict thread matches above, loose matches on Subject: below --
2010-03-25 13:58 [Qemu-devel] [PATCH 0/3] Fix S390x target v2 Alexander Graf
2010-03-25 13:59 ` [Qemu-devel] [PATCH 2/3] S390: Tell user why VM creation failed Alexander Graf

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=1269451840-13941-3-git-send-email-agraf@suse.de \
    --to=agraf@suse.de \
    --cc=cotte@de.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).