qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH] target-i386: Avoid kvm related compiler error


From: Jan Kiszka
Subject: [Qemu-devel] Re: [PATCH] target-i386: Avoid kvm related compiler error
Date: Wed, 12 May 2010 21:50:34 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

Stefan Weil wrote:
> Some versions of kvm.h (debian lenny) define KVM_CAP_VCPU_EVENTS
> without defining KVM_VCPUEVENT_VALID_NMI_PENDING or
> KVM_VCPUEVENT_VALID_SIPI_VECTOR.

This rather looks like a bug to be sent to debian. Until they fixed
their backport (I just hope it's a user space header issue only...), you
could disable KVM or use kvm-kmod which delivers proper upstream headers.

Jan

> 
> Without the patch, compilation fails:
> 
>   CC    x86_64-softmmu/kvm.o
> /qemu/target-i386/kvm.c: In function 'kvm_put_vcpu_events':
> /qemu/target-i386/kvm.c:824: error: 'KVM_VCPUEVENT_VALID_NMI_PENDING' 
> undeclared (first use in this function)
> /qemu/target-i386/kvm.c:824: error: (Each undeclared identifier is reported 
> only once
> /qemu/target-i386/kvm.c:824: error: for each function it appears in.)
> /qemu/target-i386/kvm.c:824: error: 'KVM_VCPUEVENT_VALID_SIPI_VECTOR' 
> undeclared (first use in this function)
> make[1]: *** [kvm.o] Error 1
> 
> Cc: Jan Kiszka <address@hidden>
> Signed-off-by: Stefan Weil <address@hidden>
> ---
>  target-i386/kvm.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/target-i386/kvm.c b/target-i386/kvm.c
> index f73b47b..9a37753 100644
> --- a/target-i386/kvm.c
> +++ b/target-i386/kvm.c
> @@ -796,7 +796,7 @@ static int kvm_get_mp_state(CPUState *env)
>  
>  static int kvm_put_vcpu_events(CPUState *env, int level)
>  {
> -#ifdef KVM_CAP_VCPU_EVENTS
> +#if defined(KVM_CAP_VCPU_EVENTS) && defined(KVM_VCPUEVENT_VALID_NMI_PENDING)
>      struct kvm_vcpu_events events;
>  
>      if (!kvm_has_vcpu_events()) {

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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