VirtualBox

source: vbox/trunk/src/recompiler/kvm.h@ 36170

Last change on this file since 36170 was 36170, checked in by vboxsync, 14 years ago

rem: synced up to svn://svn.savannah.nongnu.org/qemu/trunk@6686 (repo UUID c046a42c-6fe2-441c-8c8c-71466251a162).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
Line 
1/*
2 * QEMU KVM support
3 *
4 * Copyright IBM, Corp. 2008
5 *
6 * Authors:
7 * Anthony Liguori <[email protected]>
8 *
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.
11 *
12 */
13
14#ifndef QEMU_KVM_H
15#define QEMU_KVM_H
16
17#include "config.h"
18
19#ifdef CONFIG_KVM
20extern int kvm_allowed;
21
22#define kvm_enabled() (kvm_allowed)
23#else
24#define kvm_enabled() (0)
25#endif
26
27struct kvm_run;
28
29/* external API */
30
31int kvm_init(int smp_cpus);
32
33int kvm_init_vcpu(CPUState *env);
34int kvm_sync_vcpus(void);
35
36int kvm_cpu_exec(CPUState *env);
37
38void kvm_set_phys_mem(target_phys_addr_t start_addr,
39 ram_addr_t size,
40 ram_addr_t phys_offset);
41
42void kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr, target_phys_addr_t end_addr);
43
44int kvm_log_start(target_phys_addr_t phys_addr, target_phys_addr_t len);
45int kvm_log_stop(target_phys_addr_t phys_addr, target_phys_addr_t len);
46
47int kvm_has_sync_mmu(void);
48
49int kvm_coalesce_mmio_region(target_phys_addr_t start, ram_addr_t size);
50int kvm_uncoalesce_mmio_region(target_phys_addr_t start, ram_addr_t size);
51
52/* internal API */
53
54struct KVMState;
55typedef struct KVMState KVMState;
56
57int kvm_ioctl(KVMState *s, int type, ...);
58
59int kvm_vm_ioctl(KVMState *s, int type, ...);
60
61int kvm_vcpu_ioctl(CPUState *env, int type, ...);
62
63/* Arch specific hooks */
64
65int kvm_arch_post_run(CPUState *env, struct kvm_run *run);
66
67int kvm_arch_handle_exit(CPUState *env, struct kvm_run *run);
68
69int kvm_arch_pre_run(CPUState *env, struct kvm_run *run);
70
71int kvm_arch_get_registers(CPUState *env);
72
73int kvm_arch_put_registers(CPUState *env);
74
75int kvm_arch_init(KVMState *s, int smp_cpus);
76
77int kvm_arch_init_vcpu(CPUState *env);
78
79#endif
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette