summaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2010-06-21 12:01:52 +0300
committerAvi Kivity <avi@redhat.com>2010-06-23 11:22:00 +0300
commit92af0ed74e86e6f0867df53763d3af05005db73b (patch)
treee27a25f3a874b9644bb670c43f7070d1739d8c5f /vl.c
parent01718e3d95e07e111cd3335928475a1ce2fbe430 (diff)
do not enter vcpu again if it was stopped during IO
To prevent reentering vcpu after IO completion it is not enough to set env->stopped since it is checked only in main loop but control will not get there until next non-IO exit since kvm_run() will reenter vcpu to complete IO instruction. Solve this by sending self-signal to request exit after IO instruction completion. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index c2e99fc21..625671b83 100644
--- a/vl.c
+++ b/vl.c
@@ -1222,6 +1222,7 @@ void qemu_system_reset_request(void)
}
if (cpu_single_env) {
cpu_single_env->stopped = 1;
+ cpu_exit(cpu_single_env);
}
qemu_notify_event();
}