[PATCH 01/18] Revert "kvm: Drop return value of kvm_cpu_exec"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>

This reverts commit e60806755e2b74a34813c73ec61c33d38d102286.
---
 kvm-all.c  |    6 ++++--
 kvm-stub.c |    4 ++--
 kvm.h      |    2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/kvm-all.c b/kvm-all.c
index a5e9246..4ab5f5c 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -817,7 +817,7 @@ void kvm_cpu_synchronize_post_init(CPUState *env)
     env->kvm_vcpu_dirty = 0;
 }
 
-void kvm_cpu_exec(CPUState *env)
+int kvm_cpu_exec(CPUState *env)
 {
     struct kvm_run *run = env->kvm_run;
     int ret;
@@ -906,7 +906,7 @@ void kvm_cpu_exec(CPUState *env)
 #ifdef KVM_CAP_SET_GUEST_DEBUG
             if (kvm_arch_debug(&run->debug.arch)) {
                 env->exception_index = EXCP_DEBUG;
-                return;
+                return 0;
             }
             /* re-enter, this exception was guest-internal */
             ret = 1;
@@ -928,6 +928,8 @@ void kvm_cpu_exec(CPUState *env)
         env->exit_request = 0;
         env->exception_index = EXCP_INTERRUPT;
     }
+
+    return ret;
 }
 
 int kvm_ioctl(int type, ...)
diff --git a/kvm-stub.c b/kvm-stub.c
index e00d7df..1fcfc1e 100644
--- a/kvm-stub.c
+++ b/kvm-stub.c
@@ -79,9 +79,9 @@ void kvm_cpu_synchronize_post_init(CPUState *env)
 {
 }
 
-void kvm_cpu_exec(CPUState *env)
+int kvm_cpu_exec(CPUState *env)
 {
-    abort();
+    abort ();
 }
 
 int kvm_has_sync_mmu(void)
diff --git a/kvm.h b/kvm.h
index 153d7b9..7bf9cc8 100644
--- a/kvm.h
+++ b/kvm.h
@@ -54,7 +54,7 @@ int kvm_has_xcrs(void);
 #ifdef NEED_CPU_H
 int kvm_init_vcpu(CPUState *env);
 
-void kvm_cpu_exec(CPUState *env);
+int kvm_cpu_exec(CPUState *env);
 
 #if !defined(CONFIG_USER_ONLY)
 int kvm_log_start(target_phys_addr_t phys_addr, ram_addr_t size);
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux