summaryrefslogtreecommitdiff
path: root/target-s390x
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2011-04-15 15:16:40 +0200
committerAlexander Graf <agraf@suse.de>2011-05-20 17:35:12 +0200
commit1f20626679964730f991a9faeb5d9438c2827465 (patch)
tree97b52c6848c0136e7ecff9c793bc33405ad2dd97 /target-s390x
parenta4c075f178a3a2c976667389f19ce7dbabaf9712 (diff)
s390x: make kvm exported functions conditional on kvm
We have some helper functions we use to directly invoke KVM functionality from device emulation code. This patch replaces those exported functions with static inline stubs when not building with KVM enabled. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'target-s390x')
-rw-r--r--target-s390x/cpu.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h
index a84b3ee184..79aa6c995f 100644
--- a/target-s390x/cpu.h
+++ b/target-s390x/cpu.h
@@ -287,10 +287,27 @@ int cpu_s390x_handle_mmu_fault (CPUS390XState *env, target_ulong address, int rw
#ifndef CONFIG_USER_ONLY
int s390_virtio_hypercall(CPUState *env, uint64_t mem, uint64_t hypercall);
+#ifdef CONFIG_KVM
void kvm_s390_interrupt(CPUState *env, int type, uint32_t code);
void kvm_s390_virtio_irq(CPUState *env, int config_change, uint64_t token);
void kvm_s390_interrupt_internal(CPUState *env, int type, uint32_t parm,
uint64_t parm64, int vm);
+#else
+static inline void kvm_s390_interrupt(CPUState *env, int type, uint32_t code)
+{
+}
+
+static inline void kvm_s390_virtio_irq(CPUState *env, int config_change,
+ uint64_t token)
+{
+}
+
+static inline void kvm_s390_interrupt_internal(CPUState *env, int type,
+ uint32_t parm, uint64_t parm64,
+ int vm)
+{
+}
+#endif
CPUState *s390_cpu_addr2state(uint16_t cpu_addr);
#ifndef KVM_S390_SIGP_STOP