qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] kvm: Use kvm-kmod headers if available
@ 2010-01-12 18:53 Jan Kiszka
  2010-01-12 20:20 ` [Qemu-devel] " Doug Goldstein
  2010-01-12 20:36 ` [Qemu-devel] " Anthony Liguori
  0 siblings, 2 replies; 4+ messages in thread
From: Jan Kiszka @ 2010-01-12 18:53 UTC (permalink / raw)
  To: Anthony Liguori
  Cc: kvm, Marcelo Tosatti, Avi Kivity, Gleb Natapov, qemu-devel

Since kvm-kmod-2.6.32.2 we have an alternative source for recent KVM
kernel headers. Use it when available and not overruled by --kerneldir.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Note: This is the upstream version first. qemu-kvm differs in this area,
I will post corresponding patches for that tree later.

 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index 5c056f5..623c30e 100755
--- a/configure
+++ b/configure
@@ -1384,7 +1384,7 @@ EOF
             kvm_cflags="$kvm_cflags -I$kerneldir/arch/$cpu/include"
       fi
   else
-      kvm_cflags=""
+    kvm_cflags=`pkg-config --cflags kvm-kmod 2> /dev/null`
   fi
   if compile_prog "$kvm_cflags" "" ; then
     kvm=yes

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

* [Qemu-devel] Re: [PATCH 1/2] kvm: Use kvm-kmod headers if available
  2010-01-12 18:53 [Qemu-devel] [PATCH 1/2] kvm: Use kvm-kmod headers if available Jan Kiszka
@ 2010-01-12 20:20 ` Doug Goldstein
  2010-01-12 21:22   ` Jan Kiszka
  2010-01-12 20:36 ` [Qemu-devel] " Anthony Liguori
  1 sibling, 1 reply; 4+ messages in thread
From: Doug Goldstein @ 2010-01-12 20:20 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Anthony Liguori, Gleb Natapov, kvm, Marcelo Tosatti, qemu-devel,
	Avi Kivity

On Tue, Jan 12, 2010 at 12:53 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> Since kvm-kmod-2.6.32.2 we have an alternative source for recent KVM
> kernel headers. Use it when available and not overruled by --kerneldir.
>

Would it be possible to turn this into a configure option? Such that I
could say ./configure --with-kvm-kmod{=optional/path/to} because
otherwise this adds a potential automagical dependency onto kvm-kmod
(i.e. if the user had kvm-kmod installed at the time of build but then
removed them and went back with their kernel provided version)

Thanks.

-- 
Doug Goldstein

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

* Re: [Qemu-devel] [PATCH 1/2] kvm: Use kvm-kmod headers if available
  2010-01-12 18:53 [Qemu-devel] [PATCH 1/2] kvm: Use kvm-kmod headers if available Jan Kiszka
  2010-01-12 20:20 ` [Qemu-devel] " Doug Goldstein
@ 2010-01-12 20:36 ` Anthony Liguori
  1 sibling, 0 replies; 4+ messages in thread
From: Anthony Liguori @ 2010-01-12 20:36 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Anthony Liguori, Gleb Natapov, kvm, Marcelo Tosatti, qemu-devel,
	Avi Kivity

On 01/12/2010 12:53 PM, Jan Kiszka wrote:
> Since kvm-kmod-2.6.32.2 we have an alternative source for recent KVM
> kernel headers. Use it when available and not overruled by --kerneldir.
>
> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
>    

Applied all.  Thanks.

Regards,

Anthony Liguori
> ---
>
> Note: This is the upstream version first. qemu-kvm differs in this area,
> I will post corresponding patches for that tree later.
>
>   configure |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/configure b/configure
> index 5c056f5..623c30e 100755
> --- a/configure
> +++ b/configure
> @@ -1384,7 +1384,7 @@ EOF
>               kvm_cflags="$kvm_cflags -I$kerneldir/arch/$cpu/include"
>         fi
>     else
> -      kvm_cflags=""
> +    kvm_cflags=`pkg-config --cflags kvm-kmod 2>  /dev/null`
>     fi
>     if compile_prog "$kvm_cflags" "" ; then
>       kvm=yes
>
>
>
>    

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

* [Qemu-devel] Re: [PATCH 1/2] kvm: Use kvm-kmod headers if available
  2010-01-12 20:20 ` [Qemu-devel] " Doug Goldstein
@ 2010-01-12 21:22   ` Jan Kiszka
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2010-01-12 21:22 UTC (permalink / raw)
  To: Doug Goldstein
  Cc: Anthony Liguori, Gleb Natapov, kvm, Marcelo Tosatti, qemu-devel,
	Avi Kivity

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

Doug Goldstein wrote:
> On Tue, Jan 12, 2010 at 12:53 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>> Since kvm-kmod-2.6.32.2 we have an alternative source for recent KVM
>> kernel headers. Use it when available and not overruled by --kerneldir.
>>
> 
> Would it be possible to turn this into a configure option? Such that I
> could say ./configure --with-kvm-kmod{=optional/path/to} because
> otherwise this adds a potential automagical dependency onto kvm-kmod
> (i.e. if the user had kvm-kmod installed at the time of build but then
> removed them and went back with their kernel provided version)

I don't see the problem yet. Either the qemu version built against the
previously installed headers will detect during runtime that the loaded
kvm support is restricted or even unsuited and handle this properly. Or
the user will happen to generate a new qemu which lacks the same
features as the installed kvm.

There is only the case that the distribution ships more powerful kvm
modules than their kernel headers advertise. But that's a distribution
bug we can only solve by filing bug reports there and installing
kvm-kmod in the meantime.

Jan


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

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

end of thread, other threads:[~2010-01-12 21:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-12 18:53 [Qemu-devel] [PATCH 1/2] kvm: Use kvm-kmod headers if available Jan Kiszka
2010-01-12 20:20 ` [Qemu-devel] " Doug Goldstein
2010-01-12 21:22   ` Jan Kiszka
2010-01-12 20:36 ` [Qemu-devel] " Anthony Liguori

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).