diff mbox

Build breakage between kvm-userspace.git HEAD and 2.6.29-rc8

Message ID 20090315101915.GF10892@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gleb Natapov March 15, 2009, 10:19 a.m. UTC
On Sun, Mar 15, 2009 at 11:23:32AM +0200, Avi Kivity wrote:
> Gregory Haskins wrote:
>> Hi kvm-devs,
>>   Been away from the kvm scene for a while...hope everyone is well.
>>
>> FYI: There are a few build breakages between kvm-userspace.git HEAD
>> (f29d402ab885d30bfa7350378cff911c9c17a226) when you compile against
>> Linus' linux-2.6.git HEAD
>> (v2.6.29-rc8-041b62374c7fedc11a8a1eeda2868612d3d1436c)
>>
>> I am not sure if this is a supported configuration (e.g. perhaps you
>> only support building kvm-userspace HEAD against Avi's kernel tree?).  
>> But in case this was unintentional, read on...
>>   
>
> It's a semi-supported configuration.  We don't test it, but we'll fix  
> reported bugs (or apply patches...).
>
>> First error:
>>
>> libkvm.c:702: error: ‘struct kvm_irq_level’ has no member named ‘status’
>> make[1]: *** [libkvm.o] Error 1
>>
>> Which is attributable to:
>>
>> commit ea1b668e7684dc43e9d198ba0b25fe47a0b2acd2
>> Author: Gleb Natapov <gleb@redhat.com>
>> Date:   Wed Feb 4 17:30:01 2009 +0200
>>
>>     kvm: qemu: handle IRQ status injection in userspace
>>   
>
> This is due to a missing #ifdef KVM_CAP_... somewhere.
>
> Gleb, can you take a look?
>
Does this help?

Signed-off-by: Gleb Natapov <gleb@redhat.com>
--
			Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Gleb Natapov March 15, 2009, 10:42 a.m. UTC | #1
On Sun, Mar 15, 2009 at 12:43:13PM +0200, Avi Kivity wrote:
> Gleb Natapov wrote:
>> diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c
>> index 0ac1c28..3e6bef1 100644
>> --- a/libkvm/libkvm.c
>> +++ b/libkvm/libkvm.c
>> @@ -667,9 +667,14 @@ int kvm_set_irq_level(kvm_context_t kvm, int irq, int level, int *status)
>>  	if (r == -1)
>>  		perror("kvm_set_irq_level");
>>  -	if (status)
>> +	if (status) {
>> +#if defined(KVM_CAP_IRQ_INJECT_STATUS) && defined(KVM_IRQ_LINE_STATUS)
>>  		*status = (kvm->irqchip_inject_ioctl == KVM_IRQ_LINE) ?
>>  			1 : event.status;
>> +#else
>> +		*status = 1;
>> +#endif
>> +	}
>>   	return 1;
>>  }
>>   
>
> Isn't #ifdef KVM_CAP_... sufficient?  If it is defined it should imply  
> everything needed for injection status is defined and works.
>
It should be sufficient. Just extra care. Remove?

--
			Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Avi Kivity March 15, 2009, 10:43 a.m. UTC | #2
Gleb Natapov wrote:
> diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c
> index 0ac1c28..3e6bef1 100644
> --- a/libkvm/libkvm.c
> +++ b/libkvm/libkvm.c
> @@ -667,9 +667,14 @@ int kvm_set_irq_level(kvm_context_t kvm, int irq, int level, int *status)
>  	if (r == -1)
>  		perror("kvm_set_irq_level");
>  
> -	if (status)
> +	if (status) {
> +#if defined(KVM_CAP_IRQ_INJECT_STATUS) && defined(KVM_IRQ_LINE_STATUS)
>  		*status = (kvm->irqchip_inject_ioctl == KVM_IRQ_LINE) ?
>  			1 : event.status;
> +#else
> +		*status = 1;
> +#endif
> +	}
>  
>  	return 1;
>  }
>   

Isn't #ifdef KVM_CAP_... sufficient?  If it is defined it should imply 
everything needed for injection status is defined and works.
Avi Kivity March 15, 2009, 12:19 p.m. UTC | #3
Gleb Natapov wrote:

  

>> Isn't #ifdef KVM_CAP_... sufficient?  If it is defined it should imply  
>> everything needed for injection status is defined and works.
>>
>>     
> It should be sufficient. Just extra care. Remove?
>   

I removed it locally and applied.
diff mbox

Patch

diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c
index 0ac1c28..3e6bef1 100644
--- a/libkvm/libkvm.c
+++ b/libkvm/libkvm.c
@@ -667,9 +667,14 @@  int kvm_set_irq_level(kvm_context_t kvm, int irq, int level, int *status)
 	if (r == -1)
 		perror("kvm_set_irq_level");
 
-	if (status)
+	if (status) {
+#if defined(KVM_CAP_IRQ_INJECT_STATUS) && defined(KVM_IRQ_LINE_STATUS)
 		*status = (kvm->irqchip_inject_ioctl == KVM_IRQ_LINE) ?
 			1 : event.status;
+#else
+		*status = 1;
+#endif
+	}
 
 	return 1;
 }