kvm-stub.c 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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 "gdbstub.h"
  16. #include "kvm.h"
  17. int kvm_irqchip_in_kernel(void)
  18. {
  19. return 0;
  20. }
  21. int kvm_pit_in_kernel(void)
  22. {
  23. return 0;
  24. }
  25. int kvm_init_vcpu(CPUState *env)
  26. {
  27. return -ENOSYS;
  28. }
  29. int kvm_coalesce_mmio_region(target_phys_addr_t start, ram_addr_t size)
  30. {
  31. return -ENOSYS;
  32. }
  33. int kvm_uncoalesce_mmio_region(target_phys_addr_t start, ram_addr_t size)
  34. {
  35. return -ENOSYS;
  36. }
  37. int kvm_init(void)
  38. {
  39. return -ENOSYS;
  40. }
  41. void kvm_flush_coalesced_mmio_buffer(void)
  42. {
  43. }
  44. void kvm_cpu_synchronize_state(CPUState *env)
  45. {
  46. }
  47. void kvm_cpu_synchronize_post_reset(CPUState *env)
  48. {
  49. }
  50. void kvm_cpu_synchronize_post_init(CPUState *env)
  51. {
  52. }
  53. int kvm_cpu_exec(CPUState *env)
  54. {
  55. abort ();
  56. }
  57. int kvm_has_sync_mmu(void)
  58. {
  59. return 0;
  60. }
  61. int kvm_has_many_ioeventfds(void)
  62. {
  63. return 0;
  64. }
  65. void kvm_setup_guest_memory(void *start, size_t size)
  66. {
  67. }
  68. int kvm_update_guest_debug(CPUState *env, unsigned long reinject_trap)
  69. {
  70. return -ENOSYS;
  71. }
  72. int kvm_insert_breakpoint(CPUState *current_env, target_ulong addr,
  73. target_ulong len, int type)
  74. {
  75. return -EINVAL;
  76. }
  77. int kvm_remove_breakpoint(CPUState *current_env, target_ulong addr,
  78. target_ulong len, int type)
  79. {
  80. return -EINVAL;
  81. }
  82. void kvm_remove_all_breakpoints(CPUState *current_env)
  83. {
  84. }
  85. #ifndef _WIN32
  86. int kvm_set_signal_mask(CPUState *env, const sigset_t *sigset)
  87. {
  88. abort();
  89. }
  90. #endif
  91. int kvm_set_ioeventfd_pio_word(int fd, uint16_t addr, uint16_t val, bool assign)
  92. {
  93. return -ENOSYS;
  94. }
  95. int kvm_set_ioeventfd_mmio_long(int fd, uint32_t adr, uint32_t val, bool assign)
  96. {
  97. return -ENOSYS;
  98. }
  99. int kvm_on_sigbus_vcpu(CPUState *env, int code, void *addr)
  100. {
  101. return 1;
  102. }
  103. int kvm_on_sigbus(int code, void *addr)
  104. {
  105. return 1;
  106. }