qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] iothread + smp 2 + alt-f4 = lock-up
@ 2010-02-08 13:40 Jan Kiszka
  2010-02-09 14:49 ` [Qemu-devel] [PATCH] iothread: fix vcpu stop with smp tcg Marcelo Tosatti
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2010-02-08 13:40 UTC (permalink / raw)
  To: qemu-devel

Just a note, maybe someone finds the time to look at this:

Sending ALT-F4 to the SDL window of qemu (stable-0.12 and master) when
it was configured with --enable-io-thread and runs -smp 2 or more causes
a lock-up of the qemu process.

[I currently trigger way too many bugs...]

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] [PATCH] iothread: fix vcpu stop with smp tcg
  2010-02-08 13:40 [Qemu-devel] iothread + smp 2 + alt-f4 = lock-up Jan Kiszka
@ 2010-02-09 14:49 ` Marcelo Tosatti
  2010-02-10 19:31   ` Anthony Liguori
  0 siblings, 1 reply; 3+ messages in thread
From: Marcelo Tosatti @ 2010-02-09 14:49 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel


Round robin vcpus in tcg_cpu_next even if the vm stopped. This
allows all cpus to enter stopped state.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

diff --git a/vl.c b/vl.c
index 880bcd5..f61e362 100644
--- a/vl.c
+++ b/vl.c
@@ -3855,14 +3855,15 @@ static void tcg_cpu_exec(void)
     for (; next_cpu != NULL; next_cpu = next_cpu->next_cpu) {
         CPUState *env = cur_cpu = next_cpu;
 
-        if (!vm_running)
-            break;
         if (timer_alarm_pending) {
             timer_alarm_pending = 0;
             break;
         }
         if (cpu_can_run(env))
             ret = qemu_cpu_exec(env);
+        else if (env->stop)
+            break;
+
         if (ret == EXCP_DEBUG) {
             gdb_set_stop_cpu(env);
             debug_requested = 1;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] iothread: fix vcpu stop with smp tcg
  2010-02-09 14:49 ` [Qemu-devel] [PATCH] iothread: fix vcpu stop with smp tcg Marcelo Tosatti
@ 2010-02-10 19:31   ` Anthony Liguori
  0 siblings, 0 replies; 3+ messages in thread
From: Anthony Liguori @ 2010-02-10 19:31 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Jan Kiszka, Anthony Liguori, qemu-devel

On 02/09/2010 08:49 AM, Marcelo Tosatti wrote:
> Round robin vcpus in tcg_cpu_next even if the vm stopped. This
> allows all cpus to enter stopped state.
>
> Signed-off-by: Marcelo Tosatti<mtosatti@redhat.com>
>    

Applied.  Thanks.

Regards,

Anthony Liguori
> diff --git a/vl.c b/vl.c
> index 880bcd5..f61e362 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3855,14 +3855,15 @@ static void tcg_cpu_exec(void)
>       for (; next_cpu != NULL; next_cpu = next_cpu->next_cpu) {
>           CPUState *env = cur_cpu = next_cpu;
>
> -        if (!vm_running)
> -            break;
>           if (timer_alarm_pending) {
>               timer_alarm_pending = 0;
>               break;
>           }
>           if (cpu_can_run(env))
>               ret = qemu_cpu_exec(env);
> +        else if (env->stop)
> +            break;
> +
>           if (ret == EXCP_DEBUG) {
>               gdb_set_stop_cpu(env);
>               debug_requested = 1;
>
>
>
>    

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-02-10 19:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-08 13:40 [Qemu-devel] iothread + smp 2 + alt-f4 = lock-up Jan Kiszka
2010-02-09 14:49 ` [Qemu-devel] [PATCH] iothread: fix vcpu stop with smp tcg Marcelo Tosatti
2010-02-10 19:31   ` 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).