From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPA14-0003KC-1m for qemu-devel@nongnu.org; Wed, 03 Sep 2014 08:50:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPA0r-0004nU-1X for qemu-devel@nongnu.org; Wed, 03 Sep 2014 08:50:25 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:36285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPA0q-0004n7-PK for qemu-devel@nongnu.org; Wed, 03 Sep 2014 08:50:12 -0400 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 3 Sep 2014 13:50:10 +0100 Message-ID: <54070E7E.9080506@de.ibm.com> Date: Wed, 03 Sep 2014 14:50:06 +0200 From: Christian Borntraeger MIME-Version: 1.0 References: <1409738050-3810-1-git-send-email-eric.auger@linaro.org> <1409738050-3810-2-git-send-email-eric.auger@linaro.org> In-Reply-To: <1409738050-3810-2-git-send-email-eric.auger@linaro.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 1/2] KVM_CAP_IRQFD and KVM_CAP_IRQFD_RESAMPLE checks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Auger , eric.auger@st.com, christoffer.dall@linaro.org, qemu-devel@nongnu.org, a.rigo@virtualopensystems.com, agraf@suse.de, aik@ozlabs.ru, bsd@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, mtosatti@redhat.com, cornelia.huck@de.ibm.com, rth@twiddle.net, thuth@linux.vnet.ibm.com, afaerber@suse.de, qemu-ppc@nongnu.org Cc: alex.williamson@redhat.com, kvmarm@lists.cs.columbia.edu, patches@linaro.org 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. Christian