From: Avi Kivity <[email protected]>

We now need kvm_context_t, kvm_allowed, and a few functions exposed even
with kvm disabled.

Signed-off-by: Avi Kivity <[email protected]>

diff --git a/qemu-kvm.h b/qemu-kvm.h
index b186c9d..eb48ff8 100644
--- a/qemu-kvm.h
+++ b/qemu-kvm.h
@@ -936,8 +936,19 @@ uint32_t kvm_get_supported_cpuid(kvm_context_t kvm, 
uint32_t function, int reg);
 
 #else /* !CONFIG_KVM */
 
+typedef struct kvm_context *kvm_context_t;
+typedef struct kvm_vcpu_context *kvm_vcpu_context_t;
+
 struct kvm_pit_state { };
 
+static inline int kvm_init(int smp_cpus) { return 0; }
+static inline void kvm_inject_x86_mce(
+    CPUState *cenv, int bank,uint64_t status,
+    uint64_t mcg_status, uint64_t addr, uint64_t misc) { }
+
+
+extern int kvm_allowed;
+
 #endif /* !CONFIG_KVM */
 
 
@@ -1167,6 +1178,8 @@ static inline int kvm_set_migration_log(int enable)
     return kvm_physical_memory_set_dirty_tracking(enable);
 }
 
+#ifdef CONFIG_KVM
+
 typedef struct KVMSlot
 {
     target_phys_addr_t start_addr;
@@ -1199,3 +1212,5 @@ int kvm_vm_ioctl(KVMState *s, int type, ...);
 int kvm_check_extension(KVMState *s, unsigned int ext);
 
 #endif
+
+#endif
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to