kvm-stub.c 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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. #include "qemu-common.h"
  13. #include "hw/hw.h"
  14. #include "cpu.h"
  15. #include "sysemu/kvm.h"
  16. #ifndef CONFIG_USER_ONLY
  17. #include "hw/pci/msi.h"
  18. #endif
  19. KVMState *kvm_state;
  20. bool kvm_kernel_irqchip;
  21. bool kvm_async_interrupts_allowed;
  22. bool kvm_irqfds_allowed;
  23. bool kvm_msi_via_irqfd_allowed;
  24. bool kvm_gsi_routing_allowed;
  25. bool kvm_gsi_direct_mapping;
  26. bool kvm_allowed;
  27. bool kvm_readonly_mem_allowed;
  28. int kvm_init_vcpu(CPUState *cpu)
  29. {
  30. return -ENOSYS;
  31. }
  32. int kvm_init(QEMUMachine *machine)
  33. {
  34. return -ENOSYS;
  35. }
  36. void kvm_flush_coalesced_mmio_buffer(void)
  37. {
  38. }
  39. void kvm_cpu_synchronize_state(CPUState *cpu)
  40. {
  41. }
  42. void kvm_cpu_synchronize_post_reset(CPUState *cpu)
  43. {
  44. }
  45. void kvm_cpu_synchronize_post_init(CPUState *cpu)
  46. {
  47. }
  48. int kvm_cpu_exec(CPUState *cpu)
  49. {
  50. abort();
  51. }
  52. int kvm_has_sync_mmu(void)
  53. {
  54. return 0;
  55. }
  56. int kvm_has_many_ioeventfds(void)
  57. {
  58. return 0;
  59. }
  60. int kvm_has_pit_state2(void)
  61. {
  62. return 0;
  63. }
  64. void kvm_setup_guest_memory(void *start, size_t size)
  65. {
  66. }
  67. int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap)
  68. {
  69. return -ENOSYS;
  70. }
  71. int kvm_insert_breakpoint(CPUState *cpu, target_ulong addr,
  72. target_ulong len, int type)
  73. {
  74. return -EINVAL;
  75. }
  76. int kvm_remove_breakpoint(CPUState *cpu, target_ulong addr,
  77. target_ulong len, int type)
  78. {
  79. return -EINVAL;
  80. }
  81. void kvm_remove_all_breakpoints(CPUState *cpu)
  82. {
  83. }
  84. #ifndef _WIN32
  85. int kvm_set_signal_mask(CPUState *cpu, const sigset_t *sigset)
  86. {
  87. abort();
  88. }
  89. #endif
  90. int kvm_on_sigbus_vcpu(CPUState *cpu, int code, void *addr)
  91. {
  92. return 1;
  93. }
  94. int kvm_on_sigbus(int code, void *addr)
  95. {
  96. return 1;
  97. }
  98. #ifndef CONFIG_USER_ONLY
  99. int kvm_irqchip_add_msi_route(KVMState *s, MSIMessage msg)
  100. {
  101. return -ENOSYS;
  102. }
  103. void kvm_init_irq_routing(KVMState *s)
  104. {
  105. }
  106. void kvm_irqchip_release_virq(KVMState *s, int virq)
  107. {
  108. }
  109. int kvm_irqchip_update_msi_route(KVMState *s, int virq, MSIMessage msg)
  110. {
  111. return -ENOSYS;
  112. }
  113. int kvm_irqchip_add_irqfd_notifier(KVMState *s, EventNotifier *n,
  114. EventNotifier *rn, int virq)
  115. {
  116. return -ENOSYS;
  117. }
  118. int kvm_irqchip_remove_irqfd_notifier(KVMState *s, EventNotifier *n, int virq)
  119. {
  120. return -ENOSYS;
  121. }
  122. #endif