]>
Commit | Line | Data |
---|---|---|
98c8573e PB |
1 | /* |
2 | * QEMU KVM stub | |
3 | * | |
4 | * Copyright Red Hat, Inc. 2010 | |
5 | * | |
6 | * Author: Paolo Bonzini <pbonzini@redhat.com> | |
7 | * | |
8 | * This work is licensed under the terms of the GNU GPL, version 2 or later. | |
9 | * See the COPYING file in the top-level directory. | |
10 | * | |
11 | */ | |
12 | ||
13 | #include "qemu-common.h" | |
98c8573e | 14 | #include "hw/hw.h" |
2b41f10e | 15 | #include "cpu.h" |
9c17d615 | 16 | #include "sysemu/kvm.h" |
98c8573e | 17 | |
c4cfef5e IM |
18 | #ifndef CONFIG_USER_ONLY |
19 | #include "hw/pci/msi.h" | |
20 | #endif | |
21 | ||
92b4e489 | 22 | KVMState *kvm_state; |
bbf3b804 | 23 | bool kvm_kernel_irqchip; |
7ae26bd4 | 24 | bool kvm_async_interrupts_allowed; |
69e03ae6 | 25 | bool kvm_eventfds_allowed; |
cc7e0ddf | 26 | bool kvm_irqfds_allowed; |
614e41bc | 27 | bool kvm_msi_via_irqfd_allowed; |
f3e1bed8 | 28 | bool kvm_gsi_routing_allowed; |
76fe21de | 29 | bool kvm_gsi_direct_mapping; |
13eed94e | 30 | bool kvm_allowed; |
df9c8b75 | 31 | bool kvm_readonly_mem_allowed; |
92b4e489 | 32 | |
504134d2 | 33 | int kvm_init_vcpu(CPUState *cpu) |
98c8573e PB |
34 | { |
35 | return -ENOSYS; | |
36 | } | |
37 | ||
f1e29879 | 38 | int kvm_init(MachineClass *mc) |
98c8573e PB |
39 | { |
40 | return -ENOSYS; | |
41 | } | |
42 | ||
43 | void kvm_flush_coalesced_mmio_buffer(void) | |
44 | { | |
45 | } | |
46 | ||
dd1750d7 | 47 | void kvm_cpu_synchronize_state(CPUState *cpu) |
98c8573e PB |
48 | { |
49 | } | |
50 | ||
3f24a58f | 51 | void kvm_cpu_synchronize_post_reset(CPUState *cpu) |
98c8573e PB |
52 | { |
53 | } | |
54 | ||
3f24a58f | 55 | void kvm_cpu_synchronize_post_init(CPUState *cpu) |
98c8573e PB |
56 | { |
57 | } | |
58 | ||
1458c363 | 59 | int kvm_cpu_exec(CPUState *cpu) |
98c8573e | 60 | { |
1458c363 | 61 | abort(); |
98c8573e PB |
62 | } |
63 | ||
64 | int kvm_has_sync_mmu(void) | |
65 | { | |
66 | return 0; | |
67 | } | |
68 | ||
d2f2b8a7 SH |
69 | int kvm_has_many_ioeventfds(void) |
70 | { | |
71 | return 0; | |
72 | } | |
73 | ||
8a7c7393 JK |
74 | int kvm_has_pit_state2(void) |
75 | { | |
76 | return 0; | |
77 | } | |
78 | ||
98c8573e PB |
79 | void kvm_setup_guest_memory(void *start, size_t size) |
80 | { | |
81 | } | |
82 | ||
38e478ec | 83 | int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap) |
98c8573e | 84 | { |
4bef75b5 | 85 | return -ENOSYS; |
98c8573e PB |
86 | } |
87 | ||
62278814 | 88 | int kvm_insert_breakpoint(CPUState *cpu, target_ulong addr, |
98c8573e PB |
89 | target_ulong len, int type) |
90 | { | |
91 | return -EINVAL; | |
92 | } | |
93 | ||
62278814 | 94 | int kvm_remove_breakpoint(CPUState *cpu, target_ulong addr, |
98c8573e PB |
95 | target_ulong len, int type) |
96 | { | |
97 | return -EINVAL; | |
98 | } | |
99 | ||
1d5791f4 | 100 | void kvm_remove_all_breakpoints(CPUState *cpu) |
98c8573e PB |
101 | { |
102 | } | |
103 | ||
104 | #ifndef _WIN32 | |
491d6e80 | 105 | int kvm_set_signal_mask(CPUState *cpu, const sigset_t *sigset) |
98c8573e PB |
106 | { |
107 | abort(); | |
108 | } | |
109 | #endif | |
110 | ||
290adf38 | 111 | int kvm_on_sigbus_vcpu(CPUState *cpu, int code, void *addr) |
a1b87fe0 JK |
112 | { |
113 | return 1; | |
114 | } | |
115 | ||
c0532a76 MT |
116 | int kvm_on_sigbus(int code, void *addr) |
117 | { | |
118 | return 1; | |
119 | } | |
92b4e489 | 120 | |
c4cfef5e | 121 | #ifndef CONFIG_USER_ONLY |
92b4e489 JK |
122 | int kvm_irqchip_add_msi_route(KVMState *s, MSIMessage msg) |
123 | { | |
124 | return -ENOSYS; | |
125 | } | |
1e2aa8be | 126 | |
7b774593 AG |
127 | void kvm_init_irq_routing(KVMState *s) |
128 | { | |
129 | } | |
130 | ||
1e2aa8be JK |
131 | void kvm_irqchip_release_virq(KVMState *s, int virq) |
132 | { | |
133 | } | |
39853bbc | 134 | |
078bbb50 MT |
135 | int kvm_irqchip_update_msi_route(KVMState *s, int virq, MSIMessage msg) |
136 | { | |
137 | return -ENOSYS; | |
138 | } | |
139 | ||
d426d9fb CH |
140 | int kvm_irqchip_add_adapter_route(KVMState *s, AdapterInfo *adapter) |
141 | { | |
142 | return -ENOSYS; | |
143 | } | |
144 | ||
821c808b PB |
145 | int kvm_irqchip_add_irqfd_notifier(KVMState *s, EventNotifier *n, |
146 | EventNotifier *rn, int virq) | |
39853bbc JK |
147 | { |
148 | return -ENOSYS; | |
149 | } | |
150 | ||
b131c74a | 151 | int kvm_irqchip_remove_irqfd_notifier(KVMState *s, EventNotifier *n, int virq) |
15b2bd18 PB |
152 | { |
153 | return -ENOSYS; | |
154 | } | |
c4cfef5e | 155 | #endif |