From patchwork Sun Mar 15 10:19:15 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gleb Natapov X-Patchwork-Id: 12179 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2FAN55m000427 for ; Sun, 15 Mar 2009 10:23:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754133AbZCOKXG (ORCPT ); Sun, 15 Mar 2009 06:23:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753614AbZCOKXF (ORCPT ); Sun, 15 Mar 2009 06:23:05 -0400 Received: from mx2.redhat.com ([66.187.237.31]:50250 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753273AbZCOKXD convert rfc822-to-8bit (ORCPT ); Sun, 15 Mar 2009 06:23:03 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n2FAMwQ4024580; Sun, 15 Mar 2009 06:22:58 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n2FAMwLf014339; Sun, 15 Mar 2009 06:22:59 -0400 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n2FAMvGc011880; Sun, 15 Mar 2009 06:22:58 -0400 Received: by dhcp-1-237.tlv.redhat.com (Postfix, from userid 587) id C7ED718D41C; Sun, 15 Mar 2009 12:19:15 +0200 (IST) Date: Sun, 15 Mar 2009 12:19:15 +0200 From: Gleb Natapov To: Avi Kivity Cc: Gregory Haskins , kvm@vger.kernel.org, Mark McLoughlin , Weidong Han Subject: Re: Build breakage between kvm-userspace.git HEAD and 2.6.29-rc8 Message-ID: <20090315101915.GF10892@redhat.com> References: <49BA7D77.1010003@gmail.com> <49BCC914.4070204@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <49BCC914.4070204@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 >> 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. -- 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 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; }