# HG changeset patch
# User Christian Limpach <Christian.Limpach@xxxxxxxxxxxxx>
# Node ID 317e8516d464a47d3aa0eba6f01e14448df8159a
# Parent ebb1982c03a167738300977438d8c1df40e7fca5
[qemu patches] Update patches for changeset 11561:c742b2ae920c.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxxx>
---
tools/ioemu/patches/fix-vga-scanning-code-overflow | 37 +++++++++++++
tools/ioemu/patches/series | 1
tools/ioemu/patches/vnc-access-monitor-vt | 4 -
tools/ioemu/patches/vnc-cleanup | 42 +++++++++++----
tools/ioemu/patches/vnc-display-find-unused | 14 ++---
tools/ioemu/patches/vnc-fixes | 57 +++++++++------------
tools/ioemu/patches/vnc-start-vncviewer | 8 +-
tools/ioemu/patches/vnc-title-domain-name | 6 +-
8 files changed, 111 insertions(+), 58 deletions(-)
diff -r ebb1982c03a1 -r 317e8516d464 tools/ioemu/patches/series
--- a/tools/ioemu/patches/series Thu Sep 21 18:58:17 2006 +0100
+++ b/tools/ioemu/patches/series Thu Sep 21 19:28:35 2006 +0100
@@ -29,6 +29,7 @@ acpi-support
acpi-support
acpi-timer-support
acpi-poweroff-support
+fix-vga-scanning-code-overflow
vnc-cleanup
vnc-fixes
vnc-start-vncviewer
diff -r ebb1982c03a1 -r 317e8516d464 tools/ioemu/patches/vnc-access-monitor-vt
--- a/tools/ioemu/patches/vnc-access-monitor-vt Thu Sep 21 18:58:17 2006 +0100
+++ b/tools/ioemu/patches/vnc-access-monitor-vt Thu Sep 21 19:28:35 2006 +0100
@@ -1,7 +1,7 @@ Index: ioemu/vnc.c
Index: ioemu/vnc.c
===================================================================
---- ioemu.orig/vnc.c 2006-08-17 19:50:14.623519661 +0100
-+++ ioemu/vnc.c 2006-08-17 19:50:15.956372339 +0100
+--- ioemu.orig/vnc.c 2006-09-21 19:10:57.000000000 +0100
++++ ioemu/vnc.c 2006-09-21 19:11:00.000000000 +0100
@@ -32,6 +32,10 @@
#include "vnc_keysym.h"
#include "keymaps.c"
@@ -22,7 +22,7 @@ Index: ioemu/vnc.c
};
#define DIRTY_PIXEL_BITS 64
-@@ -794,16 +800,80 @@
+@@ -790,16 +796,80 @@
static void do_key_event(VncState *vs, int down, uint32_t sym)
{
diff -r ebb1982c03a1 -r 317e8516d464 tools/ioemu/patches/vnc-cleanup
--- a/tools/ioemu/patches/vnc-cleanup Thu Sep 21 18:58:17 2006 +0100
+++ b/tools/ioemu/patches/vnc-cleanup Thu Sep 21 19:28:35 2006 +0100
@@ -1,7 +1,7 @@ Index: ioemu/vnc.c
Index: ioemu/vnc.c
===================================================================
---- ioemu.orig/vnc.c 2006-08-17 19:37:36.091553839 +0100
-+++ ioemu/vnc.c 2006-08-17 19:50:10.313996001 +0100
+--- ioemu.orig/vnc.c 2006-09-21 18:54:22.000000000 +0100
++++ ioemu/vnc.c 2006-09-21 19:05:39.000000000 +0100
@@ -143,13 +143,16 @@
static void vnc_dpy_update(DisplayState *ds, int x, int y, int w, int h)
{
@@ -30,7 +30,16 @@ Index: ioemu/vnc.c
if (vs->need_update && vs->csock != -1) {
int y;
-@@ -390,7 +394,7 @@
+@@ -383,6 +387,8 @@
+ int saved_offset;
+ int has_dirty = 0;
+
++ qemu_mod_timer(vs->timer, now + VNC_REFRESH_INTERVAL);
++
+ vnc_set_bits(width_mask, (vs->width / 16), VNC_DIRTY_WORDS);
+
+ /* Walk through the dirty map and eliminate tiles that
+@@ -390,7 +396,7 @@
row = vs->ds->data;
old_row = vs->old_data;
@@ -39,34 +48,50 @@ Index: ioemu/vnc.c
if (vnc_and_bits(vs->dirty_row[y], width_mask, VNC_DIRTY_WORDS)) {
int x;
char *ptr, *old_ptr;
-@@ -415,10 +419,8 @@
+@@ -415,10 +421,8 @@
old_row += vs->ds->linesize;
}
- if (!has_dirty) {
- qemu_mod_timer(vs->timer, qemu_get_clock(rt_clock) +
VNC_REFRESH_INTERVAL);
-- return;
++ if (!has_dirty)
+ return;
- }
-+ if (!has_dirty)
-+ goto out;
/* Count rectangles */
n_rectangles = 0;
-@@ -456,7 +458,9 @@
+@@ -454,17 +458,13 @@
+ vs->output.buffer[saved_offset] = (n_rectangles >> 8) & 0xFF;
+ vs->output.buffer[saved_offset + 1] = n_rectangles & 0xFF;
vnc_flush(vs);
-
+-
}
- qemu_mod_timer(vs->timer, qemu_get_clock(rt_clock) +
VNC_REFRESH_INTERVAL);
-+
-+ out:
-+ qemu_mod_timer(vs->timer, now + VNC_REFRESH_INTERVAL);
}
static void vnc_timer_init(VncState *vs)
+ {
+- if (vs->timer == NULL) {
++ if (vs->timer == NULL)
+ vs->timer = qemu_new_timer(rt_clock, vnc_update_client, vs);
+- qemu_mod_timer(vs->timer, qemu_get_clock(rt_clock));
+- }
+ }
+
+ static void vnc_dpy_refresh(DisplayState *ds)
+@@ -736,6 +736,8 @@
+ old_row += vs->ds->linesize;
+ }
+ }
++
++ qemu_mod_timer(vs->timer, qemu_get_clock(rt_clock));
+ }
+
+ static void set_encodings(VncState *vs, int32_t *encodings, size_t
n_encodings)
Index: ioemu/vl.c
===================================================================
---- ioemu.orig/vl.c 2006-08-17 19:50:02.410869542 +0100
-+++ ioemu/vl.c 2006-08-17 19:50:10.316995669 +0100
+--- ioemu.orig/vl.c 2006-09-21 18:55:38.000000000 +0100
++++ ioemu/vl.c 2006-09-21 19:00:48.000000000 +0100
@@ -5120,10 +5120,10 @@
/* XXX: better handling of removal */
for(ioh = first_io_handler; ioh != NULL; ioh = ioh_next) {
diff -r ebb1982c03a1 -r 317e8516d464 tools/ioemu/patches/vnc-display-find-unused
--- a/tools/ioemu/patches/vnc-display-find-unused Thu Sep 21 18:58:17
2006 +0100
+++ b/tools/ioemu/patches/vnc-display-find-unused Thu Sep 21 19:28:35
2006 +0100
@@ -1,8 +1,8 @@ Index: ioemu/vnc.c
Index: ioemu/vnc.c
===================================================================
---- ioemu.orig/vnc.c 2006-08-17 19:50:15.956372339 +0100
-+++ ioemu/vnc.c 2006-08-17 19:50:17.083247783 +0100
-@@ -1183,7 +1183,7 @@
+--- ioemu.orig/vnc.c 2006-09-21 19:11:00.000000000 +0100
++++ ioemu/vnc.c 2006-09-21 19:11:03.000000000 +0100
+@@ -1181,7 +1181,7 @@
}
}
@@ -11,7 +11,7 @@ Index: ioemu/vnc.c
{
struct sockaddr_in addr;
int reuse_addr, ret;
-@@ -1214,10 +1214,6 @@
+@@ -1212,10 +1212,6 @@
exit(1);
}
@@ -22,7 +22,7 @@ Index: ioemu/vnc.c
reuse_addr = 1;
ret = setsockopt(vs->lsock, SOL_SOCKET, SO_REUSEADDR,
(const char *)&reuse_addr, sizeof(reuse_addr));
-@@ -1226,7 +1222,16 @@
+@@ -1224,7 +1220,16 @@
exit(1);
}
@@ -39,7 +39,7 @@ Index: ioemu/vnc.c
fprintf(stderr, "bind() failed\n");
exit(1);
}
-@@ -1247,6 +1252,8 @@
+@@ -1245,6 +1250,8 @@
vs->ds->dpy_refresh = vnc_dpy_refresh;
vnc_dpy_resize(vs->ds, 640, 400);
@@ -50,8 +50,8 @@ Index: ioemu/vnc.c
int vnc_start_viewer(int port)
Index: ioemu/vl.c
===================================================================
---- ioemu.orig/vl.c 2006-08-17 19:50:13.152682236 +0100
-+++ ioemu/vl.c 2006-08-17 19:50:17.086247452 +0100
+--- ioemu.orig/vl.c 2006-09-21 19:10:53.000000000 +0100
++++ ioemu/vl.c 2006-09-21 19:11:03.000000000 +0100
@@ -121,6 +121,7 @@
static DisplayState display_state;
int nographic;
@@ -115,8 +115,8 @@ Index: ioemu/vl.c
} else {
Index: ioemu/vl.h
===================================================================
---- ioemu.orig/vl.h 2006-08-17 19:50:13.153682125 +0100
-+++ ioemu/vl.h 2006-08-17 19:50:17.087247341 +0100
+--- ioemu.orig/vl.h 2006-09-21 19:10:53.000000000 +0100
++++ ioemu/vl.h 2006-09-21 19:11:03.000000000 +0100
@@ -785,7 +785,7 @@
void cocoa_display_init(DisplayState *ds, int full_screen);
diff -r ebb1982c03a1 -r 317e8516d464 tools/ioemu/patches/vnc-fixes
--- a/tools/ioemu/patches/vnc-fixes Thu Sep 21 18:58:17 2006 +0100
+++ b/tools/ioemu/patches/vnc-fixes Thu Sep 21 19:28:35 2006 +0100
@@ -1,7 +1,7 @@ Index: ioemu/vl.c
Index: ioemu/vl.c
===================================================================
---- ioemu.orig/vl.c 2006-08-17 19:50:10.316995669 +0100
-+++ ioemu/vl.c 2006-08-17 19:50:12.100798502 +0100
+--- ioemu.orig/vl.c 2006-09-21 19:08:18.000000000 +0100
++++ ioemu/vl.c 2006-09-21 19:26:24.000000000 +0100
@@ -6534,8 +6534,10 @@
}
}
@@ -17,8 +17,8 @@ Index: ioemu/vl.c
if (use_gdbstub) {
Index: ioemu/vnc.c
===================================================================
---- ioemu.orig/vnc.c 2006-08-17 19:50:10.313996001 +0100
-+++ ioemu/vnc.c 2006-08-17 19:50:12.101798392 +0100
+--- ioemu.orig/vnc.c 2006-09-21 19:08:18.000000000 +0100
++++ ioemu/vnc.c 2006-09-21 19:26:38.000000000 +0100
@@ -3,6 +3,7 @@
*
* Copyright (C) 2006 Anthony Liguori <anthony@xxxxxxxxxxxxx>
@@ -240,7 +240,7 @@ Index: ioemu/vnc.c
{
VncState *vs = opaque;
int64_t now = qemu_get_clock(rt_clock);
-@@ -382,12 +445,16 @@
+@@ -382,14 +445,18 @@
int y;
char *row;
char *old_row;
@@ -252,6 +252,8 @@ Index: ioemu/vnc.c
+ int maxx, maxy;
+ int tile_bytes = vs->depth * DP2X(vs, 1);
+ qemu_mod_timer(vs->timer, now + VNC_REFRESH_INTERVAL);
+
- vnc_set_bits(width_mask, (vs->width / 16), VNC_DIRTY_WORDS);
+ if (vs->width != DP2X(vs, DIRTY_PIXEL_BITS))
+ width_mask = (1ULL << X2DP_UP(vs, vs->ds->width)) - 1;
@@ -260,7 +262,7 @@ Index: ioemu/vnc.c
/* Walk through the dirty map and eliminate tiles that
really aren't dirty */
-@@ -395,23 +462,25 @@
+@@ -397,23 +464,25 @@
old_row = vs->old_data;
for (y = 0; y < vs->ds->height; y++) {
@@ -295,17 +297,17 @@ Index: ioemu/vnc.c
}
}
-@@ -419,7 +488,8 @@
+@@ -421,7 +490,8 @@
old_row += vs->ds->linesize;
}
- if (!has_dirty)
+ if (!vs->has_update || vs->visible_y >= vs->ds->height ||
+ vs->visible_x >= vs->ds->width)
- goto out;
+ return;
/* Count rectangles */
-@@ -429,40 +499,61 @@
+@@ -431,34 +501,56 @@
saved_offset = vs->output.offset;
vnc_write_u16(vs, 0);
@@ -354,32 +356,26 @@ Index: ioemu/vnc.c
}
vs->output.buffer[saved_offset] = (n_rectangles >> 8) & 0xFF;
vs->output.buffer[saved_offset + 1] = n_rectangles & 0xFF;
-- vnc_flush(vs);
-
-- }
++
+ vs->has_update = 0;
+ vs->need_update = 0;
-+ vnc_flush(vs);
+ vnc_flush(vs);
+- }
+ vs->slow_client = 0;
+ } else
+ vs->slow_client = 1;
-
- out:
- qemu_mod_timer(vs->timer, now + VNC_REFRESH_INTERVAL);
- }
-
++}
++
+static void vnc_update_client(void *opaque)
+{
+ VncState *vs = opaque;
+
+ vs->ds->dpy_refresh(vs->ds);
+ _vnc_update_client(vs);
-+}
-+
+ }
+
static void vnc_timer_init(VncState *vs)
- {
- if (vs->timer == NULL) {
-@@ -473,8 +564,6 @@
+@@ -469,8 +561,6 @@
static void vnc_dpy_refresh(DisplayState *ds)
{
@@ -388,7 +384,7 @@ Index: ioemu/vnc.c
vga_hw_update();
}
-@@ -510,7 +599,7 @@
+@@ -506,7 +596,7 @@
static void buffer_reset(Buffer *buffer)
{
@@ -397,7 +393,7 @@ Index: ioemu/vnc.c
}
static void buffer_append(Buffer *buffer, const void *data, size_t len)
-@@ -551,12 +640,12 @@
+@@ -547,12 +637,12 @@
if (!ret)
return;
@@ -413,7 +409,7 @@ Index: ioemu/vnc.c
}
static void vnc_read_when(VncState *vs, VncReadEvent *func, size_t expecting)
-@@ -588,11 +677,11 @@
+@@ -584,11 +674,11 @@
return;
if (!ret) {
@@ -428,7 +424,7 @@ Index: ioemu/vnc.c
}
}
-@@ -600,9 +689,9 @@
+@@ -596,9 +686,9 @@
{
buffer_reserve(&vs->output, len);
@@ -441,7 +437,7 @@ Index: ioemu/vnc.c
buffer_append(&vs->output, data, len);
}
-@@ -724,22 +813,25 @@
+@@ -720,22 +810,25 @@
do_key_event(vs, down, sym);
}
@@ -475,10 +471,10 @@ Index: ioemu/vnc.c
+ vs->visible_y = y_position;
+ vs->visible_w = w;
+ vs->visible_h = h;
- }
-
- static void set_encodings(VncState *vs, int32_t *encodings, size_t
n_encodings)
-@@ -845,8 +937,6 @@
+
+ qemu_mod_timer(vs->timer, qemu_get_clock(rt_clock));
+ }
+@@ -843,8 +936,6 @@
}
vnc_dpy_resize(vs->ds, vs->ds->width, vs->ds->height);
@@ -487,7 +483,7 @@ Index: ioemu/vnc.c
vga_hw_invalidate();
vga_hw_update();
-@@ -1012,11 +1102,11 @@
+@@ -1010,11 +1101,11 @@
vnc_write(vs, "RFB 003.003\n", 12);
vnc_flush(vs);
vnc_read_when(vs, protocol_version, 12);
@@ -501,7 +497,7 @@ Index: ioemu/vnc.c
}
}
-@@ -1073,17 +1163,15 @@
+@@ -1071,17 +1162,15 @@
exit(1);
}
@@ -524,8 +520,8 @@ Index: ioemu/vnc.c
}
Index: ioemu/vl.h
===================================================================
---- ioemu.orig/vl.h 2006-08-17 19:50:02.411869432 +0100
-+++ ioemu/vl.h 2006-08-17 19:50:12.102798281 +0100
+--- ioemu.orig/vl.h 2006-09-21 19:00:48.000000000 +0100
++++ ioemu/vl.h 2006-09-21 19:26:24.000000000 +0100
@@ -319,6 +319,7 @@
int is_graphic_console(void);
CharDriverState *text_console_init(DisplayState *ds);
diff -r ebb1982c03a1 -r 317e8516d464 tools/ioemu/patches/vnc-start-vncviewer
--- a/tools/ioemu/patches/vnc-start-vncviewer Thu Sep 21 18:58:17 2006 +0100
+++ b/tools/ioemu/patches/vnc-start-vncviewer Thu Sep 21 19:28:35 2006 +0100
@@ -1,8 +1,8 @@ Index: ioemu/vnc.c
Index: ioemu/vnc.c
===================================================================
---- ioemu.orig/vnc.c 2006-08-17 19:50:12.101798392 +0100
-+++ ioemu/vnc.c 2006-08-17 19:50:13.149682567 +0100
-@@ -1175,3 +1175,25 @@
+--- ioemu.orig/vnc.c 2006-09-21 19:10:45.000000000 +0100
++++ ioemu/vnc.c 2006-09-21 19:10:53.000000000 +0100
+@@ -1173,3 +1173,25 @@
vnc_dpy_resize(vs->ds, 640, 400);
}
@@ -30,8 +30,8 @@ Index: ioemu/vnc.c
+}
Index: ioemu/vl.c
===================================================================
---- ioemu.orig/vl.c 2006-08-17 19:50:12.100798502 +0100
-+++ ioemu/vl.c 2006-08-17 19:50:13.152682236 +0100
+--- ioemu.orig/vl.c 2006-09-21 19:08:38.000000000 +0100
++++ ioemu/vl.c 2006-09-21 19:10:53.000000000 +0100
@@ -120,6 +120,7 @@
int bios_size;
static DisplayState display_state;
@@ -93,8 +93,8 @@ Index: ioemu/vl.c
sdl_display_init(ds, full_screen);
Index: ioemu/vl.h
===================================================================
---- ioemu.orig/vl.h 2006-08-17 19:50:12.102798281 +0100
-+++ ioemu/vl.h 2006-08-17 19:50:13.153682125 +0100
+--- ioemu.orig/vl.h 2006-09-21 19:08:38.000000000 +0100
++++ ioemu/vl.h 2006-09-21 19:10:53.000000000 +0100
@@ -786,6 +786,7 @@
/* vnc.c */
diff -r ebb1982c03a1 -r 317e8516d464 tools/ioemu/patches/vnc-title-domain-name
--- a/tools/ioemu/patches/vnc-title-domain-name Thu Sep 21 18:58:17 2006 +0100
+++ b/tools/ioemu/patches/vnc-title-domain-name Thu Sep 21 19:28:35 2006 +0100
@@ -1,8 +1,8 @@ Index: ioemu/vnc.c
Index: ioemu/vnc.c
===================================================================
---- ioemu.orig/vnc.c 2006-08-17 19:50:13.149682567 +0100
-+++ ioemu/vnc.c 2006-08-17 19:50:14.623519661 +0100
-@@ -1014,6 +1014,7 @@
+--- ioemu.orig/vnc.c 2006-09-21 19:10:53.000000000 +0100
++++ ioemu/vnc.c 2006-09-21 19:10:57.000000000 +0100
+@@ -1012,6 +1012,7 @@
static int protocol_client_init(VncState *vs, char *data, size_t len)
{
@@ -10,7 +10,7 @@ Index: ioemu/vnc.c
char pad[3] = { 0, 0, 0 };
vs->width = vs->ds->width;
-@@ -1059,8 +1060,10 @@
+@@ -1057,8 +1058,10 @@
vnc_write(vs, pad, 3); /* padding */
diff -r ebb1982c03a1 -r 317e8516d464
tools/ioemu/patches/fix-vga-scanning-code-overflow
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/ioemu/patches/fix-vga-scanning-code-overflow Thu Sep 21
19:28:35 2006 +0100
@@ -0,0 +1,45 @@
+Index: ioemu/hw/vga.c
+===================================================================
+--- ioemu.orig/hw/vga.c 2006-09-21 19:07:52.000000000 +0100
++++ ioemu/hw/vga.c 2006-09-21 19:08:09.000000000 +0100
+@@ -1463,14 +1463,15 @@
+ */
+ static void vga_draw_graphic(VGAState *s, int full_update)
+ {
+- int y1, y, update, page_min, page_max, linesize, y_start, double_scan,
mask;
++ int y1, y, update, linesize, y_start, double_scan, mask;
+ int width, height, shift_control, line_offset, bwidth;
+ ram_addr_t page0, page1;
+ int disp_width, multi_scan, multi_run;
+ uint8_t *d;
+ uint32_t v, addr1, addr;
+ vga_draw_line_func *vga_draw_line;
+-
++ ram_addr_t page_min, page_max;
++
+ full_update |= update_basic_params(s);
+
+ s->get_resolution(s, &width, &height);
+@@ -1561,8 +1562,8 @@
+ addr1 = (s->start_addr * 4);
+ bwidth = width * 4;
+ y_start = -1;
+- page_min = 0x7fffffff;
+- page_max = -1;
++ page_min = 0;
++ page_max = 0;
+ d = s->ds->data;
+ linesize = s->ds->linesize;
+ y1 = 0;
+@@ -1592,9 +1593,9 @@
+ if (update) {
+ if (y_start < 0)
+ y_start = y;
+- if (page0 < page_min)
++ if (page_min == 0 || page0 < page_min)
+ page_min = page0;
+- if (page1 > page_max)
++ if (page_max == 0 || page1 > page_max)
+ page_max = page1;
+ vga_draw_line(s, d, s->vram_ptr + addr, width);
+ if (s->cursor_draw_line)
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|