diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-02-06 10:21:12 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-02-06 10:21:12 +0000 |
commit | 26530780c20eb762fa0ed94ac57226695f22ee65 (patch) | |
tree | b44512a23fc5c67d01c5a53b9ece3215d35ef527 /hw | |
parent | 31db5b3638553e616eba3391dbff88f77b8a5bc9 (diff) | |
parent | 890911464934aebcb4409ad2495449d15d7347b4 (diff) |
Merge remote-tracking branch 'remotes/spice/tags/pull-spice-2' into staging
misc spice patches
# gpg: Signature made Mon 03 Feb 2014 15:05:29 GMT 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-2:
spice: hook qemu_chr_fe_set_open() event to ports
Add the ability to vary Spice playback and record rates, to facilitate Opus support.
hw/display/qxl: fix signed to unsigned comparison
qxl: clear irq on reset
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/display/qxl.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/hw/display/qxl.c b/hw/display/qxl.c index e4f172e3fb..334c2719f8 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -19,6 +19,7 @@ */ #include <zlib.h> +#include <stdint.h> #include "qemu-common.h" #include "qemu/timer.h" @@ -1126,6 +1127,7 @@ static void qxl_reset_state(PCIQXLDevice *d) d->num_free_res = 0; d->last_release = NULL; memset(&d->ssd.dirty, 0, sizeof(d->ssd.dirty)); + qxl_update_irq(d); } static void qxl_soft_reset(PCIQXLDevice *d) @@ -1360,14 +1362,16 @@ static void qxl_create_guest_primary(PCIQXLDevice *qxl, int loadvm, { QXLDevSurfaceCreate surface; QXLSurfaceCreate *sc = &qxl->guest_primary.surface; - int size; - int requested_height = le32_to_cpu(sc->height); + uint32_t requested_height = le32_to_cpu(sc->height); int requested_stride = le32_to_cpu(sc->stride); - size = abs(requested_stride) * requested_height; - if (size > qxl->vgamem_size) { - qxl_set_guest_bug(qxl, "%s: requested primary larger then framebuffer" - " size", __func__); + if (requested_stride == INT32_MIN || + abs(requested_stride) * (uint64_t)requested_height + > qxl->vgamem_size) { + qxl_set_guest_bug(qxl, "%s: requested primary larger than framebuffer" + " stride %d x height %" PRIu32 " > %" PRIu32, + __func__, requested_stride, requested_height, + qxl->vgamem_size); return; } |