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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to