From: Alon Levy <alevy@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [RFC] hw/qxl: three more unlocks
Date: Thu, 27 Jan 2011 14:41:24 +0200 [thread overview]
Message-ID: <1296132084-24764-1-git-send-email-alevy@redhat.com> (raw)
---
Basically, anything that does a:
kvm_main_cpu
io exit
write to red_worker pipe
wait on read from red_worker pipe
should relingquish the lock during that wait, no?
Anyway, I had a lockup, saw it was in this situation with gdb, didn't record
which function exactly, and it was solved by adding these three locks (so one
of them helped..)
hw/qxl.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/hw/qxl.c b/hw/qxl.c
index 00c31c7..6ebb634 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -803,14 +803,18 @@ static void qxl_add_memslot(PCIQXLDevice *d, uint32_t slot_id, uint64_t delta)
static void qxl_del_memslot(PCIQXLDevice *d, uint32_t slot_id)
{
dprint(d, 1, "%s: slot %d\n", __FUNCTION__, slot_id);
+ qxl_unlock_iothread(&d->ssd);
d->ssd.worker->del_memslot(d->ssd.worker, MEMSLOT_GROUP_HOST, slot_id);
+ qxl_lock_iothread(&d->ssd);
d->guest_slots[slot_id].active = 0;
}
static void qxl_reset_memslots(PCIQXLDevice *d)
{
dprint(d, 1, "%s:\n", __FUNCTION__);
+ qxl_unlock_iothread(&d->ssd);
d->ssd.worker->reset_memslots(d->ssd.worker);
+ qxl_lock_iothread(&d->ssd);
memset(&d->guest_slots, 0, sizeof(d->guest_slots));
}
@@ -874,7 +878,9 @@ static void qxl_create_guest_primary(PCIQXLDevice *qxl, int loadvm)
qxl->mode = QXL_MODE_NATIVE;
qxl->cmdflags = 0;
+ qxl_unlock_iothread(&qxl->ssd);
qxl->ssd.worker->create_primary_surface(qxl->ssd.worker, 0, &surface);
+ qxl_lock_iothread(&qxl->ssd);
/* for local rendering */
qxl_render_resize(qxl);
--
1.7.3.5
reply other threads:[~2011-01-27 12:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1296132084-24764-1-git-send-email-alevy@redhat.com \
--to=alevy@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).