From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MDEi1-0003U4-M6 for qemu-devel@nongnu.org; Sun, 07 Jun 2009 05:30:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MDEhw-0003SY-P9 for qemu-devel@nongnu.org; Sun, 07 Jun 2009 05:30:32 -0400 Received: from [199.232.76.173] (port=55976 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDEhw-0003SR-Eg for qemu-devel@nongnu.org; Sun, 07 Jun 2009 05:30:28 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:60375) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MDEhv-0001SS-Sw for qemu-devel@nongnu.org; Sun, 07 Jun 2009 05:30:28 -0400 Message-ID: <4A2B88B1.4060005@web.de> Date: Sun, 07 Jun 2009 11:30:25 +0200 From: Jan Kiszka MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig67185E5421990A99BA6F6BDD" Sender: jan.kiszka@web.de Subject: [Qemu-devel] [PATCH] kvm: Improve upgrade notes when facing unsupported kernels List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Blue Swirl , =?ISO-8859-15?Q?Andreas_F=E4rber?= , Avi Kivity , qemu-devel This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig67185E5421990A99BA6F6BDD Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Users complained that it is not obvious what to do when kvm refuses to build or run due to an unsupported host kernel, so let's improve the hints. Signed-off-by: Jan Kiszka --- configure | 6 ++++-- kvm-all.c | 10 +++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 42d46f2..8ccb58c 100755 --- a/configure +++ b/configure @@ -1158,7 +1158,9 @@ EOF | grep "error: " \ | awk -F "error: " '{if (NR>1) printf(", "); printf("%s",$2);}'` if test "$kvmerr" !=3D "" ; then - kvm=3D"no - (${kvmerr})" + kvm=3D"no - (${kvmerr})\n\ + NOTE: To enable KVM support, update your kernel to 2.6.29+ or instal= l \ +recent kvm-kmod from http://sourceforge.net/projects/kvm." fi fi fi @@ -1377,7 +1379,7 @@ echo "vde support $vde" echo "AIO support $aio" echo "IO thread $io_thread" echo "Install blobs $blobs" -echo "KVM support $kvm" +echo -e "KVM support $kvm" echo "fdt support $fdt" echo "preadv support $preadv" =20 diff --git a/kvm-all.c b/kvm-all.c index dc2ded5..8567ac9 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -396,6 +396,9 @@ int kvm_check_extension(KVMState *s, unsigned int ext= ension) =20 int kvm_init(int smp_cpus) { + static const char upgrade_note[] =3D + "Please upgrade to at least kernel 2.6.29 or recent kvm-kmod\n" + "(see http://sourceforge.net/projects/kvm).\n"; KVMState *s; int ret; int i; @@ -446,7 +449,8 @@ int kvm_init(int smp_cpus) */ if (!kvm_check_extension(s, KVM_CAP_USER_MEMORY)) { ret =3D -EINVAL; - fprintf(stderr, "kvm does not support KVM_CAP_USER_MEMORY\n"); + fprintf(stderr, "kvm does not support KVM_CAP_USER_MEMORY\n%s", + upgrade_note); goto err; } =20 @@ -457,8 +461,8 @@ int kvm_init(int smp_cpus) ret =3D -EINVAL; =20 fprintf(stderr, - "KVM kernel module broken (DESTROY_MEMORY_REGION)\n" - "Please upgrade to at least kvm-81.\n"); + "KVM kernel module broken (DESTROY_MEMORY_REGION).\n%s",= + upgrade_note); goto err; } =20 --------------enig67185E5421990A99BA6F6BDD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkoriLEACgkQniDOoMHTA+m3TgCcD9lvH0Uxeoy5U2y+3EACo5re y/cAniUxEGKsr4eUCDOYZva8Id9K+x5e =z9sY -----END PGP SIGNATURE----- --------------enig67185E5421990A99BA6F6BDD--