aboutsummaryrefslogtreecommitdiff
path: root/kvm.h
diff options
context:
space:
mode:
Diffstat (limited to 'kvm.h')
-rw-r--r--kvm.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/kvm.h b/kvm.h
index b90c67a498..ae87d85f24 100644
--- a/kvm.h
+++ b/kvm.h
@@ -23,8 +23,9 @@
#include <linux/kvm.h>
#endif
-#ifdef CONFIG_KVM
extern int kvm_allowed;
+
+#if defined CONFIG_KVM || !defined NEED_CPU_H
#define kvm_enabled() (kvm_allowed)
#else
#define kvm_enabled() (0)
@@ -167,15 +168,7 @@ static inline void cpu_synchronize_post_init(CPUState *env)
}
}
-#if defined(KVM_IOEVENTFD) && defined(CONFIG_KVM)
-int kvm_set_ioeventfd_pio_word(int fd, uint16_t adr, uint16_t val, bool assign);
-#else
-static inline
-int kvm_set_ioeventfd_pio_word(int fd, uint16_t adr, uint16_t val, bool assign)
-{
- return -ENOSYS;
-}
#endif
-#endif
+int kvm_set_ioeventfd_pio_word(int fd, uint16_t adr, uint16_t val, bool assign);
#endif