Re: [Qemu-devel] [PATCHv2] Add KVM paravirt cpuid leaf

2010-01-12 Thread Avi Kivity

On 01/12/2010 09:23 AM, Gleb Natapov wrote:

On Mon, Jan 11, 2010 at 01:18:32PM -0600, Anthony Liguori wrote:
   

On 01/07/2010 10:24 AM, Gleb Natapov wrote:
 

diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 4084503..6a841de 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -17,6 +17,7 @@
  #includesys/mman.h

  #includelinux/kvm.h
+#includelinux/kvm_para.h
   

This breaks the build on a default F12 install because while kvm.h
is present, kvm_para.h is not.  This is a hard one to fix.

 

Avi how qemu-kvm compiles there? Or it doesn't?

   


include/linux/Kbuild has:

ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \
  $(srctree)/include/asm-$(SRCARCH)/kvm.h),)
unifdef-y += kvm.h
endif
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \
  $(srctree)/include/asm-$(SRCARCH)/kvm_para.h),)
unifdef-y += kvm_para.h
endif

So it should be installed.  Unfortunately this is starting 2.6.32, so we 
need to backport the patch (da18acffc3) to the F12 kernel.


qemu-kvm doesn't depend on installed headers.

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Qemu-devel] [PATCHv2] Add KVM paravirt cpuid leaf

2010-01-12 Thread Avi Kivity

On 01/11/2010 09:18 PM, Anthony Liguori wrote:

On 01/07/2010 10:24 AM, Gleb Natapov wrote:

diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 4084503..6a841de 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -17,6 +17,7 @@
  #includesys/mman.h

  #includelinux/kvm.h
+#includelinux/kvm_para.h


This breaks the build on a default F12 install because while kvm.h is 
present, kvm_para.h is not.  This is a hard one to fix.


We can default the kvm search path to /lib/modules/$(uname -r)/build, 
we can fix the glibc headers and live with it, or we can pull in the 
kvm headers into qemu.


Avi/Marcelo/Jan, any thoughts from the qemu-kvm side?



Two options:

- make kvm detection depend on kvm_para.h being includable, fix all 
relevant distro kernels to supply it, and live with the breakage
- add a new CONFIG_KVM_PARA, detect it at configure time, and only 
include it if present


--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Qemu-devel] [PATCHv2] Add KVM paravirt cpuid leaf

2010-01-11 Thread Anthony Liguori

On 01/07/2010 10:24 AM, Gleb Natapov wrote:

diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 4084503..6a841de 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -17,6 +17,7 @@
  #includesys/mman.h

  #includelinux/kvm.h
+#includelinux/kvm_para.h


This breaks the build on a default F12 install because while kvm.h is 
present, kvm_para.h is not.  This is a hard one to fix.


We can default the kvm search path to /lib/modules/$(uname -r)/build, we 
can fix the glibc headers and live with it, or we can pull in the kvm 
headers into qemu.


Avi/Marcelo/Jan, any thoughts from the qemu-kvm side?

Regards,

Anthony Liguori
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Qemu-devel] [PATCHv2] Add KVM paravirt cpuid leaf

2010-01-11 Thread Jan Kiszka
Anthony Liguori wrote:
 On 01/07/2010 10:24 AM, Gleb Natapov wrote:
 diff --git a/target-i386/kvm.c b/target-i386/kvm.c
 index 4084503..6a841de 100644
 --- a/target-i386/kvm.c
 +++ b/target-i386/kvm.c
 @@ -17,6 +17,7 @@
   #includesys/mman.h

   #includelinux/kvm.h
 +#includelinux/kvm_para.h
 
 This breaks the build on a default F12 install because while kvm.h is
 present, kvm_para.h is not.  This is a hard one to fix.
 
 We can default the kvm search path to /lib/modules/$(uname -r)/build, we
 can fix the glibc headers and live with it, or we can pull in the kvm
 headers into qemu.
 
 Avi/Marcelo/Jan, any thoughts from the qemu-kvm side?

kvm-kmod-wise, I can include arch and generic kvm_para.h in the next
release (missed the need for it so far). I'm planning to write a qemu
patch to ask pkg-config for kvm-kmod headers.

If we can live with considering the cpuid leaf a feature that depends on
a recent kvm-kmod version and is disabled otherwise, we are done. If
not, tricks like the above are required.

