All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] kvm: Improve upgrade notes when facing unsupported kernels
@ 2009-06-07  9:30 Jan Kiszka
  2009-06-07  9:38 ` [Qemu-devel] " Avi Kivity
  2009-06-07 13:47 ` Blue Swirl
  0 siblings, 2 replies; 9+ messages in thread
From: Jan Kiszka @ 2009-06-07  9:30 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Blue Swirl, Andreas Färber, Avi Kivity, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 2270 bytes --]

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 <jan.kiszka@siemens.com>
---

 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" != "" ; then
-        kvm="no - (${kvmerr})"
+        kvm="no - (${kvmerr})\n\
+    NOTE: To enable KVM support, update your kernel to 2.6.29+ or install \
+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"
 
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 extension)
 
 int kvm_init(int smp_cpus)
 {
+    static const char upgrade_note[] =
+        "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 = -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;
     }
 
@@ -457,8 +461,8 @@ int kvm_init(int smp_cpus)
         ret = -EINVAL;
 
         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;
     }
 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Qemu-devel] Re: [PATCH] kvm: Improve upgrade notes when facing unsupported kernels
  2009-06-07  9:30 [Qemu-devel] [PATCH] kvm: Improve upgrade notes when facing unsupported kernels Jan Kiszka
@ 2009-06-07  9:38 ` Avi Kivity
  2009-06-07  9:40   ` Jan Kiszka
  2009-06-07 13:47 ` Blue Swirl
  1 sibling, 1 reply; 9+ messages in thread
From: Avi Kivity @ 2009-06-07  9:38 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Blue Swirl, =?ISO-8859-15?Q?Andreas_F=E4?=, rber, qemu-devel

Jan Kiszka wrote:
> 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.
>
> 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" != "" ; then
> -        kvm="no - (${kvmerr})"
> +        kvm="no - (${kvmerr})\n\
> +    NOTE: To enable KVM support, update your kernel to 2.6.29+ or install \
> +recent kvm-kmod from http://sourceforge.net/projects/kvm."
>        fi
>   

Installing kvm-mod is insufficient, you need the headers from somewhere.


-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] Re: [PATCH] kvm: Improve upgrade notes when facing unsupported kernels
  2009-06-07  9:38 ` [Qemu-devel] " Avi Kivity
@ 2009-06-07  9:40   ` Jan Kiszka
  2009-06-07  9:45     ` Avi Kivity
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Kiszka @ 2009-06-07  9:40 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Blue Swirl, =?ISO-8859-15?Q?Andreas_F=E4?=, rber, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 901 bytes --]

Avi Kivity wrote:
> Jan Kiszka wrote:
>> 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.
>>
>> 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" != "" ; then
>> -        kvm="no - (${kvmerr})"
>> +        kvm="no - (${kvmerr})\n\
>> +    NOTE: To enable KVM support, update your kernel to 2.6.29+ or
>> install \
>> +recent kvm-kmod from http://sourceforge.net/projects/kvm."
>>        fi
>>   
> 
> Installing kvm-mod is insufficient, you need the headers from somewhere.
> 

True. Hmm, wasn't there the plan to fix this by carrying them in-tree?

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] Re: [PATCH] kvm: Improve upgrade notes when facing unsupported kernels
  2009-06-07  9:40   ` Jan Kiszka
@ 2009-06-07  9:45     ` Avi Kivity
  2009-06-07  9:51       ` Jan Kiszka
  0 siblings, 1 reply; 9+ messages in thread
From: Avi Kivity @ 2009-06-07  9:45 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Blue Swirl, =?ISO-8859-15?Q?Andreas_F=E4?=, rber, qemu-devel

Jan Kiszka wrote:
> Avi Kivity wrote:
>   
>> Jan Kiszka wrote:
>>     
>>> 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.
>>>
>>> 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" != "" ; then
>>> -        kvm="no - (${kvmerr})"
>>> +        kvm="no - (${kvmerr})\n\
>>> +    NOTE: To enable KVM support, update your kernel to 2.6.29+ or
>>> install \
>>> +recent kvm-kmod from http://sourceforge.net/projects/kvm."
>>>        fi
>>>   
>>>       
>> Installing kvm-mod is insufficient, you need the headers from somewhere.
>>
>>     
>
> True. Hmm, wasn't there the plan to fix this by carrying them in-tree?
>   

Anthony even posted a patch but it was a bit excessive, carrying tons of 
kernel headers.  I think we'd be fine carrying just the kvm headers, 
same as qemu-kvm.  In which case the compile time test can go away.

Alternatively, I can make kvm-kmod install the necessary headers to 
/usr/local/include.  It's probably cleaner this way.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] Re: [PATCH] kvm: Improve upgrade notes when facing unsupported kernels
  2009-06-07  9:45     ` Avi Kivity
@ 2009-06-07  9:51       ` Jan Kiszka
  2009-06-07  9:53         ` Avi Kivity
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Kiszka @ 2009-06-07  9:51 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Blue Swirl, =?ISO-8859-15?Q?Andreas_F=E4?=, rber, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1556 bytes --]

