qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/qxl: another missing unlock
@ 2011-01-25 14:42 Alon Levy
  2011-01-27  8:17 ` Gerd Hoffmann
  0 siblings, 1 reply; 2+ messages in thread
From: Alon Levy @ 2011-01-25 14:42 UTC (permalink / raw)
  To: qemu-devel

We need to unlock the mutex before waiting on read via
the worker call since the worker will try to lock and hang
otherwise.

Signed-off-by: Alon Levy <alevy@redhat.com>
---
 hw/qxl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/hw/qxl.c b/hw/qxl.c
index 117f7c8..00c31c7 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -791,7 +791,9 @@ static void qxl_add_memslot(PCIQXLDevice *d, uint32_t slot_id, uint64_t delta)
            __FUNCTION__, memslot.slot_id,
            memslot.virt_start, memslot.virt_end);
 
+    qxl_unlock_iothread(&d->ssd);
     d->ssd.worker->add_memslot(d->ssd.worker, &memslot);
+    qxl_lock_iothread(&d->ssd);
     d->guest_slots[slot_id].ptr = (void*)memslot.virt_start;
     d->guest_slots[slot_id].size = memslot.virt_end - memslot.virt_start;
     d->guest_slots[slot_id].delta = delta;
-- 
1.7.3.5

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

* Re: [Qemu-devel] [PATCH] hw/qxl: another missing unlock
  2011-01-25 14:42 [Qemu-devel] [PATCH] hw/qxl: another missing unlock Alon Levy
@ 2011-01-27  8:17 ` Gerd Hoffmann
  0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2011-01-27  8:17 UTC (permalink / raw)
  To: Alon Levy; +Cc: qemu-devel

On 01/25/11 15:42, Alon Levy wrote:
> We need to unlock the mutex before waiting on read via
> the worker call since the worker will try to lock and hang
> otherwise.
>
> Signed-off-by: Alon Levy<alevy@redhat.com>
> ---
>   hw/qxl.c |    2 ++
>   1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/hw/qxl.c b/hw/qxl.c
> index 117f7c8..00c31c7 100644
> --- a/hw/qxl.c
> +++ b/hw/qxl.c
> @@ -791,7 +791,9 @@ static void qxl_add_memslot(PCIQXLDevice *d, uint32_t slot_id, uint64_t delta)
>              __FUNCTION__, memslot.slot_id,
>              memslot.virt_start, memslot.virt_end);
>
> +    qxl_unlock_iothread(&d->ssd);
>       d->ssd.worker->add_memslot(d->ssd.worker,&memslot);
> +    qxl_lock_iothread(&d->ssd);
>       d->guest_slots[slot_id].ptr = (void*)memslot.virt_start;
>       d->guest_slots[slot_id].size = memslot.virt_end - memslot.virt_start;
>       d->guest_slots[slot_id].delta = delta;

added to spice patch queue

thanks,
   Gerd

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

end of thread, other threads:[~2011-01-27  8:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-25 14:42 [Qemu-devel] [PATCH] hw/qxl: another missing unlock Alon Levy
2011-01-27  8:17 ` Gerd Hoffmann

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).