aboutsummaryrefslogtreecommitdiff
path: root/target-s390x/kvm.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-03-15 12:26:28 +0100
committerMarcelo Tosatti <mtosatti@redhat.com>2011-03-16 17:11:06 -0300
commitbb4ea39329d6c3de4c10034621781f703d095699 (patch)
tree9627e9893b96c6b3aba7f804484a08e584309ff6 /target-s390x/kvm.c
parentd73cd8f4ea1c2944bd16f7a1c445eaa25c9e6e26 (diff)
kvm: Align kvm_arch_handle_exit to kvm_cpu_exec changes
Make the return code of kvm_arch_handle_exit directly usable for kvm_cpu_exec. This is straightforward for x86 and ppc, just s390 would require more work. Avoid this for now by pushing the return code translation logic into s390's kvm_arch_handle_exit. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> CC: Alexander Graf <agraf@suse.de> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'target-s390x/kvm.c')
-rw-r--r--target-s390x/kvm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index a85ae0fc11..91232038ea 100644
--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -497,6 +497,11 @@ int kvm_arch_handle_exit(CPUState *env, struct kvm_run *run)
break;
}
+ if (ret == 0) {
+ ret = EXCP_INTERRUPT;
+ } else if (ret > 0) {
+ ret = 0;
+ }
return ret;
}