From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qji3N-0002Eb-Lo for qemu-devel@nongnu.org; Wed, 20 Jul 2011 21:27:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qji3B-0003sh-RS for qemu-devel@nongnu.org; Wed, 20 Jul 2011 21:27:52 -0400 Received: from cantor2.suse.de ([195.135.220.15]:58021 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qji3A-0003qx-8C for qemu-devel@nongnu.org; Wed, 20 Jul 2011 21:27:40 -0400 From: Alexander Graf Date: Thu, 21 Jul 2011 03:27:30 +0200 Message-Id: <1311211654-14326-20-git-send-email-agraf@suse.de> In-Reply-To: <1311211654-14326-1-git-send-email-agraf@suse.de> References: <1311211654-14326-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH 19/23] PPC: KVM: Add stubs for kvm helper functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU-devel Developers Cc: Scott Wood We have a bunch of helper functions that don't have any stubs for them in case we don't have CONFIG_KVM enabled. That didn't bite us so far, because gcc can optimize them out pretty well, but we should really provide them. Signed-off-by: Alexander Graf --- target-ppc/kvm_ppc.h | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/target-ppc/kvm_ppc.h b/target-ppc/kvm_ppc.h index 523825d..df5730d 100644 --- a/target-ppc/kvm_ppc.h +++ b/target-ppc/kvm_ppc.h @@ -11,11 +11,37 @@ void kvmppc_init(void); +#ifdef CONFIG_KVM + uint32_t kvmppc_get_tbfreq(void); uint32_t kvmppc_get_clockfreq(void); int kvmppc_get_hypercall(CPUState *env, uint8_t *buf, int buf_len); int kvmppc_set_interrupt(CPUState *env, int irq, int level); +#else + +static inline uint32_t kvmppc_get_tbfreq(void) +{ + return 0; +} + +static inline uint32_t kvmppc_get_clockfreq(void) +{ + return 0; +} + +static inline int kvmppc_get_hypercall(CPUState *env, uint8_t *buf, int buf_len) +{ + return -1; +} + +static inline int kvmppc_set_interrupt(CPUState *env, int irq, int level) +{ + return -1; +} + +#endif + #ifndef CONFIG_KVM #define kvmppc_eieio() do { } while (0) #else -- 1.6.0.2