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/osdep.h"
14#include "cpu.h"
15#include "sysemu/kvm.h"
16
17#ifndef CONFIG_USER_ONLY
18#include "hw/pci/msi.h"
19#endif
20
21KVMState *kvm_state;
22bool kvm_kernel_irqchip;
23bool kvm_async_interrupts_allowed;
24bool kvm_eventfds_allowed;
25bool kvm_irqfds_allowed;
26bool kvm_resamplefds_allowed;
27bool kvm_msi_via_irqfd_allowed;
28bool kvm_gsi_routing_allowed;
29bool kvm_gsi_direct_mapping;
30bool kvm_allowed;
31bool kvm_readonly_mem_allowed;
32bool kvm_ioeventfd_any_length_allowed;
33bool kvm_msi_use_devid;
34
35int kvm_destroy_vcpu(CPUState *cpu)
36{
37 return -ENOSYS;
38}
39
40int kvm_init_vcpu(CPUState *cpu)
41{
42 return -ENOSYS;
43}
44
45void kvm_flush_coalesced_mmio_buffer(void)
46{
47}
48
49void kvm_cpu_synchronize_state(CPUState *cpu)
50{
51}
52
53void kvm_cpu_synchronize_post_reset(CPUState *cpu)
54{
55}
56
57void kvm_cpu_synchronize_post_init(CPUState *cpu)
58{
59}
60
61int kvm_cpu_exec(CPUState *cpu)
62{
63 abort();
64}
65
66bool kvm_has_sync_mmu(void)
67{
68 return false;
69}
70
71int kvm_has_many_ioeventfds(void)
72{
73 return 0;
74}
75
76int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap)
77{
78 return -ENOSYS;
79}
80
81int kvm_insert_breakpoint(CPUState *cpu, target_ulong addr,
82 target_ulong len, int type)
83{
84 return -EINVAL;
85}
86
87int kvm_remove_breakpoint(CPUState *cpu, target_ulong addr,
88 target_ulong len, int type)
89{
90 return -EINVAL;
91}
92
93void kvm_remove_all_breakpoints(CPUState *cpu)
94{
95}
96
97int kvm_on_sigbus_vcpu(CPUState *cpu, int code, void *addr)
98{
99 return 1;
100}
101
102int kvm_on_sigbus(int code, void *addr)
103{
104 return 1;
105}
106
107bool kvm_memcrypt_enabled(void)
108{
109 return false;
110}
111
112int kvm_memcrypt_encrypt_data(uint8_t *ptr, uint64_t len)
113{
114 return 1;
115}
116
117#ifndef CONFIG_USER_ONLY
118int kvm_irqchip_add_msi_route(KVMState *s, int vector, PCIDevice *dev)
119{
120 return -ENOSYS;
121}
122
123void kvm_init_irq_routing(KVMState *s)
124{
125}
126
127void kvm_irqchip_release_virq(KVMState *s, int virq)
128{
129}
130
131int kvm_irqchip_update_msi_route(KVMState *s, int virq, MSIMessage msg,
132 PCIDevice *dev)
133{
134 return -ENOSYS;
135}
136
137void kvm_irqchip_commit_routes(KVMState *s)
138{
139}
140
141int kvm_irqchip_add_adapter_route(KVMState *s, AdapterInfo *adapter)
142{
143 return -ENOSYS;
144}
145
146int kvm_irqchip_add_irqfd_notifier_gsi(KVMState *s, EventNotifier *n,
147 EventNotifier *rn, int virq)
148{
149 return -ENOSYS;
150}
151
152int kvm_irqchip_remove_irqfd_notifier_gsi(KVMState *s, EventNotifier *n,
153 int virq)
154{
155 return -ENOSYS;
156}
157
158bool kvm_has_free_slot(MachineState *ms)
159{
160 return false;
161}
162
163void kvm_init_cpu_signals(CPUState *cpu)
164{
165 abort();
166}
167
168bool kvm_arm_supports_user_irq(void)
169{
170 return false;
171}
172#endif
173