Re: [PATCH] qemu-kvm: kvm headers update

2009-10-08 Thread Avi Kivity

On 10/06/2009 07:09 PM, Arnd Bergmann wrote:

On Tuesday 06 October 2009, Avi Kivity wrote:
   

On 10/05/2009 09:27 PM, Michael S. Tsirkin wrote:
 


   

Or is this the output of 'make headers_install'?

 

yes. I just added include to kvm_types to add the CONFIG_ stuff.
Or maybe instead we should fix users to depend on the correct ifdefs.


   

I think 'make headers_install' results in non-portable headers since it
unifdefs stuff out.
 

The point of 'make headers_install' is to turn kernel headers into
user space headers, e.g. removing address space annotations
that are undefined in user space but required in the kernel.

Unifdef only removes parts under #ifdef __KERNEL__, and by extension,
anything under CONFIG_*, which is not allowed outside of __KERNEL__,
because it may have an entirely different meaning in user space.

So, for building qemu, we should really use a copy of the 'installed'
version, but of course not for building the external module.
   


Yeah - kvm headers used to depend on CONFIG_*, but looks like this was 
fixed (by me - oh my memory).


--
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: [PATCH] qemu-kvm: kvm headers update

2009-10-06 Thread Michael S. Tsirkin
On Tue, Oct 06, 2009 at 11:52:24AM +0200, Avi Kivity wrote:
> On 10/05/2009 09:27 PM, Michael S. Tsirkin wrote:
>>
>>
>>> Or is this the output of 'make headers_install'?
>>>  
>> yes. I just added include to kvm_types to add the CONFIG_ stuff.
>> Or maybe instead we should fix users to depend on the correct ifdefs.
>>
>>
>
> I think 'make headers_install' results in non-portable headers since it  
> unifdefs stuff out.

Heh, take a look at the diff, if you see issues, let me know.

> -- 
> 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: [PATCH] qemu-kvm: kvm headers update

2009-10-06 Thread Avi Kivity

On 10/05/2009 09:27 PM, Michael S. Tsirkin wrote:




Or is this the output of 'make headers_install'?
 

yes. I just added include to kvm_types to add the CONFIG_ stuff.
Or maybe instead we should fix users to depend on the correct ifdefs.

   


I think 'make headers_install' results in non-portable headers since it 
unifdefs stuff out.


--
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: [PATCH] qemu-kvm: kvm headers update

2009-10-06 Thread Avi Kivity

On 10/05/2009 09:27 PM, Michael S. Tsirkin wrote:


   

Why are you dropping these?  Any dependencies on CONFIG_ will be broken.
 

Instead I included kvm_types which has these.
   


Oh, a side effect.  Mind moving the CONFIG_* stuff to a separate header 
(which we can include using -include)?  Separate patch please.


--
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: [PATCH] qemu-kvm: kvm headers update

2009-10-05 Thread Michael S. Tsirkin
On Mon, Oct 05, 2009 at 05:38:35PM +0200, Avi Kivity wrote:
> On 10/05/2009 11:46 AM, Michael S. Tsirkin wrote:
>> Update headers from linux 2.6.32-rc1, this mainly
>> adds irqfd which will make it easier to add vhost,
>> down the line. Also reduce code duplication by including
>> kvm_types.h instead of copying it.
>>
>> Signed-off-by: Michael S. Tsirkin
>> ---
>>   kvm/include/linux/kvm.h|  131 +++--
>>   kvm/include/linux/kvm_para.h   |   56 +---
>>   kvm/include/x86/asm/kvm.h  |   46 +
>>   kvm/include/x86/asm/kvm_para.h |  141 
>> +---
>>   4 files changed, 61 insertions(+), 313 deletions(-)
>>
>> diff --git a/kvm/include/linux/kvm.h b/kvm/include/linux/kvm.h
>> index 801865d..2c9a209 100644
>> --- a/kvm/include/linux/kvm.h
>> +++ b/kvm/include/linux/kvm.h
>> @@ -1,43 +1,4 @@
>> -#ifndef KVM_UNIFDEF_H
>> -#define KVM_UNIFDEF_H
>> -
>> -#ifdef __i386__
>> -#ifndef CONFIG_X86_32
>> -#define CONFIG_X86_32 1
>> -#endif
>> -#endif
>> -
>> -#ifdef __x86_64__
>> -#ifndef CONFIG_X86_64
>> -#define CONFIG_X86_64 1
>> -#endif
>> -#endif
>> -
>> -#if defined(__i386__) || defined (__x86_64__)
>> -#ifndef CONFIG_X86
>> -#define CONFIG_X86 1
>> -#endif
>> -#endif
>> -
>> -#ifdef __ia64__
>> -#ifndef CONFIG_IA64
>> -#define CONFIG_IA64 1
>> -#endif
>> -#endif
>> -
>> -#ifdef __PPC__
>> -#ifndef CONFIG_PPC
>> -#define CONFIG_PPC 1
>> -#endif
>> -#endif
>> -
>> -#ifdef __s390__
>> -#ifndef CONFIG_S390
>> -#define CONFIG_S390 1
>> -#endif
>> -#endif
>> -
>> -#endif
>>
>
> Why are you dropping these?  Any dependencies on CONFIG_ will be broken.

Instead I included kvm_types which has these.

>
> Or is this the output of 'make headers_install'?

yes. I just added include to kvm_types to add the CONFIG_ stuff.
Or maybe instead we should fix users to depend on the correct ifdefs.

> -- 
> 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: [PATCH] qemu-kvm: kvm headers update

2009-10-05 Thread Avi Kivity

On 10/05/2009 11:46 AM, Michael S. Tsirkin wrote:

Update headers from linux 2.6.32-rc1, this mainly
adds irqfd which will make it easier to add vhost,
down the line. Also reduce code duplication by including
kvm_types.h instead of copying it.

Signed-off-by: Michael S. Tsirkin
---
  kvm/include/linux/kvm.h|  131 +++--
  kvm/include/linux/kvm_para.h   |   56 +---
  kvm/include/x86/asm/kvm.h  |   46 +
  kvm/include/x86/asm/kvm_para.h |  141 +---
  4 files changed, 61 insertions(+), 313 deletions(-)

diff --git a/kvm/include/linux/kvm.h b/kvm/include/linux/kvm.h
index 801865d..2c9a209 100644
--- a/kvm/include/linux/kvm.h
+++ b/kvm/include/linux/kvm.h
@@ -1,43 +1,4 @@
-#ifndef KVM_UNIFDEF_H
-#define KVM_UNIFDEF_H
-
-#ifdef __i386__
-#ifndef CONFIG_X86_32
-#define CONFIG_X86_32 1
-#endif
-#endif
-
-#ifdef __x86_64__
-#ifndef CONFIG_X86_64
-#define CONFIG_X86_64 1
-#endif
-#endif
-
-#if defined(__i386__) || defined (__x86_64__)
-#ifndef CONFIG_X86
-#define CONFIG_X86 1
-#endif
-#endif
-
-#ifdef __ia64__
-#ifndef CONFIG_IA64
-#define CONFIG_IA64 1
-#endif
-#endif
-
-#ifdef __PPC__
-#ifndef CONFIG_PPC
-#define CONFIG_PPC 1
-#endif
-#endif
-
-#ifdef __s390__
-#ifndef CONFIG_S390
-#define CONFIG_S390 1
-#endif
-#endif
-
-#endif
   


Why are you dropping these?  Any dependencies on CONFIG_ will be broken.

Or is this the output of 'make headers_install'?

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