[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 19/23] PPC: KVM: Add stubs for kvm helper functions
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 19/23] PPC: KVM: Add stubs for kvm helper functions |
Date: |
Thu, 21 Jul 2011 03:27:30 +0200 |
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 <address@hidden>
---
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
- Re: [Qemu-devel] [PATCH 14/23] PPC: KVM: Add generic function to read host clockfreq, (continued)
[Qemu-devel] [PATCH 16/23] PPC: E500: Remove mpc8544_copy_soc_cell, Alexander Graf, 2011/07/20
[Qemu-devel] [PATCH 06/23] PPC: Fix IPI support in MPIC, Alexander Graf, 2011/07/20
[Qemu-devel] [PATCH 21/23] PPC: E500: Remove unneeded CPU nodes, Alexander Graf, 2011/07/20
[Qemu-devel] [PATCH 22/23] PPC: E500: Update cpu-release-addr property in cpu nodes, Alexander Graf, 2011/07/20
[Qemu-devel] [PATCH 19/23] PPC: KVM: Add stubs for kvm helper functions,
Alexander Graf <=
[Qemu-devel] [PATCH 01/23] PPC: Add secondary CPU spinning code, Alexander Graf, 2011/07/20
[Qemu-devel] [PATCH 04/23] PPC: Add CPU local MMIO regions to MPIC, Alexander Graf, 2011/07/20
[Qemu-devel] [PATCH 03/23] PPC: Add CPU definitions for up to 32 guest CPUs, Alexander Graf, 2011/07/20
[Qemu-devel] [PATCH 18/23] PPC: KVM: Remove kvmppc_read_host_property, Alexander Graf, 2011/07/20
[Qemu-devel] [PATCH 08/23] PPC: Bump MPIC up to 32 supported CPUs, Alexander Graf, 2011/07/20