[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/2] KVM_CAP_IRQFD and KVM_CAP_IRQFD_RESAMPLE
From: |
Eric Auger |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/2] KVM_CAP_IRQFD and KVM_CAP_IRQFD_RESAMPLE checks |
Date: |
Wed, 03 Sep 2014 15:19:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
On 09/03/2014 02:50 PM, Christian Borntraeger wrote:
> On 03/09/14 11:54, Eric Auger wrote:
> [...]
>> --- a/kvm-all.c
>> +++ b/kvm-all.c
> [...]
>> @@ -1548,6 +1549,12 @@ int kvm_init(MachineClass *mc)
>> kvm_eventfds_allowed =
>> (kvm_check_extension(s, KVM_CAP_IOEVENTFD) > 0);
>>
>> + kvm_irqfds_allowed =
>> + (kvm_check_extension(s, KVM_CAP_IRQFD) > 0);
> ^^^^^^^^^^^^^
>> +
>> + kvm_resamplefds_allowed =
>> + (kvm_check_extension(s, KVM_CAP_IRQFD_RESAMPLE) > 0);
>> +
> [...]
>
>> diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
>> index a85a480..f937568 100644
>> --- a/target-s390x/kvm.c
>> +++ b/target-s390x/kvm.c
>> @@ -1290,7 +1290,6 @@ void kvm_arch_init_irq_routing(KVMState *s)
>> * have to override the common code kvm_halt_in_kernel_allowed setting.
>> */
>> if (kvm_check_extension(s, KVM_CAP_IRQ_ROUTING)) {
> ^^^^^^^^^^^^^^^^^^^
>> - kvm_irqfds_allowed = true;
>> kvm_gsi_routing_allowed = true;
>> kvm_halt_in_kernel_allowed = false;
>> }
>
>
>
> I first thought that this is wrong, because on s390 we forgot to announce
> IRQFD when we introduced
> it. As you can see in both hunks, we check for KVM_CAP_IRQ_ROUTING and not
> for CAP_IRQFD
>
> Luckily, the kernel got fixed with commit
> ebc3226202d5956a5963185222982d435378b899
> ("KVM: s390: announce irqfd capability") and the capability was introduced
> with
> commit 84223598778ba08041f4297fda485df83414d57e ("KVM: s390: irq routing for
> adapter interrupts").
> Looks that both patches first appear with 3.15, so there should be no kernel
> version that
> is affected by this change. You might want to add that to your changelog to
> help distros that
> 84223598778ba08041f4297fda485df83414d57e also needs
> ebc3226202d5956a5963185222982d435378b899.
Hi Christian,
I will add this information to the changelog. I effectively checked the
cap was advertised in s390 arch but I was not aware of the history.
Thanks
Best Regards
Eric
>
>
>
> Christian
>