From patchwork Sat Jul 4 09:03:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 34047 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 n6493ISK008288 for ; Sat, 4 Jul 2009 09:03:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753453AbZGDJDN (ORCPT ); Sat, 4 Jul 2009 05:03:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753307AbZGDJDN (ORCPT ); Sat, 4 Jul 2009 05:03:13 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:38082 "EHLO fmmailgate03.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753280AbZGDJDM (ORCPT ); Sat, 4 Jul 2009 05:03:12 -0400 Received: from smtp05.web.de (fmsmtp05.dlan.cinetic.de [172.20.4.166]) by fmmailgate03.web.de (Postfix) with ESMTP id BD677102BD703; Sat, 4 Jul 2009 11:03:13 +0200 (CEST) Received: from [92.74.61.159] (helo=[192.168.1.10]) by smtp05.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #277) id 1MN19N-0005w4-00; Sat, 04 Jul 2009 11:03:13 +0200 Message-ID: <4A4F1AD0.4090905@web.de> Date: Sat, 04 Jul 2009 11:03:12 +0200 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Avi Kivity CC: kvm-devel Subject: [PATCH] qemu-kvm: Fix kvm-disabled build X-Enigmail-Version: 0.95.7 X-Sender: jan.kiszka@web.de X-Provags-ID: V01U2FsdGVkX1/feh48yuJJkGAHIz3ftVPB6WgjQOeGVCg0+H8o Bv/52LPOFQeRgpAMzCmvrQCt97HnmRRrNS5sMHUx6Hvjg/OJwu glEsFbf8o= Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org This addresses all issues that currently block building qemu-kvm with kvm support switched off. It's a pragmatic approach as more cleanups are actually required /wrt {kvm,libkvm,qemu-kvm}.h. Signed-off-by: Jan Kiszka --- hw/pcspk.c | 4 ++-- libkvm-all.h | 8 ++++++++ qemu-kvm.h | 3 ++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/hw/pcspk.c b/hw/pcspk.c index 9e1b59a..3d3eba4 100644 --- a/hw/pcspk.c +++ b/hw/pcspk.c @@ -82,9 +82,9 @@ static void kvm_set_pit_ch2(PITState *pit, } #else static inline void kvm_get_pit_ch2(PITState *pit, - kvm_pit_state *inkernel_state) { } + struct kvm_pit_state *inkernel_state) { } static inline void kvm_set_pit_ch2(PITState *pit, - kvm_pit_state *inkernel_state) { } + struct kvm_pit_state *inkernel_state) { } #endif static inline void generate_samples(PCSpkState *s) diff --git a/libkvm-all.h b/libkvm-all.h index ecd3065..f348e69 100644 --- a/libkvm-all.h +++ b/libkvm-all.h @@ -5,6 +5,8 @@ #ifndef LIBKVM_H #define LIBKVM_H +#ifdef USE_KVM + #if defined(__s390__) #include #endif @@ -938,4 +940,10 @@ int kvm_assign_set_msix_entry(kvm_context_t kvm, uint32_t kvm_get_supported_cpuid(kvm_context_t kvm, uint32_t function, int reg); +#else /* !USE_KVM */ + +struct kvm_pit_state { }; + +#endif /* !USE_KVM */ + #endif diff --git a/qemu-kvm.h b/qemu-kvm.h index eb99bc4..18a5b7f 100644 --- a/qemu-kvm.h +++ b/qemu-kvm.h @@ -12,6 +12,8 @@ #include +#include "libkvm-all.h" + int kvm_main_loop(void); int kvm_qemu_init(void); int kvm_qemu_create_context(void); @@ -141,7 +143,6 @@ void kvm_arch_do_ioperm(void *_data); #define BITMAP_SIZE(m) (ALIGN(((m)>>TARGET_PAGE_BITS), HOST_LONG_BITS) / 8) #ifdef USE_KVM -#include "libkvm-all.h" #include "sys-queue.h" extern int kvm_allowed;