* [Qemu-devel] [PULL 0/2] spice patch queue
@ 2015-06-11 7:52 Gerd Hoffmann
2015-06-11 7:52 ` [Qemu-devel] [PULL 1/2] spice-display: fix segfault in qemu_spice_create_update Gerd Hoffmann
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2015-06-11 7:52 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Hi,
Here comes the small spice patch queue with only two patches,
one of them fixing a segfault though.
please pull,
Gerd
The following changes since commit 0e12e61ff9a3407d123d0dbc4d945aec98d60fdf:
Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20150610-1' into staging (2015-06-10 18:13:58 +0100)
are available in the git repository at:
git://anongit.freedesktop.org/spice/qemu tags/pull-spice-20150611-1
for you to fetch changes up to 5a9259a0b5d6f9424f94539cd9c715b1d166d90c:
spice: ui_info tweaks (2015-06-11 09:06:14 +0200)
----------------------------------------------------------------
spice: fix segfault in qemu_spice_create_update, ui_info tweaks.
----------------------------------------------------------------
Gerd Hoffmann (2):
spice-display: fix segfault in qemu_spice_create_update
spice: ui_info tweaks
ui/spice-display.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL 1/2] spice-display: fix segfault in qemu_spice_create_update
2015-06-11 7:52 [Qemu-devel] [PULL 0/2] spice patch queue Gerd Hoffmann
@ 2015-06-11 7:52 ` Gerd Hoffmann
2015-06-11 7:53 ` [Qemu-devel] [PULL 2/2] spice: ui_info tweaks Gerd Hoffmann
2015-06-11 12:03 ` [Qemu-devel] [PULL 0/2] spice patch queue Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2015-06-11 7:52 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, qemu-stable
Although it is pretty unusual the stride for the guest image and the
mirror image maintained by spice-display can be different. So use
separate variables for them.
https://bugzilla.redhat.com/show_bug.cgi?id=1163047
Cc: qemu-stable@nongnu.org
Reported-by: perrier vincent <clownix@clownix.net>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/spice-display.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 9c63132..4e6356a 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -199,7 +199,7 @@ static void qemu_spice_create_update(SimpleSpiceDisplay *ssd)
static const int blksize = 32;
int blocks = (surface_width(ssd->ds) + blksize - 1) / blksize;
int dirty_top[blocks];
- int y, yoff, x, xoff, blk, bw;
+ int y, yoff1, yoff2, x, xoff, blk, bw;
int bpp = surface_bytes_per_pixel(ssd->ds);
uint8_t *guest, *mirror;
@@ -214,13 +214,14 @@ static void qemu_spice_create_update(SimpleSpiceDisplay *ssd)
guest = surface_data(ssd->ds);
mirror = (void *)pixman_image_get_data(ssd->mirror);
for (y = ssd->dirty.top; y < ssd->dirty.bottom; y++) {
- yoff = y * surface_stride(ssd->ds);
+ yoff1 = y * surface_stride(ssd->ds);
+ yoff2 = y * pixman_image_get_stride(ssd->mirror);
for (x = ssd->dirty.left; x < ssd->dirty.right; x += blksize) {
xoff = x * bpp;
blk = x / blksize;
bw = MIN(blksize, ssd->dirty.right - x);
- if (memcmp(guest + yoff + xoff,
- mirror + yoff + xoff,
+ if (memcmp(guest + yoff1 + xoff,
+ mirror + yoff2 + xoff,
bw * bpp) == 0) {
if (dirty_top[blk] != -1) {
QXLRect update = {
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL 2/2] spice: ui_info tweaks
2015-06-11 7:52 [Qemu-devel] [PULL 0/2] spice patch queue Gerd Hoffmann
2015-06-11 7:52 ` [Qemu-devel] [PULL 1/2] spice-display: fix segfault in qemu_spice_create_update Gerd Hoffmann
@ 2015-06-11 7:53 ` Gerd Hoffmann
2015-06-11 12:03 ` [Qemu-devel] [PULL 0/2] spice patch queue Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2015-06-11 7:53 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Use the new dpy_ui_info_supported function.
Clarifies the control flow.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/spice-display.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 4e6356a..cc4a6ce 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -661,7 +661,10 @@ static int interface_client_monitors_config(QXLInstance *sin,
{
SimpleSpiceDisplay *ssd = container_of(sin, SimpleSpiceDisplay, qxl);
QemuUIInfo info;
- int rc;
+
+ if (!dpy_ui_info_supported(ssd->dcl.con)) {
+ return 0; /* == not supported by guest */
+ }
if (!mc) {
return 1;
@@ -676,14 +679,10 @@ static int interface_client_monitors_config(QXLInstance *sin,
info.width = mc->monitors[0].width;
info.height = mc->monitors[0].height;
}
- rc = dpy_set_ui_info(ssd->dcl.con, &info);
- dprint(1, "%s/%d: size %dx%d, rc %d <--- ==========================\n",
- __func__, ssd->qxl.id, info.width, info.height, rc);
- if (rc != 0) {
- return 0; /* == not supported by guest */
- } else {
- return 1;
- }
+ dpy_set_ui_info(ssd->dcl.con, &info);
+ dprint(1, "%s/%d: size %dx%d\n", __func__, ssd->qxl.id,
+ info.width, info.height);
+ return 1;
}
static const QXLInterface dpy_interface = {
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] spice patch queue
2015-06-11 7:52 [Qemu-devel] [PULL 0/2] spice patch queue Gerd Hoffmann
2015-06-11 7:52 ` [Qemu-devel] [PULL 1/2] spice-display: fix segfault in qemu_spice_create_update Gerd Hoffmann
2015-06-11 7:53 ` [Qemu-devel] [PULL 2/2] spice: ui_info tweaks Gerd Hoffmann
@ 2015-06-11 12:03 ` Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2015-06-11 12:03 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: QEMU Developers
On 11 June 2015 at 08:52, Gerd Hoffmann <kraxel@redhat.com> wrote:
> Hi,
>
> Here comes the small spice patch queue with only two patches,
> one of them fixing a segfault though.
>
> please pull,
> Gerd
>
> The following changes since commit 0e12e61ff9a3407d123d0dbc4d945aec98d60fdf:
>
> Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20150610-1' into staging (2015-06-10 18:13:58 +0100)
>
> are available in the git repository at:
>
>
> git://anongit.freedesktop.org/spice/qemu tags/pull-spice-20150611-1
>
> for you to fetch changes up to 5a9259a0b5d6f9424f94539cd9c715b1d166d90c:
>
> spice: ui_info tweaks (2015-06-11 09:06:14 +0200)
>
> ----------------------------------------------------------------
> spice: fix segfault in qemu_spice_create_update, ui_info tweaks.
>
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-06-11 12:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-11 7:52 [Qemu-devel] [PULL 0/2] spice patch queue Gerd Hoffmann
2015-06-11 7:52 ` [Qemu-devel] [PULL 1/2] spice-display: fix segfault in qemu_spice_create_update Gerd Hoffmann
2015-06-11 7:53 ` [Qemu-devel] [PULL 2/2] spice: ui_info tweaks Gerd Hoffmann
2015-06-11 12:03 ` [Qemu-devel] [PULL 0/2] spice patch queue Peter Maydell
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).