Avi Kivity wrote:
> Jan Kiszka wrote:
>> Avi Kivity wrote:
>>  
>>> Jan Kiszka wrote:
>>>    
>>>> 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.
>>>>
>>>> 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" != "" ; then
>>>> -        kvm="no - (${kvmerr})"
>>>> +        kvm="no - (${kvmerr})\n\
>>>> +    NOTE: To enable KVM support, update your kernel to 2.6.29+ or
>>>> install \
>>>> +recent kvm-kmod from http://sourceforge.net/projects/kvm."
>>>>        fi
>>>>         
>>> Installing kvm-mod is insufficient, you need the headers from somewhere.
>>>
>>>     
>>
>> True. Hmm, wasn't there the plan to fix this by carrying them in-tree?
>>   
> 
> Anthony even posted a patch but it was a bit excessive, carrying tons of
> kernel headers.  I think we'd be fine carrying just the kvm headers,
> same as qemu-kvm.  In which case the compile time test can go away.
> 
> Alternatively, I can make kvm-kmod install the necessary headers to
> /usr/local/include.  It's probably cleaner this way.
> 

Good idea. Maybe put them in a separate directory (and make qemu aware
of it) so that kvm-kmod packages will not run into conflicts with the
installed kernel headers.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] Re: [PATCH] kvm: Improve upgrade notes when facing unsupported kernels
  2009-06-07  9:51       ` Jan Kiszka
@ 2009-06-07  9:53         ` Avi Kivity
  2009-06-07  9:57           ` Jan Kiszka
  0 siblings, 1 reply; 9+ messages in thread
From: Avi Kivity @ 2009-06-07  9:53 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Blue Swirl, =?ISO-8859-15?Q?Andreas_F=E4?=, rber, qemu-devel

Jan Kiszka wrote:
>> Alternatively, I can make kvm-kmod install the necessary headers to
>> /usr/local/include.  It's probably cleaner this way.
>>
>>     
>
> Good idea. Maybe put them in a separate directory (and make qemu aware
> of it) so that kvm-kmod packages will not run into conflicts with the
> installed kernel headers.
>   

Yes, /usr/local/include (configurable).  gcc should automatically prefer 
/usr/local/include to /use/include.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] Re: [PATCH] kvm: Improve upgrade notes when facing unsupported kernels
  2009-06-07  9:53         ` Avi Kivity
@ 2009-06-07  9:57           ` Jan Kiszka
  2009-06-07 10:07             ` Avi Kivity
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Kiszka @ 2009-06-07  9:57 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Blue Swirl, =?ISO-8859-15?Q?Andreas_F=E4?=, rber, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 539 bytes --]

Avi Kivity wrote:
> Jan Kiszka wrote:
>>> Alternatively, I can make kvm-kmod install the necessary headers to
>>> /usr/local/include.  It's probably cleaner this way.
>>>
>>>     
>>
>> Good idea. Maybe put them in a separate directory (and make qemu aware
>> of it) so that kvm-kmod packages will not run into conflicts with the
>> installed kernel headers.
>>   
> 
> Yes, /usr/local/include (configurable).  gcc should automatically prefer
> /usr/local/include to /use/include.

/me should put on my glasses...

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] Re: [PATCH] kvm: Improve upgrade notes when facing unsupported kernels
  2009-06-07  9:57           ` Jan Kiszka
@ 2009-06-07 10:07             ` Avi Kivity
  0 siblings, 0 replies; 9+ messages in thread
From: Avi Kivity @ 2009-06-07 10:07 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Blue Swirl, =?ISO-8859-15?Q?Andreas_F=E4?=, rber, qemu-devel

Jan Kiszka wrote:
> /me should put on my glasses...
>   

The code's much prettier without them.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] Re: [PATCH] kvm: Improve upgrade notes when facing unsupported kernels
  2009-06-07  9:30 [Qemu-devel] [PATCH] kvm: Improve upgrade notes when facing unsupported kernels Jan Kiszka
  2009-06-07  9:38 ` [Qemu-devel] " Avi Kivity
@ 2009-06-07 13:47 ` Blue Swirl
  1 sibling, 0 replies; 9+ messages in thread
From: Blue Swirl @ 2009-06-07 13:47 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Andreas Färber, Avi Kivity, qemu-devel

On 6/7/09, Jan Kiszka <jan.kiszka@web.de> wrote:
> 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 <jan.kiszka@siemens.com>

Thanks, applied.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-06-07 13:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-07  9:30 [Qemu-devel] [PATCH] kvm: Improve upgrade notes when facing unsupported kernels Jan Kiszka
2009-06-07  9:38 ` [Qemu-devel] " Avi Kivity
2009-06-07  9:40   ` Jan Kiszka
2009-06-07  9:45     ` Avi Kivity
2009-06-07  9:51       ` Jan Kiszka
2009-06-07  9:53         ` Avi Kivity
2009-06-07  9:57           ` Jan Kiszka
2009-06-07 10:07             ` Avi Kivity
2009-06-07 13:47 ` Blue Swirl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.