Jan



signature.asc
Description: OpenPGP digital signature


Re: [Qemu-devel] [PATCHv2] Add KVM paravirt cpuid leaf

2010-01-11 Thread Anthony Liguori

On 01/11/2010 02:40 PM, Jan Kiszka wrote:

Anthony Liguori wrote:
   

On 01/07/2010 10:24 AM, Gleb Natapov wrote:
 

diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 4084503..6a841de 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -17,6 +17,7 @@
   #includesys/mman.h

   #includelinux/kvm.h
+#includelinux/kvm_para.h
   

This breaks the build on a default F12 install because while kvm.h is
present, kvm_para.h is not.  This is a hard one to fix.

We can default the kvm search path to /lib/modules/$(uname -r)/build, we
can fix the glibc headers and live with it, or we can pull in the kvm
headers into qemu.

Avi/Marcelo/Jan, any thoughts from the qemu-kvm side?
 

kvm-kmod-wise, I can include arch and generic kvm_para.h in the next
release (missed the need for it so far). I'm planning to write a qemu
patch to ask pkg-config for kvm-kmod headers.
   


That would be nice.

I assume a change has to be made in the kernel too so that the libc 
headers are updated.  IOW, I assume make headers_install doesn't 
currently install kvm_para.h



If we can live with considering the cpuid leaf a feature that depends on
a recent kvm-kmod version and is disabled otherwise, we are done. If
not, tricks like the above are required.
   


It's less than ideal, but I can live with it.

Regards,

Anthony Liguori


Jan

   


--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Qemu-devel] [PATCHv2] Add KVM paravirt cpuid leaf

2010-01-11 Thread Jan Kiszka
Anthony Liguori wrote:
 On 01/11/2010 02:40 PM, Jan Kiszka wrote:
 Anthony Liguori wrote:
   
 On 01/07/2010 10:24 AM, Gleb Natapov wrote:
 
 diff --git a/target-i386/kvm.c b/target-i386/kvm.c
 index 4084503..6a841de 100644
 --- a/target-i386/kvm.c
 +++ b/target-i386/kvm.c
 @@ -17,6 +17,7 @@
#includesys/mman.h

#includelinux/kvm.h
 +#includelinux/kvm_para.h

 This breaks the build on a default F12 install because while kvm.h is
 present, kvm_para.h is not.  This is a hard one to fix.

 We can default the kvm search path to /lib/modules/$(uname -r)/build, we
 can fix the glibc headers and live with it, or we can pull in the kvm
 headers into qemu.

 Avi/Marcelo/Jan, any thoughts from the qemu-kvm side?
  
 kvm-kmod-wise, I can include arch and generic kvm_para.h in the next
 release (missed the need for it so far). I'm planning to write a qemu
 patch to ask pkg-config for kvm-kmod headers.

 
 That would be nice.
 
 I assume a change has to be made in the kernel too so that the libc
 headers are updated.  IOW, I assume make headers_install doesn't
 currently install kvm_para.h

I does, I just failed to cherry-pick them from the temporary tree it
creates during 'make sync'.

Jan



signature.asc
Description: OpenPGP digital signature


Re: [Qemu-devel] [PATCHv2] Add KVM paravirt cpuid leaf

2010-01-11 Thread Gleb Natapov
On Mon, Jan 11, 2010 at 01:18:32PM -0600, Anthony Liguori wrote:
 On 01/07/2010 10:24 AM, Gleb Natapov wrote:
 diff --git a/target-i386/kvm.c b/target-i386/kvm.c
 index 4084503..6a841de 100644
 --- a/target-i386/kvm.c
 +++ b/target-i386/kvm.c
 @@ -17,6 +17,7 @@
   #includesys/mman.h
 
   #includelinux/kvm.h
 +#includelinux/kvm_para.h
 
 This breaks the build on a default F12 install because while kvm.h
 is present, kvm_para.h is not.  This is a hard one to fix.
 
Avi how qemu-kvm compiles there? Or it doesn't?

 We can default the kvm search path to /lib/modules/$(uname
 -r)/build, we can fix the glibc headers and live with it, or we can
 pull in the kvm headers into qemu.
 
 Avi/Marcelo/Jan, any thoughts from the qemu-kvm side?
 
 Regards,
 
 Anthony Liguori

--
Gleb.
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html