summaryrefslogtreecommitdiff
path: root/cpu-exec.c
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2011-02-16 18:04:44 -0200
committerMarcelo Tosatti <mtosatti@redhat.com>2011-02-16 18:04:44 -0200
commit901ec66b7c935e70893b9d15bdb923fe92132e41 (patch)
tree87fb3928643033d18db3eaae26cca503d8df174b /cpu-exec.c
parent9d999a00977c1492a982097896f609034c14b0a3 (diff)
parent7a39fe588251ba042c91bf23d53b0ba820bf964c (diff)
Merge commit '7a39fe588251ba042c91bf23d53b0ba820bf964c' into upstream-merge
* commit '7a39fe588251ba042c91bf23d53b0ba820bf964c': kvm: Drop return values from kvm_arch_pre/post_run kvm: x86: Prepare VCPU loop for in-kernel irqchip kvm: Separate TCG from KVM cpu execution Move debug exception handling out of cpu_exec Conflicts: kvm.h Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'cpu-exec.c')
-rw-r--r--cpu-exec.c43
1 files changed, 6 insertions, 37 deletions
diff --git a/cpu-exec.c b/cpu-exec.c
index 27b6a7ce3..40e372642 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -200,28 +200,6 @@ static inline TranslationBlock *tb_find_fast(void)
return tb;
}
-static CPUDebugExcpHandler *debug_excp_handler;
-
-CPUDebugExcpHandler *cpu_set_debug_excp_handler(CPUDebugExcpHandler *handler)
-{
- CPUDebugExcpHandler *old_handler = debug_excp_handler;
-
- debug_excp_handler = handler;
- return old_handler;
-}
-
-static void cpu_handle_debug_exception(CPUState *env)
-{
- CPUWatchpoint *wp;
-
- if (!env->watchpoint_hit)
- QTAILQ_FOREACH(wp, &env->watchpoints, entry)
- wp->flags &= ~BP_WATCHPOINT_HIT;
-
- if (debug_excp_handler)
- debug_excp_handler(env);
-}
-
/* main execution loop */
volatile sig_atomic_t exit_request;
@@ -252,13 +230,11 @@ int cpu_exec(CPUState *env1)
}
#if defined(TARGET_I386)
- if (!kvm_enabled()) {
- /* put eflags in CPU temporary format */
- CC_SRC = env->eflags & (CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C);
- DF = 1 - (2 * ((env->eflags >> 10) & 1));
- CC_OP = CC_OP_EFLAGS;
- env->eflags &= ~(DF_MASK | CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C);
- }
+ /* put eflags in CPU temporary format */
+ CC_SRC = env->eflags & (CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C);
+ DF = 1 - (2 * ((env->eflags >> 10) & 1));
+ CC_OP = CC_OP_EFLAGS;
+ env->eflags &= ~(DF_MASK | CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C);
#elif defined(TARGET_SPARC)
#elif defined(TARGET_M68K)
env->cc_op = CC_OP_FLAGS;
@@ -284,7 +260,7 @@ int cpu_exec(CPUState *env1)
if (setjmp(env->jmp_env) == 0) {
#if defined(__sparc__) && !defined(CONFIG_SOLARIS)
#undef env
- env = cpu_single_env;
+ env = cpu_single_env;
#define env cpu_single_env
#endif
/* if an exception is pending, we execute it here */
@@ -292,8 +268,6 @@ int cpu_exec(CPUState *env1)
if (env->exception_index >= EXCP_INTERRUPT) {
/* exit request from the cpu execution loop */
ret = env->exception_index;
- if (ret == EXCP_DEBUG)
- cpu_handle_debug_exception(env);
break;
} else {
#if defined(CONFIG_USER_ONLY)
@@ -347,11 +321,6 @@ int cpu_exec(CPUState *env1)
}
}
- if (kvm_enabled()) {
- kvm_cpu_exec(env);
- longjmp(env->jmp_env, 1);
- }
-
next_tb = 0; /* force lookup of first TB */
for(;;) {
interrupt_request = env->interrupt_request;