]> git.proxmox.com Git - qemu.git/blobdiff - kvm.h
Allow various header files to be included from non-CPU code
[qemu.git] / kvm.h
diff --git a/kvm.h b/kvm.h
index fd8d0c16c8e9f82823ee94613f96f3a83eac627e..4f77188e2682c2cbae20b8accf5f0eedd25e310b 100644 (file)
--- a/kvm.h
+++ b/kvm.h
 #ifndef QEMU_KVM_H
 #define QEMU_KVM_H
 
-#include "config.h"
+#include "config-host.h"
 #include "qemu-queue.h"
 
-#ifdef CONFIG_KVM
 extern int kvm_allowed;
 
+#ifdef CONFIG_KVM
 #define kvm_enabled() (kvm_allowed)
 #else
 #define kvm_enabled() (0)
@@ -31,6 +31,7 @@ struct kvm_run;
 
 int kvm_init(int smp_cpus);
 
+#ifdef NEED_CPU_H
 int kvm_init_vcpu(CPUState *env);
 
 int kvm_cpu_exec(CPUState *env);
@@ -160,5 +161,5 @@ static inline void cpu_synchronize_post_init(CPUState *env)
         kvm_cpu_synchronize_post_init(env);
     }
 }
-
+#endif
 #endif