diff mbox

[RFC,3/7] kvm: Move some kvm-stub.c code to stubs/kvm.c

Message ID 1482255793-19057-4-git-send-email-ehabkost@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eduardo Habkost Dec. 20, 2016, 5:43 p.m. UTC
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(-)

Comments

David Hildenbrand Dec. 21, 2016, 8:42 a.m. UTC | #1
Am 20.12.2016 um 18:43 schrieb Eduardo Habkost:
> 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>

Reviewed-by: David Hildenbrand <david@redhat.com>

Guess we have to wait for an ack of paolo and christoffer.
diff mbox

Patch

diff --git a/kvm-stub.c b/kvm-stub.c
index b1b6b96..7ba697b 100644
--- a/kvm-stub.c
+++ b/kvm-stub.c
@@ -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;
diff --git a/stubs/kvm.c b/stubs/kvm.c
index ddd6204..9d491c1 100644
--- a/stubs/kvm.c
+++ b/stubs/kvm.c
@@ -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;