@@ -19,61 +19,10 @@
#include "hw/pci/msi.h"
#endif
-KVMState *kvm_state;
-bool kvm_kernel_irqchip;
-bool kvm_async_interrupts_allowed;
-bool kvm_eventfds_allowed;
-bool kvm_irqfds_allowed;
-bool kvm_resamplefds_allowed;
-bool kvm_msi_via_irqfd_allowed;
-bool kvm_gsi_routing_allowed;
-bool kvm_gsi_direct_mapping;
-bool kvm_allowed;
-bool kvm_readonly_mem_allowed;
-bool kvm_ioeventfd_any_length_allowed;
-bool kvm_msi_use_devid;
-
-int kvm_destroy_vcpu(CPUState *cpu)
-{
- return -ENOSYS;
-}
-
-int kvm_init_vcpu(CPUState *cpu)
-{
- return -ENOSYS;
-}
-
void kvm_flush_coalesced_mmio_buffer(void)
{
}
-void kvm_cpu_synchronize_state(CPUState *cpu)
-{
-}
-
-void kvm_cpu_synchronize_post_reset(CPUState *cpu)
-{
-}
-
-void kvm_cpu_synchronize_post_init(CPUState *cpu)
-{
-}
-
-int kvm_cpu_exec(CPUState *cpu)
-{
- abort();
-}
-
-int kvm_has_sync_mmu(void)
-{
- return 0;
-}
-
-int kvm_has_many_ioeventfds(void)
-{
- return 0;
-}
-
int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap)
{
return -ENOSYS;
@@ -1,7 +1,72 @@
+/*
+ * QEMU KVM stub
+ *
+ * Copyright Red Hat, Inc. 2010
+ *
+ * Authors:
+ * Christoffer Dall <christoffer.dall@linaro.org>
+ * Paolo Bonzini <pbonzini@redhat.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "sysemu/kvm.h"
+KVMState *kvm_state;
+bool kvm_kernel_irqchip;
+bool kvm_async_interrupts_allowed;
+bool kvm_eventfds_allowed;
+bool kvm_irqfds_allowed;
+bool kvm_resamplefds_allowed;
+bool kvm_msi_via_irqfd_allowed;
+bool kvm_gsi_routing_allowed;
+bool kvm_gsi_direct_mapping;
+bool kvm_allowed;
+bool kvm_readonly_mem_allowed;
+bool kvm_ioeventfd_any_length_allowed;
+bool kvm_msi_use_devid;
+
+int kvm_destroy_vcpu(CPUState *cpu)
+{
+ return -ENOSYS;
+}
+
+int kvm_init_vcpu(CPUState *cpu)
+{
+ return -ENOSYS;
+}
+
+void kvm_cpu_synchronize_state(CPUState *cpu)
+{
+}
+
+void kvm_cpu_synchronize_post_reset(CPUState *cpu)
+{
+}
+
+void kvm_cpu_synchronize_post_init(CPUState *cpu)
+{
+}
+
+int kvm_cpu_exec(CPUState *cpu)
+{
+ abort();
+}
+
+int kvm_has_sync_mmu(void)
+{
+ return 0;
+}
+
+int kvm_has_many_ioeventfds(void)
+{
+ return 0;
+}
+
int kvm_arch_irqchip_create(MachineState *ms, KVMState *s)
{
return 0;
Move the kvm-stub.c code that doesn't depend on cpu.h or CONFIG_* defines to stubs/kvm.c. Notes about copyright, licensing, and authorship: * There was no copyright not on the original stubs/kvm.c file. * As include/sysemu/kvm.h and kvm-all.c are licensed as GPLv2+, I am assuming stubs/kvm.c file is also licensed as GPLv2+. * I have copied the copyright info from kvm-stub.c and added the original author of stubs/kvm.c (Christoffer Dall) to the author list. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: kvm@vger.kernel.org Cc: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- kvm-stub.c | 51 ------------------------------------------------ stubs/kvm.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 51 deletions(-)