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