]> Git Repo - qemu.git/commitdiff
PPC: KVM: Add stubs for kvm helper functions
authorAlexander Graf <[email protected]>
Thu, 21 Jul 2011 00:54:51 +0000 (02:54 +0200)
committerAlexander Graf <[email protected]>
Thu, 6 Oct 2011 07:43:35 +0000 (09:43 +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 <[email protected]>
---

v1 -> v2:

   - use uint64_t for clockfreq

target-ppc/kvm_ppc.h

index 0c659c8d75d6469f58257c56b8b0afcc20134795..76f98d9ab2b33d94c08a33268ba0ca003ea5bf88 100644 (file)
 
 void kvmppc_init(void);
 
+#ifdef CONFIG_KVM
+
 uint32_t kvmppc_get_tbfreq(void);
 uint64_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 uint64_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
This page took 0.025247 seconds and 4 git commands to generate.