From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] KVM: Fix compilation on non-x86 Date: Wed, 25 Jan 2012 18:40:56 +0100 Message-ID: <4F203EA8.4060104@siemens.com> References: <1327512783-29868-1-git-send-email-agraf@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "aliguori@us.ibm.com" , "mtosatti@redhat.com" , "qemu-ppc@nongnu.org" , qemu-devel Developers , "kvm@vger.kernel.org" To: Alexander Graf Return-path: In-Reply-To: <1327512783-29868-1-git-send-email-agraf@suse.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org On 2012-01-25 18:33, Alexander Graf wrote: > Commit 84b058d broke compilation for KVM on non-x86 targets, which > don't have KVM_CAP_IRQ_ROUTING defined. > > Fix by not using the unavailable constant when it's not around. > > Signed-off-by: Alexander Graf > --- > kvm-all.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/kvm-all.c b/kvm-all.c > index e411d3c..831f39a 100644 > --- a/kvm-all.c > +++ b/kvm-all.c > @@ -1305,7 +1305,11 @@ int kvm_has_many_ioeventfds(void) > > int kvm_has_gsi_routing(void) > { > +#ifdef KVM_CAP_IRQ_ROUTING > return kvm_check_extension(kvm_state, KVM_CAP_IRQ_ROUTING); > +#else > + return false; > +#endif > } > > int kvm_allows_irq0_override(void) Yep, thanks. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54672) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rq6qO-0003iU-A4 for qemu-devel@nongnu.org; Wed, 25 Jan 2012 12:41:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rq6qN-0004I0-9X for qemu-devel@nongnu.org; Wed, 25 Jan 2012 12:41:12 -0500 Message-ID: <4F203EA8.4060104@siemens.com> Date: Wed, 25 Jan 2012 18:40:56 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <1327512783-29868-1-git-send-email-agraf@suse.de> In-Reply-To: <1327512783-29868-1-git-send-email-agraf@suse.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] KVM: Fix compilation on non-x86 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: "aliguori@us.ibm.com" , "mtosatti@redhat.com" , "qemu-ppc@nongnu.org" , qemu-devel Developers , "kvm@vger.kernel.org" On 2012-01-25 18:33, Alexander Graf wrote: > Commit 84b058d broke compilation for KVM on non-x86 targets, which > don't have KVM_CAP_IRQ_ROUTING defined. > > Fix by not using the unavailable constant when it's not around. > > Signed-off-by: Alexander Graf > --- > kvm-all.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/kvm-all.c b/kvm-all.c > index e411d3c..831f39a 100644 > --- a/kvm-all.c > +++ b/kvm-all.c > @@ -1305,7 +1305,11 @@ int kvm_has_many_ioeventfds(void) > > int kvm_has_gsi_routing(void) > { > +#ifdef KVM_CAP_IRQ_ROUTING > return kvm_check_extension(kvm_state, KVM_CAP_IRQ_ROUTING); > +#else > + return false; > +#endif > } > > int kvm_allows_irq0_override(void) Yep, thanks. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux