[Qemu-devel] [PATCH v2 1/6] cpus: Properly release the iothread lock when killing a dummy VCPU

David Hildenbrand posted 6 patches 6 years, 11 months ago
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Laurent Vivier <lvivier@redhat.com>, David Gibson <david@gibson.dropbear.id.au>, Richard Henderson <rth@twiddle.net>, Thomas Huth <thuth@redhat.com>
There is a newer version of this series
[Qemu-devel] [PATCH v2 1/6] cpus: Properly release the iothread lock when killing a dummy VCPU
Posted by David Hildenbrand 6 years, 11 months ago
This enables CPU unplug under qtest.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 cpus.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cpus.c b/cpus.c
index 154daf57dc..e83f72b48b 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1333,6 +1333,7 @@ static void *qemu_dummy_cpu_thread_fn(void *arg)
         qemu_wait_io_event(cpu);
     } while (!cpu->unplug);
 
+    qemu_mutex_unlock_iothread();
     rcu_unregister_thread();
     return NULL;
 #endif
-- 
2.17.2


Re: [Qemu-devel] [PATCH v2 1/6] cpus: Properly release the iothread lock when killing a dummy VCPU
Posted by Greg Kurz 6 years, 11 months ago
On Fri, 15 Feb 2019 14:30:00 +0100
David Hildenbrand <david@redhat.com> wrote:

> This enables CPU unplug under qtest.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---

Reviewed-by: Greg Kurz <groug@kaod.org>

>  cpus.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/cpus.c b/cpus.c
> index 154daf57dc..e83f72b48b 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -1333,6 +1333,7 @@ static void *qemu_dummy_cpu_thread_fn(void *arg)
>          qemu_wait_io_event(cpu);
>      } while (!cpu->unplug);
>  
> +    qemu_mutex_unlock_iothread();
>      rcu_unregister_thread();
>      return NULL;
>  #endif


Re: [Qemu-devel] [qemu-s390x] [PATCH v2 1/6] cpus: Properly release the iothread lock when killing a dummy VCPU
Posted by Thomas Huth 6 years, 11 months ago
On 15/02/2019 14.30, David Hildenbrand wrote:
> This enables CPU unplug under qtest.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  cpus.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/cpus.c b/cpus.c
> index 154daf57dc..e83f72b48b 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -1333,6 +1333,7 @@ static void *qemu_dummy_cpu_thread_fn(void *arg)
>          qemu_wait_io_event(cpu);
>      } while (!cpu->unplug);
>  
> +    qemu_mutex_unlock_iothread();
>      rcu_unregister_thread();
>      return NULL;
>  #endif

That's definitely a bug that you fix here.

Reviewed-by: Thomas Huth <thuth@redhat.com>

Re: [Qemu-devel] [PATCH v2 1/6] cpus: Properly release the iothread lock when killing a dummy VCPU
Posted by David Gibson 6 years, 11 months ago
On Fri, Feb 15, 2019 at 02:30:00PM +0100, David Hildenbrand wrote:
> This enables CPU unplug under qtest.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  cpus.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/cpus.c b/cpus.c
> index 154daf57dc..e83f72b48b 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -1333,6 +1333,7 @@ static void *qemu_dummy_cpu_thread_fn(void *arg)
>          qemu_wait_io_event(cpu);
>      } while (!cpu->unplug);
>  
> +    qemu_mutex_unlock_iothread();
>      rcu_unregister_thread();
>      return NULL;
>  #endif

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson