diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-06-13 15:15:31 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-06-13 15:15:31 +0100 |
commit | 592fb17691e03606ad16e36a4d52d1818721f4cd (patch) | |
tree | 3f1199c8b85eabf632de79263ef36b71117629a0 /hw | |
parent | 7d5bef0873abdc336c7e9f4e2ddbf30f7348342e (diff) | |
parent | 788fbf042fc6d5aaeab56757e6dad622ac5f0c21 (diff) |
Merge remote-tracking branch 'remotes/spice/tags/pull-spice-20140613-1' into staging
spice: add mouse cursor support
qxl-render: add sanity check
# gpg: Signature made Fri 13 Jun 2014 12:22:45 BST using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
* remotes/spice/tags/pull-spice-20140613-1:
qxl-render: add sanity check
spice: add mouse cursor support
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/display/qxl-render.c | 6 | ||||
-rw-r--r-- | hw/display/qxl.c | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c index 84f1367716..cc2c2b1dbc 100644 --- a/hw/display/qxl-render.c +++ b/hw/display/qxl-render.c @@ -138,6 +138,12 @@ static void qxl_render_update_area_unlocked(PCIQXLDevice *qxl) if (qemu_spice_rect_is_empty(qxl->dirty+i)) { break; } + if (qxl->dirty[i].left > qxl->dirty[i].right || + qxl->dirty[i].top > qxl->dirty[i].bottom || + qxl->dirty[i].right > qxl->guest_primary.surface.width || + qxl->dirty[i].bottom > qxl->guest_primary.surface.height) { + continue; + } qxl_blit(qxl, qxl->dirty+i); dpy_gfx_update(vga->con, qxl->dirty[i].left, qxl->dirty[i].top, diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 7fb83e4eaf..736fd3c4e2 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -710,7 +710,11 @@ static void interface_release_resource(QXLInstance *sin, if (ext.group_id == MEMSLOT_GROUP_HOST) { /* host group -> vga mode update request */ - qemu_spice_destroy_update(&qxl->ssd, (void *)(intptr_t)ext.info->id); + QXLCommandExt *cmdext = (void *)(ext.info->id); + SimpleSpiceUpdate *update; + g_assert(cmdext->cmd.type == QXL_CMD_DRAW); + update = container_of(cmdext, SimpleSpiceUpdate, ext); + qemu_spice_destroy_update(&qxl->ssd, update); return; } |