>From 19a69e023bf4eeb02070c14576c1964af5feaa8d Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Mon, 14 Mar 2011 21:36:53 +0200 Subject: [PATCH 5/6] hw/qxl-render: add TODO's for cursor updated when server calls get_cursor_command, and we have an active ds cursor related callback in non vga mode, we need to lock to prevent the iothread (via sdl/vnc) from touching the ds as well. This is currently untested, since it requires running spice with sdl/vnc at the same time. It appears it will be broken unless we use the same pipe we pass QXL_SERVER_* stuff to (SET_IRQ and CREATE_UPDATE) atm. --- hw/qxl-render.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/qxl-render.c b/hw/qxl-render.c index 58965e0..643b924 100644 --- a/hw/qxl-render.c +++ b/hw/qxl-render.c @@ -209,6 +209,8 @@ void qxl_render_cursor(PCIQXLDevice *qxl, QXLCommandExt *ext) if (c == NULL) { c = cursor_builtin_left_ptr(); } + /* TODO LOCK: move to pipe via QXL_SERVER_CURSOR_SET? + * can this be fire and forget (i.e. can be async)? */ qemu_mutex_lock_iothread(); qxl->ssd.ds->cursor_define(c); qxl->ssd.ds->mouse_set(x, y, 1); @@ -218,6 +220,8 @@ void qxl_render_cursor(PCIQXLDevice *qxl, QXLCommandExt *ext) case QXL_CURSOR_MOVE: x = cmd->u.position.x; y = cmd->u.position.y; + /* TODO LOCK: move to pipe via QXL_SERVER_MOUSE_SET? + * can this be fire and forget (i.e. can be async)? */ qemu_mutex_lock_iothread(); qxl->ssd.ds->mouse_set(x, y, 1); qemu_mutex_unlock_iothread(); -- 1.7.4.1