* [Qemu-devel] [PULL 0/2] spice: 32bit support
@ 2012-03-22 13:40 Gerd Hoffmann
2012-03-22 13:40 ` [Qemu-devel] [PATCH 1/2] ui/spice-display.c: Fix compilation warnings on 32 bit hosts Gerd Hoffmann
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2012-03-22 13:40 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Hi,
This patch series fixes the remaining 32bit bugs in spice. With this
series merged and the latest spice-server bits (from git, no release
yet) spice works on 32bit hosts too.
please pull,
Gerd
The following changes since commit 33cf629a3754b58a1e2dbbe01d91d97e712b7c06:
Merge remote-tracking branch 'sstabellini/saverestore-8' into staging (2012-03-19 13:39:42 -0500)
are available in the git repository at:
git://anongit.freedesktop.org/spice/qemu spice.v51
Alon Levy (1):
ui/spice-display: use uintptr_t when casting qxl physical addresses
Peter Maydell (1):
ui/spice-display.c: Fix compilation warnings on 32 bit hosts
ui/spice-display.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 1/2] ui/spice-display.c: Fix compilation warnings on 32 bit hosts
2012-03-22 13:40 [Qemu-devel] [PULL 0/2] spice: 32bit support Gerd Hoffmann
@ 2012-03-22 13:40 ` Gerd Hoffmann
2012-03-22 13:40 ` [Qemu-devel] [PATCH 2/2] ui/spice-display: use uintptr_t when casting qxl physical addresses Gerd Hoffmann
2012-03-26 21:10 ` [Qemu-devel] [PULL 0/2] spice: 32bit support Anthony Liguori
2 siblings, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2012-03-22 13:40 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Gerd Hoffmann
From: Peter Maydell <peter.maydell@linaro.org>
Fix compilation failures ("cast from pointer to integer of
different size [-Werror=pointer-to-int-cast]") by using
uintptr_t instead.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/spice-display.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 28d6d4a..6d7563f 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -80,8 +80,8 @@ void qemu_spice_add_memslot(SimpleSpiceDisplay *ssd, QXLDevMemSlot *memslot,
if (async != QXL_SYNC) {
spice_qxl_add_memslot_async(&ssd->qxl, memslot,
- (uint64_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO,
- QXL_IO_MEMSLOT_ADD_ASYNC));
+ (uintptr_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO,
+ QXL_IO_MEMSLOT_ADD_ASYNC));
} else {
ssd->worker->add_memslot(ssd->worker, memslot);
}
@@ -100,8 +100,8 @@ void qemu_spice_create_primary_surface(SimpleSpiceDisplay *ssd, uint32_t id,
trace_qemu_spice_create_primary_surface(ssd->qxl.id, id, surface, async);
if (async != QXL_SYNC) {
spice_qxl_create_primary_surface_async(&ssd->qxl, id, surface,
- (uint64_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO,
- QXL_IO_CREATE_PRIMARY_ASYNC));
+ (uintptr_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO,
+ QXL_IO_CREATE_PRIMARY_ASYNC));
} else {
ssd->worker->create_primary_surface(ssd->worker, id, surface);
}
@@ -113,8 +113,8 @@ void qemu_spice_destroy_primary_surface(SimpleSpiceDisplay *ssd,
trace_qemu_spice_destroy_primary_surface(ssd->qxl.id, id, async);
if (async != QXL_SYNC) {
spice_qxl_destroy_primary_surface_async(&ssd->qxl, id,
- (uint64_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO,
- QXL_IO_DESTROY_PRIMARY_ASYNC));
+ (uintptr_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO,
+ QXL_IO_DESTROY_PRIMARY_ASYNC));
} else {
ssd->worker->destroy_primary_surface(ssd->worker, id);
}
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 2/2] ui/spice-display: use uintptr_t when casting qxl physical addresses
2012-03-22 13:40 [Qemu-devel] [PULL 0/2] spice: 32bit support Gerd Hoffmann
2012-03-22 13:40 ` [Qemu-devel] [PATCH 1/2] ui/spice-display.c: Fix compilation warnings on 32 bit hosts Gerd Hoffmann
@ 2012-03-22 13:40 ` Gerd Hoffmann
2012-03-26 21:10 ` [Qemu-devel] [PULL 0/2] spice: 32bit support Anthony Liguori
2 siblings, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2012-03-22 13:40 UTC (permalink / raw)
To: qemu-devel; +Cc: Alon Levy, Gerd Hoffmann
From: Alon Levy <alevy@redhat.com>
The current intptr_t casts are a problem when the address's highest
bit is 1, and it is cast to a intptr_t and then to uint64_t, such
as at:
surface.mem = (intptr_t)ssd->buf;
This causes the sign bit to be extended which causes a wrong address to
be passed on to spice, which then complains when it gets the wrong
slot_id number, since the slot_id is taken from the higher bits.
The assertion happens early - during the first primary surface creation.
This fixes running "-vga qxl -spice" with 32 bit compiled
qemu-system-i386.
Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/spice-display.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 6d7563f..cb8a7ad 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -168,7 +168,7 @@ static SimpleSpiceUpdate *qemu_spice_create_update(SimpleSpiceDisplay *ssd)
drawable->bbox = ssd->dirty;
drawable->clip.type = SPICE_CLIP_TYPE_NONE;
drawable->effect = QXL_EFFECT_OPAQUE;
- drawable->release_info.id = (intptr_t)update;
+ drawable->release_info.id = (uintptr_t)update;
drawable->type = QXL_DRAW_COPY;
drawable->surfaces_dest[0] = -1;
drawable->surfaces_dest[1] = -1;
@@ -179,7 +179,7 @@ static SimpleSpiceUpdate *qemu_spice_create_update(SimpleSpiceDisplay *ssd)
+ time_space.tv_nsec / 1000 / 1000;
drawable->u.copy.rop_descriptor = SPICE_ROPD_OP_PUT;
- drawable->u.copy.src_bitmap = (intptr_t)image;
+ drawable->u.copy.src_bitmap = (uintptr_t)image;
drawable->u.copy.src_area.right = bw;
drawable->u.copy.src_area.bottom = bh;
@@ -189,7 +189,7 @@ static SimpleSpiceUpdate *qemu_spice_create_update(SimpleSpiceDisplay *ssd)
image->bitmap.stride = bw * 4;
image->descriptor.width = image->bitmap.x = bw;
image->descriptor.height = image->bitmap.y = bh;
- image->bitmap.data = (intptr_t)(update->bitmap);
+ image->bitmap.data = (uintptr_t)(update->bitmap);
image->bitmap.palette = 0;
image->bitmap.format = SPICE_BITMAP_FMT_32BIT;
@@ -210,7 +210,7 @@ static SimpleSpiceUpdate *qemu_spice_create_update(SimpleSpiceDisplay *ssd)
}
cmd->type = QXL_CMD_DRAW;
- cmd->data = (intptr_t)drawable;
+ cmd->data = (uintptr_t)drawable;
memset(&ssd->dirty, 0, sizeof(ssd->dirty));
return update;
@@ -254,7 +254,7 @@ void qemu_spice_create_host_primary(SimpleSpiceDisplay *ssd)
surface.mouse_mode = true;
surface.flags = 0;
surface.type = 0;
- surface.mem = (intptr_t)ssd->buf;
+ surface.mem = (uintptr_t)ssd->buf;
surface.group_id = MEMSLOT_GROUP_HOST;
qemu_spice_create_primary_surface(ssd, 0, &surface, QXL_SYNC);
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] spice: 32bit support
2012-03-22 13:40 [Qemu-devel] [PULL 0/2] spice: 32bit support Gerd Hoffmann
2012-03-22 13:40 ` [Qemu-devel] [PATCH 1/2] ui/spice-display.c: Fix compilation warnings on 32 bit hosts Gerd Hoffmann
2012-03-22 13:40 ` [Qemu-devel] [PATCH 2/2] ui/spice-display: use uintptr_t when casting qxl physical addresses Gerd Hoffmann
@ 2012-03-26 21:10 ` Anthony Liguori
2 siblings, 0 replies; 4+ messages in thread
From: Anthony Liguori @ 2012-03-26 21:10 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
On 03/22/2012 08:40 AM, Gerd Hoffmann wrote:
> Hi,
>
> This patch series fixes the remaining 32bit bugs in spice. With this
> series merged and the latest spice-server bits (from git, no release
> yet) spice works on 32bit hosts too.
>
> please pull,
> Gerd
Pulled. Thanks.
Regards,
Anthony Liguori
>
> The following changes since commit 33cf629a3754b58a1e2dbbe01d91d97e712b7c06:
>
> Merge remote-tracking branch 'sstabellini/saverestore-8' into staging (2012-03-19 13:39:42 -0500)
>
> are available in the git repository at:
>
> git://anongit.freedesktop.org/spice/qemu spice.v51
>
> Alon Levy (1):
> ui/spice-display: use uintptr_t when casting qxl physical addresses
>
> Peter Maydell (1):
> ui/spice-display.c: Fix compilation warnings on 32 bit hosts
>
> ui/spice-display.c | 22 +++++++++++-----------
> 1 files changed, 11 insertions(+), 11 deletions(-)
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-26 21:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-22 13:40 [Qemu-devel] [PULL 0/2] spice: 32bit support Gerd Hoffmann
2012-03-22 13:40 ` [Qemu-devel] [PATCH 1/2] ui/spice-display.c: Fix compilation warnings on 32 bit hosts Gerd Hoffmann
2012-03-22 13:40 ` [Qemu-devel] [PATCH 2/2] ui/spice-display: use uintptr_t when casting qxl physical addresses Gerd Hoffmann
2012-03-26 21:10 ` [Qemu-devel] [PULL 0/2] spice: 32bit support Anthony Liguori
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.