qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 2/2] expose kvm pv features


From: Glauber Costa
Subject: [Qemu-devel] Re: [PATCH 2/2] expose kvm pv features
Date: Fri, 6 Feb 2009 16:53:00 -0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Fri, Feb 06, 2009 at 12:46:18PM -0600, Anthony Liguori wrote:
> Glauber Costa wrote:
>> expose kvm paravirtual features into cpuid. This enables
>> the use of kvmclock in qemu guests. (and all the other
>> features too).
>>
>> Signed-off-by: Glauber Costa <address@hidden>
>> ---
>>  kvm.h             |    5 +++++
>>  target-i386/kvm.c |   29 +++++++++++++++++++++++++++++
>>  2 files changed, 34 insertions(+), 0 deletions(-)
>>
>> diff --git a/kvm.h b/kvm.h
>> index efce145..49a2653 100644
>> --- a/kvm.h
>> +++ b/kvm.h
>> @@ -17,6 +17,8 @@
>>  #include "config.h"
>>
>>  #ifdef CONFIG_KVM
>> +#include <linux/kvm.h>
>> +#include <linux/kvm_para.h>
>>  extern int kvm_allowed;
>>   
>
> This breaks the build in an admittedly subtle way.  kvm.h is included in  
> various c files throughout QEMU.  However, in Makefile.target, we have:
for the record, it wfm ;-)

>
> kvm.o: CFLAGS+=$(KVM_CFLAGS)
> kvm-all.o: CFLAGS+=$(KVM_CFLAGS)
>
> And KVM_CFLAGS contains flags derived from --kerneldir.  But now you're  
> relying on all C files being able to pull in kernel headers.
yeah, agreed.
>
> Looking at the patch, why put this includes in kvm.h at all?
You mean we should put them somewhere else, or not put them at all?

We need the headers to exist since we'll be dealing with capabilities
and feature bits that kvm defines. But given this problem, they can go fine
in kvm.c





reply via email to

[Prev in Thread] Current Thread [Next in Thread]