2012-12-16 23:27:22 +00:00
|
|
|
From d03ab137143aeae21ab7bb4e8cab72e1f49b8309 Mon Sep 17 00:00:00 2001
|
2012-11-01 10:46:02 +00:00
|
|
|
From: Alon Levy <alevy@redhat.com>
|
|
|
|
Date: Sun, 7 Oct 2012 17:03:35 +0200
|
2012-12-16 23:27:22 +00:00
|
|
|
Subject: [PATCH] hw/qxl: qxl_dirty_surfaces: use uintptr_t
|
2012-11-01 10:46:02 +00:00
|
|
|
|
|
|
|
As suggested by Paolo Bonzini, to avoid possible integer overflow issues.
|
|
|
|
|
|
|
|
Signed-off-by: Alon Levy <alevy@redhat.com>
|
|
|
|
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
2012-12-16 23:27:22 +00:00
|
|
|
(cherry picked from commit c5825ac6c861bfe1a4adfa27517931b56079e298)
|
|
|
|
|
|
|
|
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
|
2012-11-01 10:46:02 +00:00
|
|
|
---
|
|
|
|
hw/qxl.c | 4 ++--
|
|
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/hw/qxl.c b/hw/qxl.c
|
2012-12-16 23:27:22 +00:00
|
|
|
index 59bf822..89e9ad9 100644
|
2012-11-01 10:46:02 +00:00
|
|
|
--- a/hw/qxl.c
|
|
|
|
+++ b/hw/qxl.c
|
2012-12-16 23:27:22 +00:00
|
|
|
@@ -1703,7 +1703,7 @@ static void qxl_hw_text_update(void *opaque, console_ch_t *chardata)
|
2012-11-01 10:46:02 +00:00
|
|
|
|
|
|
|
static void qxl_dirty_surfaces(PCIQXLDevice *qxl)
|
|
|
|
{
|
|
|
|
- intptr_t vram_start;
|
|
|
|
+ uintptr_t vram_start;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
if (qxl->mode != QXL_MODE_NATIVE && qxl->mode != QXL_MODE_COMPAT) {
|
2012-12-16 23:27:22 +00:00
|
|
|
@@ -1714,7 +1714,7 @@ static void qxl_dirty_surfaces(PCIQXLDevice *qxl)
|
2012-11-01 10:46:02 +00:00
|
|
|
qxl_set_dirty(&qxl->vga.vram, qxl->shadow_rom.draw_area_offset,
|
|
|
|
qxl->shadow_rom.surface0_area_size);
|
|
|
|
|
|
|
|
- vram_start = (intptr_t)memory_region_get_ram_ptr(&qxl->vram_bar);
|
|
|
|
+ vram_start = (uintptr_t)memory_region_get_ram_ptr(&qxl->vram_bar);
|
|
|
|
|
|
|
|
/* dirty the off-screen surfaces */
|
2012-12-16 23:27:22 +00:00
|
|
|
for (i = 0; i < NUM_SURFACES; i++) {
|