From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SboF3-0005zP-H9 for qemu-devel@nongnu.org; Tue, 05 Jun 2012 03:31:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SboEz-0003Vs-8v for qemu-devel@nongnu.org; Tue, 05 Jun 2012 03:31:49 -0400 Received: from mout.web.de ([212.227.17.11]:54839) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SboEy-0003VF-Uz for qemu-devel@nongnu.org; Tue, 05 Jun 2012 03:31:45 -0400 Message-ID: <4FCDB5D8.60701@web.de> Date: Tue, 05 Jun 2012 09:31:36 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <20120604233318.4C32E40771@buildbot.b1-systems.de> <4FCD58B7.9080802@suse.de> In-Reply-To: <4FCD58B7.9080802@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH] kvm: Fix build for non-CAP_IRQ_ROUTING targets List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , Anthony Liguori Cc: qemu-devel@nongnu.org, agraf@suse.de, Avi Kivity On 2012-06-05 02:54, Andreas Färber wrote: > Am 05.06.2012 01:33, schrieb qemu@buildbot.b1-systems.de: >> The Buildbot has detected a new failure on builder default_ppc while building qemu. >> Full details are available at: >> http://buildbot.b1-systems.de/qemu/builders/default_ppc/builds/417 >> >> Buildbot URL: http://buildbot.b1-systems.de/qemu/ >> >> Buildslave for this Build: qemu-ppc.opensuse.org >> >> Build Reason: The Nightly scheduler named 'nightly_default' triggered this build >> Build Source Stamp: [branch master] HEAD >> Blamelist: >> >> BUILD FAILED: failed compile > > CC ppc-softmmu/kvm-all.o > /home/build/qemu/default_ppc/build/kvm-all.c:66: error: field 'kroute' > has incomplete type > /home/build/qemu/default_ppc/build/kvm-all.c: In function 'kvm_init': > /home/build/qemu/default_ppc/build/kvm-all.c:1289: error: 'KVMState' has > no member named 'direct_msi' > make[1]: *** [kvm-all.o] Error 1 > make: *** [subdir-ppc-softmmu] Error 2 > > /-F > Sorry for missing this, here is the fix: -----8<----- From: Jan Kiszka A type definition and a KVMState field initialization escaped the required wrapping with KVM_CAP_IRQ_ROUTING. Signed-off-by: Jan Kiszka --- kvm-all.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 489ee53..275dc52 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -62,11 +62,6 @@ typedef struct KVMSlot typedef struct kvm_dirty_log KVMDirtyLog; -typedef struct KVMMSIRoute { - struct kvm_irq_routing_entry kroute; - QTAILQ_ENTRY(KVMMSIRoute) entry; -} KVMMSIRoute; - struct KVMState { KVMSlot slots[32]; @@ -867,6 +862,11 @@ int kvm_irqchip_set_irq(KVMState *s, int irq, int level) } #ifdef KVM_CAP_IRQ_ROUTING +typedef struct KVMMSIRoute { + struct kvm_irq_routing_entry kroute; + QTAILQ_ENTRY(KVMMSIRoute) entry; +} KVMMSIRoute; + static void set_gsi(KVMState *s, unsigned int gsi) { s->used_gsi_bitmap[gsi / 32] |= 1U << (gsi % 32); @@ -1286,7 +1286,9 @@ int kvm_init(void) s->pit_state2 = kvm_check_extension(s, KVM_CAP_PIT_STATE2); #endif +#ifdef KVM_CAP_IRQ_ROUTING s->direct_msi = (kvm_check_extension(s, KVM_CAP_SIGNAL_MSI) > 0); +#endif ret = kvm_arch_init(s); if (ret < 0) { -- 1.7.3.4