4 * Copyright IBM, Corp. 2008
9 * This work is licensed under the terms of the GNU GPL, version 2 or later.
10 * See the COPYING file in the top-level directory.
20 extern int kvm_allowed;
22 #define kvm_enabled() (kvm_allowed)
24 #define kvm_enabled() (0)
31 int kvm_init(int smp_cpus);
33 int kvm_init_vcpu(CPUState *env);
35 int kvm_cpu_exec(CPUState *env);
37 void kvm_set_phys_mem(target_phys_addr_t start_addr,
39 ram_addr_t phys_offset);
41 void kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr, target_phys_addr_t end_addr);
43 int kvm_log_start(target_phys_addr_t phys_addr, target_phys_addr_t len);
44 int kvm_log_stop(target_phys_addr_t phys_addr, target_phys_addr_t len);
48 typedef struct KVMState KVMState;
50 int kvm_ioctl(KVMState *s, int type, ...);
52 int kvm_vm_ioctl(KVMState *s, int type, ...);
54 int kvm_vcpu_ioctl(CPUState *env, int type, ...);
56 /* Arch specific hooks */
58 int kvm_arch_post_run(CPUState *env, struct kvm_run *run);
60 int kvm_arch_handle_exit(CPUState *env, struct kvm_run *run);
62 int kvm_arch_pre_run(CPUState *env, struct kvm_run *run);
64 int kvm_arch_get_registers(CPUState *env);
66 int kvm_arch_put_registers(CPUState *env);
68 int kvm_arch_init(KVMState *s, int smp_cpus);
70 int kvm_arch_init_vcpu(CPUState *env);