* [Qemu-devel] [5669] KVM: simplify kvm_cpu_exec hook
@ 2008-11-10 15:55 Anthony Liguori
0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2008-11-10 15:55 UTC (permalink / raw)
To: qemu-devel
Revision: 5669
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5669
Author: aliguori
Date: 2008-11-10 15:55:14 +0000 (Mon, 10 Nov 2008)
Log Message:
-----------
KVM: simplify kvm_cpu_exec hook
We don't need to use cpu_loop_exit() because we never use the
condition codes so everything can be folded into a single case.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Modified Paths:
--------------
trunk/cpu-exec.c
trunk/kvm-all.c
Modified: trunk/cpu-exec.c
===================================================================
--- trunk/cpu-exec.c 2008-11-10 11:10:23 UTC (rev 5668)
+++ trunk/cpu-exec.c 2008-11-10 15:55:14 UTC (rev 5669)
@@ -369,16 +369,8 @@
#endif
if (kvm_enabled()) {
- int ret;
- ret = kvm_cpu_exec(env);
- if ((env->interrupt_request & CPU_INTERRUPT_EXIT)) {
- env->interrupt_request &= ~CPU_INTERRUPT_EXIT;
- env->exception_index = EXCP_INTERRUPT;
- cpu_loop_exit();
- } else if (env->halted) {
- cpu_loop_exit();
- } else
- longjmp(env->jmp_env, 1);
+ kvm_cpu_exec(env);
+ longjmp(env->jmp_env, 1);
}
next_tb = 0; /* force lookup of first TB */
Modified: trunk/kvm-all.c
===================================================================
--- trunk/kvm-all.c 2008-11-10 11:10:23 UTC (rev 5668)
+++ trunk/kvm-all.c 2008-11-10 15:55:14 UTC (rev 5669)
@@ -298,6 +298,11 @@
}
} while (ret > 0);
+ if ((env->interrupt_request & CPU_INTERRUPT_EXIT)) {
+ env->interrupt_request &= ~CPU_INTERRUPT_EXIT;
+ env->exception_index = EXCP_INTERRUPT;
+ }
+
return ret;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-11-10 15:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-10 15:55 [Qemu-devel] [5669] KVM: simplify kvm_cpu_exec hook Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).