aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-05-27 02:07:49 +0200
committerAndreas Färber <afaerber@suse.de>2013-06-28 13:25:13 +0200
commit913250464f5ea5799d71ab033b51d1bf8ed84343 (patch)
tree5d536b722ce1badc9e13e5e81c7fd39169d1493a
parent64f6b3469d5983141707dfc5ec2e8f5f60af1ba0 (diff)
cpus: Change cpu_handle_guest_debug() argument to CPUState
CPUArchState is no longer needed. Prepares for changing qemu_kvm_cpu_thread_fn() opaque to CPUState. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
-rw-r--r--cpus.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/cpus.c b/cpus.c
index 54accede3a..6016891d41 100644
--- a/cpus.c
+++ b/cpus.c
@@ -459,10 +459,8 @@ static bool cpu_can_run(CPUState *cpu)
return true;
}
-static void cpu_handle_guest_debug(CPUArchState *env)
+static void cpu_handle_guest_debug(CPUState *cpu)
{
- CPUState *cpu = ENV_GET_CPU(env);
-
gdb_set_stop_cpu(cpu);
qemu_system_debug_request();
cpu->stopped = true;
@@ -754,7 +752,7 @@ static void *qemu_kvm_cpu_thread_fn(void *arg)
if (cpu_can_run(cpu)) {
r = kvm_cpu_exec(cpu);
if (r == EXCP_DEBUG) {
- cpu_handle_guest_debug(env);
+ cpu_handle_guest_debug(cpu);
}
}
qemu_kvm_wait_io_event(cpu);
@@ -1172,7 +1170,7 @@ static void tcg_exec_all(void)
if (cpu_can_run(cpu)) {
r = tcg_cpu_exec(env);
if (r == EXCP_DEBUG) {
- cpu_handle_guest_debug(env);
+ cpu_handle_guest_debug(cpu);
break;
}
} else if (cpu->stop || cpu->stopped) {