[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 21/64] PPC: KVM: Add stubs for kvm helper functions
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PATCH 21/64] PPC: KVM: Add stubs for kvm helper functions |
Date: |
Thu, 6 Oct 2011 10:05:23 +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>
---
v1 -> v2:
- use uint64_t for clockfreq
---
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 0c659c8..76f98d9 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);
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
--
1.6.0.2
- [Qemu-ppc] [PATCH 08/64] PPC: Set MPIC IDE for IPI to 0, (continued)
- [Qemu-ppc] [PATCH 08/64] PPC: Set MPIC IDE for IPI to 0, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 63/64] pseries: Implement set-time-of-day RTAS function, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 62/64] pseries: Refactor spapr irq allocation, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 22/64] PPC: E500: Update freqs for all CPUs, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 48/64] pseries: Implement hcall-bulk hypervisor interface, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 42/64] pseries: use macro for firmware filename, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 20/64] PPC: KVM: Remove kvmppc_read_host_property, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 32/64] PPC: Add new target config for pseries, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 61/64] PPC: Clean up BookE timer code, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 58/64] KVM: Update kernel headers, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 21/64] PPC: KVM: Add stubs for kvm helper functions,
Alexander Graf <=
- [Qemu-ppc] [PATCH 52/64] openpic: Unfold read_IRQreg, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 26/64] device tree: add add_subnode command, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 60/64] PPC: booke timers, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 23/64] PPC: E500: Remove unneeded CPU nodes, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 24/64] PPC: E500: Add PV spinning code, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 53/64] openpic: Unfold write_IRQreg, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 35/64] PPC: SPAPR: Use KVM function for time info, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 39/64] pseries: More complete WIMG validation in H_ENTER code, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 43/64] KVM: Update kernel headers, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 51/64] ppc405: use RAM_ADDR_FMT instead of %08lx, Alexander Graf, 2011/10/06