summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/qemu')
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/fix-dirent.patch12
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/glflags.patch13
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/no-strip.patch26
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/parallel_make.patch34
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/port92_fix.patch196
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/qemu-ppc-hack.patch108
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/vmware-vga-fifo-rewind.patch198
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/wacom-tablet-fix.patch65
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/workaround_bad_futex_headers.patch24
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/Detect-and-use-GCC-atomic-builtins-for-locking.patch84
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/enable-i386-linux-user.patch (renamed from meta/recipes-devtools/qemu/qemu-0.13.0/enable-i386-linux-user.patch)14
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/fallback-to-safe-mmap_min_addr.patch (renamed from meta/recipes-devtools/qemu/qemu-0.13.0/fallback-to-safe-mmap_min_addr.patch)8
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/fix-configure-checks.patch (renamed from meta/recipes-devtools/qemu/qemu-0.13.0/fix-configure-checks.patch)12
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/fix-nogl.patch (renamed from meta/recipes-devtools/qemu/qemu-0.13.0/fix-nogl.patch)55
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/init-info.patch (renamed from meta/recipes-devtools/qemu/qemu-0.13.0/init-info.patch)8
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/larger_default_ram_size.patch20
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/linker-flags.patch (renamed from meta/recipes-devtools/qemu/qemu-0.13.0/linker-flags.patch)8
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/no-strip.patch13
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/qemu-git-qemugl-host.patch (renamed from meta/recipes-devtools/qemu/qemu-0.13.0/qemu-git-qemugl-host.patch)346
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/qemu-vmware-vga-depth.patch (renamed from meta/recipes-devtools/qemu/qemu-0.13.0/qemu-vmware-vga-depth.patch)52
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/qemugl-allow-glxcontext-release.patch (renamed from meta/recipes-devtools/qemu/qemu-0.13.0/qemugl-allow-glxcontext-release.patch)6
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/spice-qxl-locking-fix-for-qemu-kvm.patch150
-rw-r--r--meta/recipes-devtools/qemu/qemu_0.14.0.bb (renamed from meta/recipes-devtools/qemu/qemu_0.13.0.bb)19
23 files changed, 544 insertions, 927 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/fix-dirent.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/fix-dirent.patch
deleted file mode 100644
index 8bbfa0e88e..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.13.0/fix-dirent.patch
+++ /dev/null
@@ -1,12 +0,0 @@
1Index: qemu/linux-user/syscall.c
2===================================================================
3--- qemu.orig/linux-user/syscall.c 2010-05-11 13:16:22.421783949 -0400
4+++ qemu/linux-user/syscall.c 2010-05-11 13:16:31.759805849 -0400
5@@ -26,6 +26,7 @@
6 #include <errno.h>
7 #include <unistd.h>
8 #include <fcntl.h>
9+#include <dirent.h>
10 #include <time.h>
11 #include <limits.h>
12 #include <sys/types.h>
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/glflags.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/glflags.patch
deleted file mode 100644
index 0a27c2dee1..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.13.0/glflags.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1Index: git/Makefile.target
2===================================================================
3--- git.orig/Makefile.target 2010-05-27 12:35:26.000000000 -0400
4+++ git/Makefile.target 2010-05-27 12:59:53.520415731 -0400
5@@ -326,7 +326,7 @@ vl.o: qemu-options.h
6
7 monitor.o: qemu-monitor.h
8
9-LIBS += -lGL -lGLU
10+LIBS += -lGL
11
12 ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
13
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/no-strip.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/no-strip.patch
deleted file mode 100644
index 62cdec6109..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.13.0/no-strip.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1Index: qemu-0.13.0/Makefile
2===================================================================
3--- qemu-0.13.0.orig/Makefile 2011-01-17 16:41:59.000000000 +0800
4+++ qemu-0.13.0/Makefile 2011-01-17 16:44:57.000000000 +0800
5@@ -185,7 +185,7 @@
6 install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig
7 $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
8 ifneq ($(TOOLS),)
9- $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
10+ $(INSTALL_PROG) $(TOOLS) "$(DESTDIR)$(bindir)"
11 endif
12 ifneq ($(BLOBS),)
13 $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
14Index: qemu-0.13.0/Makefile.target
15===================================================================
16--- qemu-0.13.0.orig/Makefile.target 2011-01-17 16:42:36.000000000 +0800
17+++ qemu-0.13.0/Makefile.target 2011-01-17 16:44:57.000000000 +0800
18@@ -351,7 +351,7 @@
19
20 install: all
21 ifneq ($(PROGS),)
22- $(INSTALL) -m 755 $(STRIP_OPT) $(PROGS) "$(DESTDIR)$(bindir)"
23+ $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
24 endif
25
26 # Include automatically generated dependency files
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/parallel_make.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/parallel_make.patch
deleted file mode 100644
index 278b1a759d..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.13.0/parallel_make.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1Make -j(>=6) always fail as some job depends on config-host.h. Added following
2patch in upstream to resolve it.
3
4Could remove it in next upgrade if necessary.
5
6Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
7
8commit f0acb38015409024683911380daa94cc974e4e0e
9Author: Paul Brook <paul@codesourcery.com>
10Date: Fri Nov 26 18:46:03 2010 +0000
11
12 Add missing dependency.
13
14 Teach Makefile that cmd.o depends on a generated header (specifically
15 config-host.h).
16
17 Signed-off-by: Paul Brook <paul@codesourcery.com>
18 (cherry picked from commit 6e14404aab26f74a448747d1e793ac16bde8a92b)
19
20 Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
21
22Index: qemu-0.13.0/Makefile
23===================================================================
24--- qemu-0.13.0.orig/Makefile 2011-01-18 09:45:45.000000000 +0800
25+++ qemu-0.13.0/Makefile 2011-01-18 09:45:45.000000000 +0800
26@@ -107,7 +107,7 @@
27 ######################################################################
28
29 qemu-img.o: qemu-img-cmds.h
30-qemu-img.o qemu-tool.o qemu-nbd.o qemu-io.o: $(GENERATED_HEADERS)
31+qemu-img.o qemu-tool.o qemu-nbd.o qemu-io.o cmd.o: $(GENERATED_HEADERS)
32
33 qemu-img$(EXESUF): qemu-img.o qemu-tool.o qemu-error.o $(block-obj-y) $(qobject-obj-y)
34
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/port92_fix.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/port92_fix.patch
deleted file mode 100644
index e101c687c0..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.13.0/port92_fix.patch
+++ /dev/null
@@ -1,196 +0,0 @@
1With qemu 0.13.0, poky failed to start on ppc arch because both ppc_prep_init
2and i8042_initfn try to register to port 0x92 then cause conflict. Introduce
3this patch from upstream to fix it.
4
5Could remove it in future if necessary.
6
7Signed-off-by: Zhai, Edwin <edwin.zhai@intel.com>
8
9commit 4b78a802ffaabb325a0f7b773031da92d173bde1
10Author: Blue Swirl <blauwirbel@gmail.com>
11Date: Thu Jan 6 18:24:35 2011 +0000
12
13 pc: move port 92 stuff back to pc.c from pckbd.c
14
15 956a3e6bb7386de48b642d4fee11f7f86a2fcf9a introduced a bug concerning
16 reset bit for port 92.
17
18 Since the keyboard output port and port 92 are not compatible anyway,
19 let's separate them.
20
21 Reported-by: Peter Lieven <pl@dlh.net>
22 Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
23 --
24 v2: added reset handler and VMState
25
26Index: qemu-0.13.0/hw/pc.c
27===================================================================
28--- qemu-0.13.0.orig/hw/pc.c 2010-10-16 04:56:09.000000000 +0800
29+++ qemu-0.13.0/hw/pc.c 2011-01-20 20:37:37.000000000 +0800
30@@ -409,11 +409,91 @@
31 qemu_register_reset(pc_cmos_init_late, &arg);
32 }
33
34+/* port 92 stuff: could be split off */
35+typedef struct Port92State {
36+ ISADevice dev;
37+ uint8_t outport;
38+ qemu_irq *a20_out;
39+} Port92State;
40+
41+static void port92_write(void *opaque, uint32_t addr, uint32_t val)
42+{
43+ Port92State *s = opaque;
44+
45+ DPRINTF("port92: write 0x%02x\n", val);
46+ s->outport = val;
47+ qemu_set_irq(*s->a20_out, (val >> 1) & 1);
48+ if (val & 1) {
49+ qemu_system_reset_request();
50+ }
51+}
52+
53+static uint32_t port92_read(void *opaque, uint32_t addr)
54+{
55+ Port92State *s = opaque;
56+ uint32_t ret;
57+
58+ ret = s->outport;
59+ DPRINTF("port92: read 0x%02x\n", ret);
60+ return ret;
61+}
62+
63+static void port92_init(ISADevice *dev, qemu_irq *a20_out)
64+{
65+ Port92State *s = DO_UPCAST(Port92State, dev, dev);
66+
67+ s->a20_out = a20_out;
68+}
69+
70+static const VMStateDescription vmstate_port92_isa = {
71+ .name = "port92",
72+ .version_id = 1,
73+ .minimum_version_id = 1,
74+ .minimum_version_id_old = 1,
75+ .fields = (VMStateField []) {
76+ VMSTATE_UINT8(outport, Port92State),
77+ VMSTATE_END_OF_LIST()
78+ }
79+};
80+
81+static void port92_reset(DeviceState *d)
82+{
83+ Port92State *s = container_of(d, Port92State, dev.qdev);
84+
85+ s->outport &= ~1;
86+}
87+
88+static int port92_initfn(ISADevice *dev)
89+{
90+ Port92State *s = DO_UPCAST(Port92State, dev, dev);
91+
92+ register_ioport_read(0x92, 1, 1, port92_read, s);
93+ register_ioport_write(0x92, 1, 1, port92_write, s);
94+ s->outport = 0;
95+ return 0;
96+}
97+
98+static ISADeviceInfo port92_info = {
99+ .qdev.name = "port92",
100+ .qdev.size = sizeof(Port92State),
101+ .qdev.vmsd = &vmstate_port92_isa,
102+ .qdev.no_user = 1,
103+ .qdev.reset = port92_reset,
104+ .init = port92_initfn,
105+};
106+
107+static void port92_register(void)
108+{
109+ isa_qdev_register(&port92_info);
110+}
111+device_init(port92_register)
112+
113 static void handle_a20_line_change(void *opaque, int irq, int level)
114 {
115 CPUState *cpu = opaque;
116
117 /* XXX: send to all CPUs ? */
118+ /* XXX: add logic to handle multiple A20 line sources */
119 cpu_x86_set_a20(cpu, level);
120 }
121
122@@ -1017,7 +1097,7 @@
123 PITState *pit;
124 qemu_irq rtc_irq = NULL;
125 qemu_irq *a20_line;
126- ISADevice *i8042;
127+ ISADevice *i8042, *port92;
128 qemu_irq *cpu_exit_irq;
129
130 register_ioport_write(0x80, 1, 1, ioport80_write, NULL);
131@@ -1051,10 +1131,12 @@
132 }
133 }
134
135- a20_line = qemu_allocate_irqs(handle_a20_line_change, first_cpu, 1);
136+ a20_line = qemu_allocate_irqs(handle_a20_line_change, first_cpu, 2);
137 i8042 = isa_create_simple("i8042");
138- i8042_setup_a20_line(i8042, a20_line);
139+ i8042_setup_a20_line(i8042, &a20_line[0]);
140 vmmouse_init(i8042);
141+ port92 = isa_create_simple("port92");
142+ port92_init(port92, &a20_line[1]);
143
144 cpu_exit_irq = qemu_allocate_irqs(cpu_request_exit, NULL, 1);
145 DMA_init(0, cpu_exit_irq);
146Index: qemu-0.13.0/hw/pckbd.c
147===================================================================
148--- qemu-0.13.0.orig/hw/pckbd.c 2010-10-16 04:56:09.000000000 +0800
149+++ qemu-0.13.0/hw/pckbd.c 2011-01-20 20:33:44.000000000 +0800
150@@ -209,10 +209,8 @@
151 ps2_queue(s->kbd, b);
152 }
153
154-static void ioport92_write(void *opaque, uint32_t addr, uint32_t val)
155+static void outport_write(KBDState *s, uint32_t val)
156 {
157- KBDState *s = opaque;
158-
159 DPRINTF("kbd: write outport=0x%02x\n", val);
160 s->outport = val;
161 if (s->a20_out) {
162@@ -223,16 +221,6 @@
163 }
164 }
165
166-static uint32_t ioport92_read(void *opaque, uint32_t addr)
167-{
168- KBDState *s = opaque;
169- uint32_t ret;
170-
171- ret = s->outport;
172- DPRINTF("kbd: read outport=0x%02x\n", ret);
173- return ret;
174-}
175-
176 static void kbd_write_command(void *opaque, uint32_t addr, uint32_t val)
177 {
178 KBDState *s = opaque;
179@@ -340,7 +328,7 @@
180 kbd_queue(s, val, 1);
181 break;
182 case KBD_CCMD_WRITE_OUTPORT:
183- ioport92_write(s, 0, val);
184+ outport_write(s, val);
185 break;
186 case KBD_CCMD_WRITE_MOUSE:
187 ps2_write_mouse(s->mouse, val);
188@@ -469,8 +457,6 @@
189 register_ioport_write(0x60, 1, 1, kbd_write_data, s);
190 register_ioport_read(0x64, 1, 1, kbd_read_status, s);
191 register_ioport_write(0x64, 1, 1, kbd_write_command, s);
192- register_ioport_read(0x92, 1, 1, ioport92_read, s);
193- register_ioport_write(0x92, 1, 1, ioport92_write, s);
194
195 s->kbd = ps2_kbd_init(kbd_update_kbd_irq, s);
196 s->mouse = ps2_mouse_init(kbd_update_aux_irq, s);
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/qemu-ppc-hack.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/qemu-ppc-hack.patch
deleted file mode 100644
index 6f45788183..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.13.0/qemu-ppc-hack.patch
+++ /dev/null
@@ -1,108 +0,0 @@
1Quick fixes to get the ppc system model to boot a 603e based
2kernel.
3
4Index: qemu-0.13.0/hw/m48t59.c
5===================================================================
6--- qemu-0.13.0.orig/hw/m48t59.c 2010-10-16 04:56:09.000000000 +0800
7+++ qemu-0.13.0/hw/m48t59.c 2011-01-17 16:40:09.000000000 +0800
8@@ -50,6 +50,7 @@
9 */
10
11 struct M48t59State {
12+ SysBusDevice busdev;
13 /* Model parameters */
14 uint32_t type; // 2 = m48t02, 8 = m48t08, 59 = m48t59
15 /* Hardware parameters */
16@@ -74,11 +75,6 @@
17 M48t59State state;
18 } M48t59ISAState;
19
20-typedef struct M48t59SysBusState {
21- SysBusDevice busdev;
22- M48t59State state;
23-} M48t59SysBusState;
24-
25 /* Fake timer functions */
26
27 /* Alarm management */
28@@ -629,8 +625,7 @@
29
30 static void m48t59_reset_sysbus(DeviceState *d)
31 {
32- M48t59SysBusState *sys = container_of(d, M48t59SysBusState, busdev.qdev);
33- M48t59State *NVRAM = &sys->state;
34+ M48t59State *NVRAM = container_of(d, M48t59State, busdev.qdev);
35
36 m48t59_reset_common(NVRAM);
37 }
38@@ -641,7 +636,7 @@
39 {
40 DeviceState *dev;
41 SysBusDevice *s;
42- M48t59SysBusState *d;
43+ M48t59State *d;
44
45 dev = qdev_create(NULL, "m48t59");
46 qdev_prop_set_uint32(dev, "type", type);
47@@ -658,9 +653,9 @@
48 sysbus_mmio_map(s, 0, mem_base);
49 }
50
51- d = FROM_SYSBUS(M48t59SysBusState, s);
52+ d = FROM_SYSBUS(M48t59State, s);
53
54- return &d->state;
55+ return d;
56 }
57
58 M48t59State *m48t59_init_isa(uint32_t io_base, uint16_t size, int type)
59@@ -710,8 +705,7 @@
60
61 static int m48t59_init1(SysBusDevice *dev)
62 {
63- M48t59SysBusState *d = FROM_SYSBUS(M48t59SysBusState, dev);
64- M48t59State *s = &d->state;
65+ M48t59State *s = FROM_SYSBUS(M48t59State, dev);
66 int mem_index;
67
68 sysbus_init_irq(dev, &s->IRQ);
69@@ -740,12 +734,12 @@
70 static SysBusDeviceInfo m48t59_info = {
71 .init = m48t59_init1,
72 .qdev.name = "m48t59",
73- .qdev.size = sizeof(M48t59SysBusState),
74+ .qdev.size = sizeof(M48t59State),
75 .qdev.reset = m48t59_reset_sysbus,
76 .qdev.props = (Property[]) {
77- DEFINE_PROP_UINT32("size", M48t59SysBusState, state.size, -1),
78- DEFINE_PROP_UINT32("type", M48t59SysBusState, state.type, -1),
79- DEFINE_PROP_HEX32( "io_base", M48t59SysBusState, state.io_base, 0),
80+ DEFINE_PROP_UINT32("size", M48t59State, size, -1),
81+ DEFINE_PROP_UINT32("type", M48t59State, type, -1),
82+ DEFINE_PROP_HEX32( "io_base", M48t59State, io_base, 0),
83 DEFINE_PROP_END_OF_LIST(),
84 }
85 };
86Index: qemu-0.13.0/hw/ppc_prep.c
87===================================================================
88--- qemu-0.13.0.orig/hw/ppc_prep.c 2010-10-16 04:56:09.000000000 +0800
89+++ qemu-0.13.0/hw/ppc_prep.c 2011-01-15 18:29:25.000000000 +0800
90@@ -74,7 +74,7 @@
91 /* Constants for devices init */
92 static const int ide_iobase[2] = { 0x1f0, 0x170 };
93 static const int ide_iobase2[2] = { 0x3f6, 0x376 };
94-static const int ide_irq[2] = { 13, 13 };
95+static const int ide_irq[2] = { 13, 14 };
96
97 #define NE2000_NB_MAX 6
98
99@@ -631,9 +631,6 @@
100 if (filename) {
101 qemu_free(filename);
102 }
103- if (env->nip < 0xFFF80000 && bios_size < 0x00100000) {
104- hw_error("PowerPC 601 / 620 / 970 need a 1MB BIOS\n");
105- }
106
107 if (linux_boot) {
108 kernel_base = KERNEL_LOAD_ADDR;
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/vmware-vga-fifo-rewind.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/vmware-vga-fifo-rewind.patch
deleted file mode 100644
index 867e54ba11..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.13.0/vmware-vga-fifo-rewind.patch
+++ /dev/null
@@ -1,198 +0,0 @@
1commit 4dedc07ffbbc66002e0fd2b97d5516fe6aca5eea
2Author: Andrzej Zaborowski <balrog@zabor.org>
3Date: Fri Sep 10 02:23:31 2010 +0200
4
5 vmware_vga: Add checks to deal with non-atomic fifo writes.
6
7 Janne Huttunen noticed that the FIFO end pointer is updated by the
8 guest after writing each word to the FIFO, at least the X.org driver
9 which is open does this. This means that there's no way for the
10 host to know if the guest is in the middle a write operation. Qemu
11 thus needs to read the beginning of the command up to when it's able
12 to tell how many words are expected for the given command. It will
13 abort reading and rewind the FIFO if there aren't enough words yet,
14 this should be relatively rare but it is suspected to have been the
15 cause of the occasional FIFO overrun that killed the display.
16
17Index: qemu-0.13.0/hw/vmware_vga.c
18===================================================================
19--- qemu-0.13.0.orig/hw/vmware_vga.c 2011-01-15 18:06:06.000000000 +0800
20+++ qemu-0.13.0/hw/vmware_vga.c 2011-01-15 18:17:04.000000000 +0800
21@@ -521,27 +521,37 @@
22
23 static uint32_t last_cmd;
24
25-static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s)
26+static inline int vmsvga_fifo_length(struct vmsvga_state_s *s)
27 {
28+ int num;
29 if (!s->config || !s->enable)
30- return 1;
31- return (s->cmd->next_cmd == s->cmd->stop);
32+ return 0;
33+ num = CMD(next_cmd) - CMD(stop);
34+ if (num < 0)
35+ num += CMD(max) - CMD(min);
36+ return num >> 2;
37 }
38
39 static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s)
40 {
41- int offset = CMD(stop);
42+ uint32_t cmd = s->fifo[CMD(stop) >> 2];
43
44+ /* If parameter is not available in FIFO, return 0 rather than random
45+ * value. Also update the stop as missing parameter will be inserted
46+ * soonly, else it will be treated as new command next time.
47+ * With rewinding in vmsvga_fifo_run, this unlikely happen.
48+ */
49 if (unlikely(s->cmd->next_cmd == s->cmd->stop)) {
50 fprintf(stderr, "%s: FIFO empty during CMD %i\n",
51 __FUNCTION__, last_cmd);
52- return 0x00000000;
53+ cmd = 0;
54 }
55
56- s->cmd->stop = cpu_to_le32(offset + 4);
57- if (offset + 4 >= CMD(max))
58+ s->cmd->stop = cpu_to_le32(CMD(stop) + 4);
59+ if (CMD(stop) >= CMD(max))
60 s->cmd->stop = s->cmd->min;
61- return s->fifo[offset >> 2];
62+
63+ return cmd;
64 }
65
66 static inline uint32_t vmsvga_fifo_read(struct vmsvga_state_s *s)
67@@ -552,13 +562,23 @@
68 static void vmsvga_fifo_run(struct vmsvga_state_s *s)
69 {
70 uint32_t colour;
71- int args = 0;
72+ int args, len;
73 int x, y, dx, dy, width, height;
74 struct vmsvga_cursor_definition_s cursor;
75- while (!vmsvga_fifo_empty(s))
76+ uint32_t cmd_start;
77+
78+ len = vmsvga_fifo_length(s);
79+ while (len > 0) {
80+ /* May need to go back to the start of the command if incomplete */
81+ cmd_start = s->cmd->stop;
82+
83 switch (last_cmd = vmsvga_fifo_read(s)) {
84 case SVGA_CMD_UPDATE:
85 case SVGA_CMD_UPDATE_VERBOSE:
86+ len -= 5;
87+ if (len <0)
88+ goto rewind;
89+
90 x = vmsvga_fifo_read(s);
91 y = vmsvga_fifo_read(s);
92 width = vmsvga_fifo_read(s);
93@@ -567,6 +587,10 @@
94 break;
95
96 case SVGA_CMD_RECT_FILL:
97+ len -= 6;
98+ if (len < 0)
99+ goto rewind;
100+
101 colour = vmsvga_fifo_read(s);
102 x = vmsvga_fifo_read(s);
103 y = vmsvga_fifo_read(s);
104@@ -576,10 +600,15 @@
105 vmsvga_fill_rect(s, colour, x, y, width, height);
106 break;
107 #else
108+ args = 0;
109 goto badcmd;
110 #endif
111
112 case SVGA_CMD_RECT_COPY:
113+ len -= 7;
114+ if (len < 0)
115+ goto rewind;
116+
117 x = vmsvga_fifo_read(s);
118 y = vmsvga_fifo_read(s);
119 dx = vmsvga_fifo_read(s);
120@@ -590,10 +619,15 @@
121 vmsvga_copy_rect(s, x, y, dx, dy, width, height);
122 break;
123 #else
124+ args = 0;
125 goto badcmd;
126 #endif
127
128 case SVGA_CMD_DEFINE_CURSOR:
129+ len -= 8;
130+ if (len < 0)
131+ goto rewind;
132+
133 cursor.id = vmsvga_fifo_read(s);
134 cursor.hot_x = vmsvga_fifo_read(s);
135 cursor.hot_y = vmsvga_fifo_read(s);
136@@ -602,11 +636,14 @@
137 vmsvga_fifo_read(s);
138 cursor.bpp = vmsvga_fifo_read(s);
139
140+ args = SVGA_BITMAP_SIZE(x, y) + SVGA_PIXMAP_SIZE(x, y, cursor.bpp);
141 if (SVGA_BITMAP_SIZE(x, y) > sizeof cursor.mask ||
142- SVGA_PIXMAP_SIZE(x, y, cursor.bpp) > sizeof cursor.image) {
143- args = SVGA_BITMAP_SIZE(x, y) + SVGA_PIXMAP_SIZE(x, y, cursor.bpp);
144+ SVGA_PIXMAP_SIZE(x, y, cursor.bpp) > sizeof cursor.image)
145 goto badcmd;
146- }
147+
148+ len -= args;
149+ if (len < 0)
150+ goto rewind;
151
152 for (args = 0; args < SVGA_BITMAP_SIZE(x, y); args ++)
153 cursor.mask[args] = vmsvga_fifo_read_raw(s);
154@@ -625,6 +662,10 @@
155 * for so we can avoid FIFO desync if driver uses them illegally.
156 */
157 case SVGA_CMD_DEFINE_ALPHA_CURSOR:
158+ len -= 6;
159+ if (len < 0)
160+ goto rewind;
161+
162 vmsvga_fifo_read(s);
163 vmsvga_fifo_read(s);
164 vmsvga_fifo_read(s);
165@@ -639,6 +680,10 @@
166 args = 7;
167 goto badcmd;
168 case SVGA_CMD_DRAW_GLYPH_CLIPPED:
169+ len -= 4;
170+ if (len < 0)
171+ goto rewind;
172+
173 vmsvga_fifo_read(s);
174 vmsvga_fifo_read(s);
175 args = 7 + (vmsvga_fifo_read(s) >> 2);
176@@ -659,14 +704,22 @@
177 break; /* Nop */
178
179 default:
180+ args = 0;
181 badcmd:
182+ len -= args;
183+ if (len < 0)
184+ goto rewind;
185 while (args --)
186 vmsvga_fifo_read(s);
187 printf("%s: Unknown command 0x%02x in SVGA command FIFO\n",
188 __FUNCTION__, last_cmd);
189 break;
190+ rewind:
191+ s->cmd->stop = cmd_start;
192+ break;
193 }
194
195+ }
196 s->syncing = 0;
197 }
198
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/wacom-tablet-fix.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/wacom-tablet-fix.patch
deleted file mode 100644
index b8210db2b1..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.13.0/wacom-tablet-fix.patch
+++ /dev/null
@@ -1,65 +0,0 @@
1qemu 0.13.0 cause seg fault in qemu_remove_mouse_event_handler, this patch from
2upstream can fix it.
3
4Should remove it in next upgrade if necessary.
5
6Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
7
8commit b2d4d8329963b13c5cebe5944dcc99f0e9d1b5c7
9Author: Gerd Hoffmann <kraxel@redhat.com>
10Date: Fri Oct 8 12:30:14 2010 +0200
11
12 wacom tablet: activate event handlers.
13
14 Add qemu_activate_mouse_event_handler() calls to the usb wavom tablet so
15 it actually receives events. Also make sure we only remove the handler
16 if we registered it before.
17
18 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
19 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
20
21Index: qemu-0.13.0/hw/usb-wacom.c
22===================================================================
23--- qemu-0.13.0.orig/hw/usb-wacom.c 2010-10-16 04:56:09.000000000 +0800
24+++ qemu-0.13.0/hw/usb-wacom.c 2011-01-18 16:58:44.000000000 +0800
25@@ -160,6 +160,7 @@
26 if (!s->mouse_grabbed) {
27 s->eh_entry = qemu_add_mouse_event_handler(usb_mouse_event, s, 0,
28 "QEMU PenPartner tablet");
29+ qemu_activate_mouse_event_handler(s->eh_entry);
30 s->mouse_grabbed = 1;
31 }
32
33@@ -197,6 +198,7 @@
34 if (!s->mouse_grabbed) {
35 s->eh_entry = qemu_add_mouse_event_handler(usb_wacom_event, s, 1,
36 "QEMU PenPartner tablet");
37+ qemu_activate_mouse_event_handler(s->eh_entry);
38 s->mouse_grabbed = 1;
39 }
40
41@@ -334,8 +336,10 @@
42 ret = 0;
43 break;
44 case WACOM_SET_REPORT:
45- qemu_remove_mouse_event_handler(s->eh_entry);
46- s->mouse_grabbed = 0;
47+ if (s->mouse_grabbed) {
48+ qemu_remove_mouse_event_handler(s->eh_entry);
49+ s->mouse_grabbed = 0;
50+ }
51 s->mode = data[0];
52 ret = 0;
53 break;
54@@ -397,7 +401,10 @@
55 {
56 USBWacomState *s = (USBWacomState *) dev;
57
58- qemu_remove_mouse_event_handler(s->eh_entry);
59+ if (s->mouse_grabbed) {
60+ qemu_remove_mouse_event_handler(s->eh_entry);
61+ s->mouse_grabbed = 0;
62+ }
63 }
64
65 static int usb_wacom_initfn(USBDevice *dev)
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/workaround_bad_futex_headers.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/workaround_bad_futex_headers.patch
deleted file mode 100644
index a08e2d9acd..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.13.0/workaround_bad_futex_headers.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1---
2 linux-user/syscall.c | 10 +++++++++-
3 1 file changed, 9 insertions(+), 1 deletion(-)
4
5Index: qemu-0.13.0/linux-user/syscall.c
6===================================================================
7--- qemu-0.13.0.orig/linux-user/syscall.c 2011-01-17 16:52:18.000000000 +0800
8+++ qemu-0.13.0/linux-user/syscall.c 2011-01-17 16:52:20.000000000 +0800
9@@ -99,6 +99,15 @@
10 #define CLONE_NPTL_FLAGS2 0
11 #endif
12
13+#define FUTEX_WAIT 0
14+#define FUTEX_WAKE 1
15+#define FUTEX_FD 2
16+#define FUTEX_REQUEUE 3
17+#define FUTEX_CMP_REQUEUE 4
18+#define FUTEX_WAKE_OP 5
19+#define FUTEX_LOCK_PI 6
20+#define FUTEX_UNLOCK_PI 7
21+
22 //#define DEBUG
23
24 //#include <linux/msdos_fs.h>
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/Detect-and-use-GCC-atomic-builtins-for-locking.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/Detect-and-use-GCC-atomic-builtins-for-locking.patch
new file mode 100644
index 0000000000..dc69bfbbd5
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.14.0/Detect-and-use-GCC-atomic-builtins-for-locking.patch
@@ -0,0 +1,84 @@
1From de01f17a2cb88dc5ff53cc321342b888c33b120a Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Lo=C3=AFc=20Minier?= <lool@dooz.org>
3Date: Thu, 11 Feb 2010 17:42:33 +0100
4Subject: [PATCH] Detect and use GCC atomic builtins for locking
5
6---
7 configure | 17 +++++++++++++++++
8 qemu-lock.h | 13 +++++++++++++
9 2 files changed, 30 insertions(+), 0 deletions(-)
10
11Index: qemu-0.14.0/configure
12===================================================================
13--- qemu-0.14.0.orig/configure
14+++ qemu-0.14.0/configure
15@@ -2243,6 +2243,20 @@ fi
16 ##########################################
17
18 ##########################################
19+# check if we have gcc atomic built-ins
20+gcc_atomic_builtins=no
21+cat > $TMPC << EOF
22+int main(void) {
23+ int i;
24+ __sync_lock_test_and_set(&i, 1);
25+ __sync_lock_release(&i);
26+}
27+EOF
28+if compile_prog "" ""; then
29+ gcc_atomic_builtins=yes
30+fi
31+
32+##########################################
33 # check if we have fdatasync
34
35 fdatasync=no
36@@ -2731,6 +2745,9 @@ fi
37 if test "$gcc_attribute_warn_unused_result" = "yes" ; then
38 echo "CONFIG_GCC_ATTRIBUTE_WARN_UNUSED_RESULT=y" >> $config_host_mak
39 fi
40+if test "$gcc_atomic_builtins" = "yes" ; then
41+ echo "CONFIG_GCC_ATOMIC_BUILTINS=y" >> $config_host_mak
42+fi
43 if test "$fdatasync" = "yes" ; then
44 echo "CONFIG_FDATASYNC=y" >> $config_host_mak
45 fi
46Index: qemu-0.14.0/qemu-lock.h
47===================================================================
48--- qemu-0.14.0.orig/qemu-lock.h
49+++ qemu-0.14.0/qemu-lock.h
50@@ -33,6 +33,14 @@
51
52 #else
53
54+#ifdef CONFIG_GCC_ATOMIC_BUILTINS
55+typedef int spinlock_t;
56+
57+#define SPIN_LOCK_UNLOCKED 0
58+
59+#define resetlock(p) __sync_lock_release((p))
60+#else /* CONFIG_GCC_ATOMIC_BUILTINS */
61+
62 #if defined(__hppa__)
63
64 typedef int spinlock_t[4];
65@@ -56,7 +64,11 @@ static inline void resetlock (spinlock_t
66 }
67
68 #endif
69+#endif /* !CONFIG_GCC_ATOMIC_BUILTINS */
70
71+#ifdef CONFIG_GCC_ATOMIC_BUILTINS
72+#define testandset(p) __sync_lock_test_and_set((p), 1)
73+#else /* CONFIG_GCC_ATOMIC_BUILTINS */
74 #if defined(_ARCH_PPC)
75 static inline int testandset (int *p)
76 {
77@@ -213,6 +225,7 @@ static inline int testandset (int *p)
78 #else
79 #error unimplemented CPU support
80 #endif
81+#endif /* !CONFIG_GCC_ATOMIC_BUILTINS */
82
83 #if defined(CONFIG_USER_ONLY)
84 static inline void spin_lock(spinlock_t *lock)
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/enable-i386-linux-user.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/enable-i386-linux-user.patch
index 95420ef99e..3cf0953f10 100644
--- a/meta/recipes-devtools/qemu/qemu-0.13.0/enable-i386-linux-user.patch
+++ b/meta/recipes-devtools/qemu/qemu-0.14.0/enable-i386-linux-user.patch
@@ -2,11 +2,11 @@ Enable i386-linux-user
2 2
3Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> 3Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
4 4
5Index: qemu-0.13.0/Makefile.target 5Index: qemu-0.14.0/Makefile.target
6=================================================================== 6===================================================================
7--- qemu-0.13.0.orig/Makefile.target 2011-01-17 16:50:39.000000000 +0800 7--- qemu-0.14.0.orig/Makefile.target
8+++ qemu-0.13.0/Makefile.target 2011-01-17 16:50:41.000000000 +0800 8+++ qemu-0.14.0/Makefile.target
9@@ -54,8 +54,13 @@ 9@@ -78,8 +78,13 @@ ifeq ($(TARGET_BASE_ARCH), i386)
10 libobj-y += cpuid.o 10 libobj-y += cpuid.o
11 endif 11 endif
12 libobj-$(CONFIG_NEED_MMU) += mmu.o 12 libobj-$(CONFIG_NEED_MMU) += mmu.o
@@ -20,10 +20,10 @@ Index: qemu-0.13.0/Makefile.target
20 libobj-$(TARGET_ARM) += dummygl.o 20 libobj-$(TARGET_ARM) += dummygl.o
21 libobj-$(TARGET_MIPS) += dummygl.o 21 libobj-$(TARGET_MIPS) += dummygl.o
22 libobj-$(TARGET_PPC) += dummygl.o 22 libobj-$(TARGET_PPC) += dummygl.o
23Index: qemu-0.13.0/target-i386/dummygl.c 23Index: qemu-0.14.0/target-i386/dummygl.c
24=================================================================== 24===================================================================
25--- /dev/null 1970-01-01 00:00:00.000000000 +0000 25--- /dev/null
26+++ qemu-0.13.0/target-i386/dummygl.c 2011-01-17 16:50:41.000000000 +0800 26+++ qemu-0.14.0/target-i386/dummygl.c
27@@ -0,0 +1,26 @@ 27@@ -0,0 +1,26 @@
28+#include <string.h> 28+#include <string.h>
29+#include <stdlib.h> 29+#include <stdlib.h>
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/fallback-to-safe-mmap_min_addr.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/fallback-to-safe-mmap_min_addr.patch
index 7c782b92a4..4b1a64fdf9 100644
--- a/meta/recipes-devtools/qemu/qemu-0.13.0/fallback-to-safe-mmap_min_addr.patch
+++ b/meta/recipes-devtools/qemu/qemu-0.14.0/fallback-to-safe-mmap_min_addr.patch
@@ -8,10 +8,10 @@ Subject: [PATCH] linux-user: use default mmap_min_addr 65536 when /proc/sys/vm/m
8 linux-user/main.c | 5 +++++ 8 linux-user/main.c | 5 +++++
9 1 files changed, 5 insertions(+), 0 deletions(-) 9 1 files changed, 5 insertions(+), 0 deletions(-)
10 10
11Index: qemu-0.13.0/linux-user/main.c 11Index: qemu-0.14.0/linux-user/main.c
12=================================================================== 12===================================================================
13--- qemu-0.13.0.orig/linux-user/main.c 13--- qemu-0.14.0.orig/linux-user/main.c
14+++ qemu-0.13.0/linux-user/main.c 14+++ qemu-0.14.0/linux-user/main.c
15@@ -36,6 +36,7 @@ 15@@ -36,6 +36,7 @@
16 #include "envlist.h" 16 #include "envlist.h"
17 17
@@ -20,7 +20,7 @@ Index: qemu-0.13.0/linux-user/main.c
20 20
21 char *exec_path; 21 char *exec_path;
22 22
23@@ -2973,8 +2974,14 @@ int main(int argc, char **argv, char **e 23@@ -3010,8 +3011,14 @@ int main(int argc, char **argv, char **e
24 if (fscanf(fp, "%lu", &tmp) == 1) { 24 if (fscanf(fp, "%lu", &tmp) == 1) {
25 mmap_min_addr = tmp; 25 mmap_min_addr = tmp;
26 qemu_log("host mmap_min_addr=0x%lx\n", mmap_min_addr); 26 qemu_log("host mmap_min_addr=0x%lx\n", mmap_min_addr);
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/fix-configure-checks.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/fix-configure-checks.patch
index 46ddc6e206..574b430b44 100644
--- a/meta/recipes-devtools/qemu/qemu-0.13.0/fix-configure-checks.patch
+++ b/meta/recipes-devtools/qemu/qemu-0.14.0/fix-configure-checks.patch
@@ -6,15 +6,15 @@ added and files in the sysroot can be found.
6 6
7Patch from Paul Eggleton, Comments by RP 28/11/10 7Patch from Paul Eggleton, Comments by RP 28/11/10
8 8
9Index: qemu-0.13.0/configure 9Index: qemu-0.14.0/configure
10=================================================================== 10===================================================================
11--- qemu-0.13.0.orig/configure 2010-10-16 04:56:09.000000000 +0800 11--- qemu-0.14.0.orig/configure
12+++ qemu-0.13.0/configure 2011-01-15 18:19:41.000000000 +0800 12+++ qemu-0.14.0/configure
13@@ -134,6 +134,7 @@ 13@@ -229,6 +229,7 @@ QEMU_CFLAGS="-Wstrict-prototypes -Wredun
14 QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS" 14 QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
15 QEMU_CFLAGS="-D_FORTIFY_SOURCE=2 $QEMU_CFLAGS" 15 QEMU_CFLAGS="-D_FORTIFY_SOURCE=2 $QEMU_CFLAGS"
16 QEMU_CFLAGS="-I. -I\$(SRC_PATH) $QEMU_CFLAGS" 16 QEMU_INCLUDES="-I. -I\$(SRC_PATH)"
17+QEMU_CFLAGS="$QEMU_CFLAGS $CFLAGS" 17+QEMU_CFLAGS="$QEMU_CFLAGS $CFLAGS"
18 LDFLAGS="-g $LDFLAGS" 18 LDFLAGS="-g $LDFLAGS"
19 19
20 gcc_flags="-Wold-style-declaration -Wold-style-definition -fstack-protector-all" 20 # make source path absolute
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/fix-nogl.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/fix-nogl.patch
index fa518abbf7..0219cc8121 100644
--- a/meta/recipes-devtools/qemu/qemu-0.13.0/fix-nogl.patch
+++ b/meta/recipes-devtools/qemu/qemu-0.14.0/fix-nogl.patch
@@ -1,22 +1,24 @@
1Index: qemu-0.13.0/Makefile.target 1Index: qemu-0.14.0/Makefile.target
2=================================================================== 2===================================================================
3--- qemu-0.13.0.orig/Makefile.target 2011-01-17 16:53:08.000000000 +0800 3--- qemu-0.14.0.orig/Makefile.target
4+++ qemu-0.13.0/Makefile.target 2011-01-17 16:53:11.000000000 +0800 4+++ qemu-0.14.0/Makefile.target
5@@ -55,6 +55,10 @@ 5@@ -79,6 +79,12 @@ libobj-y += cpuid.o
6 endif 6 endif
7 libobj-$(CONFIG_NEED_MMU) += mmu.o 7 libobj-$(CONFIG_NEED_MMU) += mmu.o
8 libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o 8 libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
9+libobj-$(TARGET_X86_64) += helper_opengl.o opengl_exec.o 9+libobj-$(TARGET_X86_64) += helper_opengl.o opengl_exec.o
10+libobj-$(TARGET_ARM) += dummygl.o 10+libobj-$(TARGET_ARM) += dummygl.o
11+libobj-$(TARGET_MIPS) += dummygl.o 11+libobj-$(TARGET_MIPS) += dummygl.o
12+libobj-$(TARGET_MIPS64) += dummygl.o
12+libobj-$(TARGET_PPC) += dummygl.o 13+libobj-$(TARGET_PPC) += dummygl.o
14+libobj-$(TARGET_SH4) += dummygl.o
13 libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o 15 libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
14 16
15 libobj-y += disas.o 17 libobj-y += disas.o
16Index: qemu-0.13.0/target-arm/dummygl.c 18Index: qemu-0.14.0/target-arm/dummygl.c
17=================================================================== 19===================================================================
18--- /dev/null 1970-01-01 00:00:00.000000000 +0000 20--- /dev/null
19+++ qemu-0.13.0/target-arm/dummygl.c 2011-01-17 16:53:11.000000000 +0800 21+++ qemu-0.14.0/target-arm/dummygl.c
20@@ -0,0 +1,22 @@ 22@@ -0,0 +1,22 @@
21+#include <string.h> 23+#include <string.h>
22+#include <stdlib.h> 24+#include <stdlib.h>
@@ -40,10 +42,10 @@ Index: qemu-0.13.0/target-arm/dummygl.c
40+{ 42+{
41+ 43+
42+} 44+}
43Index: qemu-0.13.0/target-mips/dummygl.c 45Index: qemu-0.14.0/target-mips/dummygl.c
44=================================================================== 46===================================================================
45--- /dev/null 1970-01-01 00:00:00.000000000 +0000 47--- /dev/null
46+++ qemu-0.13.0/target-mips/dummygl.c 2011-01-17 16:53:11.000000000 +0800 48+++ qemu-0.14.0/target-mips/dummygl.c
47@@ -0,0 +1,22 @@ 49@@ -0,0 +1,22 @@
48+#include <string.h> 50+#include <string.h>
49+#include <stdlib.h> 51+#include <stdlib.h>
@@ -67,10 +69,37 @@ Index: qemu-0.13.0/target-mips/dummygl.c
67+{ 69+{
68+ 70+
69+} 71+}
70Index: qemu-0.13.0/target-ppc/dummygl.c 72Index: qemu-0.14.0/target-ppc/dummygl.c
71=================================================================== 73===================================================================
72--- /dev/null 1970-01-01 00:00:00.000000000 +0000 74--- /dev/null
73+++ qemu-0.13.0/target-ppc/dummygl.c 2011-01-17 16:53:11.000000000 +0800 75+++ qemu-0.14.0/target-ppc/dummygl.c
76@@ -0,0 +1,22 @@
77+#include <string.h>
78+#include <stdlib.h>
79+#include <assert.h>
80+#include <stdint.h>
81+#include <X11/Xlib.h>
82+#include <X11/Xutil.h>
83+
84+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
85+{
86+
87+}
88+
89+void opengl_process_enable(void)
90+{
91+
92+}
93+
94+
95+void mem_opengl(uint64_t ptr)
96+{
97+
98+}
99Index: qemu-0.14.0/target-sh4/dummygl.c
100===================================================================
101--- /dev/null
102+++ qemu-0.14.0/target-sh4/dummygl.c
74@@ -0,0 +1,22 @@ 103@@ -0,0 +1,22 @@
75+#include <string.h> 104+#include <string.h>
76+#include <stdlib.h> 105+#include <stdlib.h>
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/init-info.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/init-info.patch
index 77022ae541..8df60e85e7 100644
--- a/meta/recipes-devtools/qemu/qemu-0.13.0/init-info.patch
+++ b/meta/recipes-devtools/qemu/qemu-0.14.0/init-info.patch
@@ -2,11 +2,11 @@
2# makes info.info.x11.display zero and avoids the calls to 2# makes info.info.x11.display zero and avoids the calls to
3# opengl_exec_set_parent_window, one of which is crashing. 3# opengl_exec_set_parent_window, one of which is crashing.
4 4
5Index: qemu-0.13.0/ui/sdl.c 5Index: qemu-0.14.0/ui/sdl.c
6=================================================================== 6===================================================================
7--- qemu-0.13.0.orig/ui/sdl.c 2011-01-15 17:40:59.000000000 +0800 7--- qemu-0.14.0.orig/ui/sdl.c
8+++ qemu-0.13.0/ui/sdl.c 2011-01-15 17:41:04.000000000 +0800 8+++ qemu-0.14.0/ui/sdl.c
9@@ -857,6 +857,7 @@ 9@@ -863,6 +863,7 @@ void sdl_display_init(DisplayState *ds,
10 vi = SDL_GetVideoInfo(); 10 vi = SDL_GetVideoInfo();
11 host_format = *(vi->vfmt); 11 host_format = *(vi->vfmt);
12 12
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/larger_default_ram_size.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/larger_default_ram_size.patch
new file mode 100644
index 0000000000..8928bd5e06
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.14.0/larger_default_ram_size.patch
@@ -0,0 +1,20 @@
1This patch is taken from debian. 128M is too less sometimes if distro
2with lot of packages is booted so this patch raises the default to 384M
3
4It has not been applied to upstream qemu
5
6Khem Raj <raj.khem@gmail.com>
7
8Index: qemu-0.14.0/vl.c
9===================================================================
10--- qemu-0.14.0.orig/vl.c
11+++ qemu-0.14.0/vl.c
12@@ -168,7 +168,7 @@ int main(int argc, char **argv)
13 //#define DEBUG_NET
14 //#define DEBUG_SLIRP
15
16-#define DEFAULT_RAM_SIZE 128
17+#define DEFAULT_RAM_SIZE 384
18
19 #define MAX_VIRTIO_CONSOLES 1
20
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/linker-flags.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/linker-flags.patch
index 54c480f94b..470cf80cde 100644
--- a/meta/recipes-devtools/qemu/qemu-0.13.0/linker-flags.patch
+++ b/meta/recipes-devtools/qemu/qemu-0.14.0/linker-flags.patch
@@ -7,11 +7,11 @@ More information is available on the Fedora Wiki:
7https://fedoraproject.org/wiki/UnderstandingDSOLinkChange 7https://fedoraproject.org/wiki/UnderstandingDSOLinkChange
8 8
9JL - 15/06/10 9JL - 15/06/10
10Index: qemu-0.13.0/Makefile.target 10Index: qemu-0.14.0/Makefile.target
11=================================================================== 11===================================================================
12--- qemu-0.13.0.orig/Makefile.target 2011-01-15 17:30:45.000000000 +0800 12--- qemu-0.14.0.orig/Makefile.target
13+++ qemu-0.13.0/Makefile.target 2011-01-15 17:33:22.000000000 +0800 13+++ qemu-0.14.0/Makefile.target
14@@ -193,7 +193,7 @@ 14@@ -218,7 +218,7 @@ obj-$(CONFIG_REALLY_VIRTFS) += virtio-9p
15 obj-y += rwhandler.o 15 obj-y += rwhandler.o
16 obj-$(CONFIG_KVM) += kvm.o kvm-all.o 16 obj-$(CONFIG_KVM) += kvm.o kvm-all.o
17 obj-$(CONFIG_NO_KVM) += kvm-stub.o 17 obj-$(CONFIG_NO_KVM) += kvm-stub.o
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/no-strip.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/no-strip.patch
new file mode 100644
index 0000000000..cf0d659724
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.14.0/no-strip.patch
@@ -0,0 +1,13 @@
1Index: qemu-0.14.0/Makefile
2===================================================================
3--- qemu-0.14.0.orig/Makefile
4+++ qemu-0.14.0/Makefile
5@@ -235,7 +235,7 @@ install-sysconfig:
6 install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig
7 $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
8 ifneq ($(TOOLS),)
9- $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
10+ $(INSTALL_PROG) $(TOOLS) "$(DESTDIR)$(bindir)"
11 endif
12 ifneq ($(BLOBS),)
13 $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/qemu-git-qemugl-host.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/qemu-git-qemugl-host.patch
index 085477c575..92467a7651 100644
--- a/meta/recipes-devtools/qemu/qemu-0.13.0/qemu-git-qemugl-host.patch
+++ b/meta/recipes-devtools/qemu/qemu-0.14.0/qemu-git-qemugl-host.patch
@@ -1,8 +1,8 @@
1Index: qemu-0.13.0/Makefile.target 1Index: qemu-0.14.0/Makefile.target
2=================================================================== 2===================================================================
3--- qemu-0.13.0.orig/Makefile.target 2011-01-17 16:41:59.000000000 +0800 3--- qemu-0.14.0.orig/Makefile.target
4+++ qemu-0.13.0/Makefile.target 2011-01-17 16:42:36.000000000 +0800 4+++ qemu-0.14.0/Makefile.target
5@@ -54,6 +54,7 @@ 5@@ -78,6 +78,7 @@ ifeq ($(TARGET_BASE_ARCH), i386)
6 libobj-y += cpuid.o 6 libobj-y += cpuid.o
7 endif 7 endif
8 libobj-$(CONFIG_NEED_MMU) += mmu.o 8 libobj-$(CONFIG_NEED_MMU) += mmu.o
@@ -10,7 +10,7 @@ Index: qemu-0.13.0/Makefile.target
10 libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o 10 libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
11 11
12 libobj-y += disas.o 12 libobj-y += disas.o
13@@ -76,6 +77,21 @@ 13@@ -100,6 +101,21 @@ op_helper.o cpu-exec.o: QEMU_CFLAGS += $
14 # cpu_signal_handler() in cpu-exec.c. 14 # cpu_signal_handler() in cpu-exec.c.
15 signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS) 15 signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
16 16
@@ -32,9 +32,9 @@ Index: qemu-0.13.0/Makefile.target
32 ######################################################### 32 #########################################################
33 # Linux user emulator target 33 # Linux user emulator target
34 34
35@@ -202,6 +218,10 @@ 35@@ -221,6 +237,10 @@ obj-i386-y += debugcon.o multiboot.o
36 obj-i386-y += debugcon.o multiboot.o
37 obj-i386-y += pc_piix.o 36 obj-i386-y += pc_piix.o
37 obj-i386-$(CONFIG_SPICE) += qxl.o qxl-logger.o qxl-render.o
38 38
39+ifeq ($(TARGET_BASE_ARCH), i386) 39+ifeq ($(TARGET_BASE_ARCH), i386)
40+QEMU_CFLAGS += -DTARGET_OPENGL_OK 40+QEMU_CFLAGS += -DTARGET_OPENGL_OK
@@ -43,20 +43,20 @@ Index: qemu-0.13.0/Makefile.target
43 # shared objects 43 # shared objects
44 obj-ppc-y = ppc.o 44 obj-ppc-y = ppc.o
45 obj-ppc-y += vga.o 45 obj-ppc-y += vga.o
46@@ -301,6 +321,8 @@ 46@@ -331,6 +351,8 @@ main.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
47 47
48 monitor.o: qemu-monitor.h 48 monitor.o: hmp-commands.h qmp-commands.h
49 49
50+LIBS += -lGL -lGLU 50+LIBS += -lGL -lGLU
51+ 51+
52 $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS) 52 $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
53 53
54 obj-y += $(addprefix ../, $(common-obj-y)) 54 obj-y += $(addprefix ../, $(common-obj-y))
55Index: qemu-0.13.0/hw/pixel_ops.h 55Index: qemu-0.14.0/hw/pixel_ops.h
56=================================================================== 56===================================================================
57--- qemu-0.13.0.orig/hw/pixel_ops.h 2011-01-17 16:41:59.000000000 +0800 57--- qemu-0.14.0.orig/hw/pixel_ops.h
58+++ qemu-0.13.0/hw/pixel_ops.h 2011-01-17 16:42:36.000000000 +0800 58+++ qemu-0.14.0/hw/pixel_ops.h
59@@ -4,6 +4,12 @@ 59@@ -4,6 +4,12 @@ static inline unsigned int rgb_to_pixel8
60 return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6); 60 return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6);
61 } 61 }
62 62
@@ -69,20 +69,20 @@ Index: qemu-0.13.0/hw/pixel_ops.h
69 static inline unsigned int rgb_to_pixel15(unsigned int r, unsigned int g, 69 static inline unsigned int rgb_to_pixel15(unsigned int r, unsigned int g,
70 unsigned int b) 70 unsigned int b)
71 { 71 {
72Index: qemu-0.13.0/hw/vmware_vga.c 72Index: qemu-0.14.0/hw/vmware_vga.c
73=================================================================== 73===================================================================
74--- qemu-0.13.0.orig/hw/vmware_vga.c 2011-01-17 16:41:59.000000000 +0800 74--- qemu-0.14.0.orig/hw/vmware_vga.c
75+++ qemu-0.13.0/hw/vmware_vga.c 2011-01-17 16:42:36.000000000 +0800 75+++ qemu-0.14.0/hw/vmware_vga.c
76@@ -519,6 +519,8 @@ 76@@ -517,6 +517,8 @@ static inline void vmsvga_cursor_define(
77 77
78 #define CMD(f) le32_to_cpu(s->cmd->f) 78 #define CMD(f) le32_to_cpu(s->cmd->f)
79 79
80+static uint32_t last_cmd; 80+static uint32_t last_cmd;
81+ 81+
82 static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s) 82 static inline int vmsvga_fifo_length(struct vmsvga_state_s *s)
83 { 83 {
84 if (!s->config || !s->enable) 84 int num;
85@@ -528,11 +530,18 @@ 85@@ -530,11 +532,18 @@ static inline int vmsvga_fifo_length(str
86 86
87 static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s) 87 static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s)
88 { 88 {
@@ -105,49 +105,51 @@ Index: qemu-0.13.0/hw/vmware_vga.c
105 } 105 }
106 106
107 static inline uint32_t vmsvga_fifo_read(struct vmsvga_state_s *s) 107 static inline uint32_t vmsvga_fifo_read(struct vmsvga_state_s *s)
108@@ -542,12 +551,12 @@ 108@@ -544,7 +553,7 @@ static inline uint32_t vmsvga_fifo_read(
109 109
110 static void vmsvga_fifo_run(struct vmsvga_state_s *s) 110 static void vmsvga_fifo_run(struct vmsvga_state_s *s)
111 { 111 {
112- uint32_t cmd, colour; 112- uint32_t cmd, colour;
113+ uint32_t colour; 113+ uint32_t colour;
114 int args = 0; 114 int args, len;
115 int x, y, dx, dy, width, height; 115 int x, y, dx, dy, width, height;
116 struct vmsvga_cursor_definition_s cursor; 116 struct vmsvga_cursor_definition_s cursor;
117 while (!vmsvga_fifo_empty(s)) 117@@ -555,7 +564,7 @@ static void vmsvga_fifo_run(struct vmsvg
118 /* May need to go back to the start of the command if incomplete */
119 cmd_start = s->cmd->stop;
120
118- switch (cmd = vmsvga_fifo_read(s)) { 121- switch (cmd = vmsvga_fifo_read(s)) {
119+ switch (last_cmd = vmsvga_fifo_read(s)) { 122+ switch (last_cmd = vmsvga_fifo_read(s)) {
120 case SVGA_CMD_UPDATE: 123 case SVGA_CMD_UPDATE:
121 case SVGA_CMD_UPDATE_VERBOSE: 124 case SVGA_CMD_UPDATE_VERBOSE:
122 x = vmsvga_fifo_read(s); 125 len -= 5;
123@@ -654,7 +663,7 @@ 126@@ -695,7 +704,7 @@ static void vmsvga_fifo_run(struct vmsvg
124 while (args --) 127 while (args --)
125 vmsvga_fifo_read(s); 128 vmsvga_fifo_read(s);
126 printf("%s: Unknown command 0x%02x in SVGA command FIFO\n", 129 printf("%s: Unknown command 0x%02x in SVGA command FIFO\n",
127- __FUNCTION__, cmd); 130- __FUNCTION__, cmd);
128+ __FUNCTION__, last_cmd); 131+ __FUNCTION__, last_cmd);
129 break; 132 break;
130 }
131
132@@ -1173,6 +1182,12 @@
133
134 vga_init_vbe(&s->vga);
135 133
134 rewind:
135@@ -1216,6 +1225,11 @@ static void vmsvga_init(struct vmsvga_st
136 vga_common_init(&s->vga, vga_ram_size);
137 vga_init(&s->vga);
138 vmstate_register(NULL, 0, &vmstate_vga_common, &s->vga);
136+#ifdef EMBED_STDVGA 139+#ifdef EMBED_STDVGA
137+ s->vga.map_addr = VBE_DISPI_LFB_PHYSICAL_ADDRESS; 140+ s->vga.map_addr = VBE_DISPI_LFB_PHYSICAL_ADDRESS;
138+ s->vga.map_end = VBE_DISPI_LFB_PHYSICAL_ADDRESS + vga_ram_size; 141+ s->vga.map_end = VBE_DISPI_LFB_PHYSICAL_ADDRESS + vga_ram_size;
139+ vga_dirty_log_start(s); 142+ vga_dirty_log_start(s);
140+#endif 143+#endif
141+
142 rom_add_vga(VGABIOS_FILENAME);
143 144
144 vmsvga_reset(s); 145 vmsvga_reset(s);
145Index: qemu-0.13.0/qemu-char.c 146 }
147Index: qemu-0.14.0/qemu-char.c
146=================================================================== 148===================================================================
147--- qemu-0.13.0.orig/qemu-char.c 2011-01-17 16:41:59.000000000 +0800 149--- qemu-0.14.0.orig/qemu-char.c
148+++ qemu-0.13.0/qemu-char.c 2011-01-17 16:42:36.000000000 +0800 150+++ qemu-0.14.0/qemu-char.c
149@@ -2278,6 +2278,69 @@ 151@@ -2334,6 +2334,69 @@ size_t qemu_chr_mem_osize(const CharDriv
150 return NULL; 152 return d->outbuf_size;
151 } 153 }
152 154
153+#define TARGET_OPENGL_OK 155+#define TARGET_OPENGL_OK
@@ -216,7 +218,7 @@ Index: qemu-0.13.0/qemu-char.c
216 QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename) 218 QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
217 { 219 {
218 char host[65], port[33], width[8], height[8]; 220 char host[65], port[33], width[8], height[8];
219@@ -2396,6 +2459,10 @@ 221@@ -2452,6 +2515,10 @@ QemuOpts *qemu_chr_parse_compat(const ch
220 qemu_opt_set(opts, "path", filename); 222 qemu_opt_set(opts, "path", filename);
221 return opts; 223 return opts;
222 } 224 }
@@ -227,7 +229,7 @@ Index: qemu-0.13.0/qemu-char.c
227 229
228 fail: 230 fail:
229 qemu_opts_del(opts); 231 qemu_opts_del(opts);
230@@ -2411,6 +2478,7 @@ 232@@ -2467,6 +2534,7 @@ static const struct {
231 { .name = "udp", .open = qemu_chr_open_udp }, 233 { .name = "udp", .open = qemu_chr_open_udp },
232 { .name = "msmouse", .open = qemu_chr_open_msmouse }, 234 { .name = "msmouse", .open = qemu_chr_open_msmouse },
233 { .name = "vc", .open = text_console_init }, 235 { .name = "vc", .open = text_console_init },
@@ -235,10 +237,10 @@ Index: qemu-0.13.0/qemu-char.c
235 #ifdef _WIN32 237 #ifdef _WIN32
236 { .name = "file", .open = qemu_chr_open_win_file_out }, 238 { .name = "file", .open = qemu_chr_open_win_file_out },
237 { .name = "pipe", .open = qemu_chr_open_win_pipe }, 239 { .name = "pipe", .open = qemu_chr_open_win_pipe },
238Index: qemu-0.13.0/slirp/udp.c 240Index: qemu-0.14.0/slirp/udp.c
239=================================================================== 241===================================================================
240--- qemu-0.13.0.orig/slirp/udp.c 2011-01-17 16:41:59.000000000 +0800 242--- qemu-0.14.0.orig/slirp/udp.c
241+++ qemu-0.13.0/slirp/udp.c 2011-01-17 16:42:36.000000000 +0800 243+++ qemu-0.14.0/slirp/udp.c
242@@ -40,6 +40,7 @@ 244@@ -40,6 +40,7 @@
243 245
244 #include <slirp.h> 246 #include <slirp.h>
@@ -247,7 +249,7 @@ Index: qemu-0.13.0/slirp/udp.c
247 249
248 static uint8_t udp_tos(struct socket *so); 250 static uint8_t udp_tos(struct socket *so);
249 251
250@@ -125,6 +126,11 @@ 252@@ -125,6 +126,11 @@ udp_input(register struct mbuf *m, int i
251 goto bad; 253 goto bad;
252 } 254 }
253 255
@@ -259,11 +261,11 @@ Index: qemu-0.13.0/slirp/udp.c
259 if (slirp->restricted) { 261 if (slirp->restricted) {
260 goto bad; 262 goto bad;
261 } 263 }
262Index: qemu-0.13.0/sysemu.h 264Index: qemu-0.14.0/sysemu.h
263=================================================================== 265===================================================================
264--- qemu-0.13.0.orig/sysemu.h 2011-01-17 16:41:59.000000000 +0800 266--- qemu-0.14.0.orig/sysemu.h
265+++ qemu-0.13.0/sysemu.h 2011-01-17 16:42:36.000000000 +0800 267+++ qemu-0.14.0/sysemu.h
266@@ -133,6 +133,7 @@ 268@@ -136,6 +136,7 @@ extern int semihosting_enabled;
267 extern int old_param; 269 extern int old_param;
268 extern int boot_menu; 270 extern int boot_menu;
269 extern QEMUClock *rtc_clock; 271 extern QEMUClock *rtc_clock;
@@ -271,10 +273,10 @@ Index: qemu-0.13.0/sysemu.h
271 273
272 #define MAX_NODES 64 274 #define MAX_NODES 64
273 extern int nb_numa_nodes; 275 extern int nb_numa_nodes;
274Index: qemu-0.13.0/target-i386/beginend_funcs.sh 276Index: qemu-0.14.0/target-i386/beginend_funcs.sh
275=================================================================== 277===================================================================
276--- /dev/null 1970-01-01 00:00:00.000000000 +0000 278--- /dev/null
277+++ qemu-0.13.0/target-i386/beginend_funcs.sh 2011-01-17 16:42:36.000000000 +0800 279+++ qemu-0.14.0/target-i386/beginend_funcs.sh
278@@ -0,0 +1,23 @@ 280@@ -0,0 +1,23 @@
279+#! /bin/sh 281+#! /bin/sh
280+# Copyright 2008 (C) Intel Corporation 282+# Copyright 2008 (C) Intel Corporation
@@ -299,10 +301,10 @@ Index: qemu-0.13.0/target-i386/beginend_funcs.sh
299+echo -e MAGIC_MACRO\(glCallList\)\\n 301+echo -e MAGIC_MACRO\(glCallList\)\\n
300+echo -e MAGIC_MACRO\(glCallLists\)\\n 302+echo -e MAGIC_MACRO\(glCallLists\)\\n
301+echo -e MAGIC_MACRO\(glEdgeFlag{,v}\)\\n 303+echo -e MAGIC_MACRO\(glEdgeFlag{,v}\)\\n
302Index: qemu-0.13.0/target-i386/ghash.c 304Index: qemu-0.14.0/target-i386/ghash.c
303=================================================================== 305===================================================================
304--- /dev/null 1970-01-01 00:00:00.000000000 +0000 306--- /dev/null
305+++ qemu-0.13.0/target-i386/ghash.c 2011-01-17 16:42:36.000000000 +0800 307+++ qemu-0.14.0/target-i386/ghash.c
306@@ -0,0 +1,347 @@ 308@@ -0,0 +1,347 @@
307+/* This is a modified and simplified version of original ghash.c */ 309+/* This is a modified and simplified version of original ghash.c */
308+ 310+
@@ -651,10 +653,10 @@ Index: qemu-0.13.0/target-i386/ghash.c
651+ hash_node = next; 653+ hash_node = next;
652+ } 654+ }
653+} 655+}
654Index: qemu-0.13.0/target-i386/ghash.h 656Index: qemu-0.14.0/target-i386/ghash.h
655=================================================================== 657===================================================================
656--- /dev/null 1970-01-01 00:00:00.000000000 +0000 658--- /dev/null
657+++ qemu-0.13.0/target-i386/ghash.h 2011-01-17 16:42:36.000000000 +0800 659+++ qemu-0.14.0/target-i386/ghash.h
658@@ -0,0 +1,59 @@ 660@@ -0,0 +1,59 @@
659+/* This is a modified and simplified version of original ghash.h */ 661+/* This is a modified and simplified version of original ghash.h */
660+ 662+
@@ -715,10 +717,10 @@ Index: qemu-0.13.0/target-i386/ghash.h
715+ 717+
716+#endif /* __SIMPLE_HASH_H__ */ 718+#endif /* __SIMPLE_HASH_H__ */
717+ 719+
718Index: qemu-0.13.0/target-i386/gl_func_perso.h 720Index: qemu-0.14.0/target-i386/gl_func_perso.h
719=================================================================== 721===================================================================
720--- /dev/null 1970-01-01 00:00:00.000000000 +0000 722--- /dev/null
721+++ qemu-0.13.0/target-i386/gl_func_perso.h 2011-01-17 16:42:36.000000000 +0800 723+++ qemu-0.14.0/target-i386/gl_func_perso.h
722@@ -0,0 +1,135 @@ 724@@ -0,0 +1,135 @@
723+/* 725+/*
724+ * Hand-implemented GL/GLX API 726+ * Hand-implemented GL/GLX API
@@ -855,11 +857,11 @@ Index: qemu-0.13.0/target-i386/gl_func_perso.h
855+MAGIC_MACRO(_glGetSelectBuffer_fake), 857+MAGIC_MACRO(_glGetSelectBuffer_fake),
856+MAGIC_MACRO(_glFeedbackBuffer_fake), 858+MAGIC_MACRO(_glFeedbackBuffer_fake),
857+MAGIC_MACRO(_glGetFeedbackBuffer_fake), 859+MAGIC_MACRO(_glGetFeedbackBuffer_fake),
858Index: qemu-0.13.0/target-i386/helper.c 860Index: qemu-0.14.0/target-i386/helper.c
859=================================================================== 861===================================================================
860--- qemu-0.13.0.orig/target-i386/helper.c 2011-01-17 16:41:59.000000000 +0800 862--- qemu-0.14.0.orig/target-i386/helper.c
861+++ qemu-0.13.0/target-i386/helper.c 2011-01-17 16:42:36.000000000 +0800 863+++ qemu-0.14.0/target-i386/helper.c
862@@ -914,7 +914,7 @@ 864@@ -962,7 +962,7 @@ target_phys_addr_t cpu_get_phys_page_deb
863 } 865 }
864 866
865 page_offset = (addr & TARGET_PAGE_MASK) & (page_size - 1); 867 page_offset = (addr & TARGET_PAGE_MASK) & (page_size - 1);
@@ -868,21 +870,21 @@ Index: qemu-0.13.0/target-i386/helper.c
868 return paddr; 870 return paddr;
869 } 871 }
870 872
871Index: qemu-0.13.0/target-i386/helper.h 873Index: qemu-0.14.0/target-i386/helper.h
872=================================================================== 874===================================================================
873--- qemu-0.13.0.orig/target-i386/helper.h 2011-01-17 16:41:59.000000000 +0800 875--- qemu-0.14.0.orig/target-i386/helper.h
874+++ qemu-0.13.0/target-i386/helper.h 2011-01-17 16:42:36.000000000 +0800 876+++ qemu-0.14.0/target-i386/helper.h
875@@ -217,4 +217,6 @@ 877@@ -217,4 +217,6 @@ DEF_HELPER_2(rclq, tl, tl, tl)
876 DEF_HELPER_2(rcrq, tl, tl, tl) 878 DEF_HELPER_2(rcrq, tl, tl, tl)
877 #endif 879 #endif
878 880
879+DEF_HELPER_0(opengl, void) 881+DEF_HELPER_0(opengl, void)
880+ 882+
881 #include "def-helper.h" 883 #include "def-helper.h"
882Index: qemu-0.13.0/target-i386/helper_opengl.c 884Index: qemu-0.14.0/target-i386/helper_opengl.c
883=================================================================== 885===================================================================
884--- /dev/null 1970-01-01 00:00:00.000000000 +0000 886--- /dev/null
885+++ qemu-0.13.0/target-i386/helper_opengl.c 2011-01-17 16:44:27.000000000 +0800 887+++ qemu-0.14.0/target-i386/helper_opengl.c
886@@ -0,0 +1,1207 @@ 888@@ -0,0 +1,1207 @@
887+/* 889+/*
888+ * Host-side implementation of GL/GLX API 890+ * Host-side implementation of GL/GLX API
@@ -1300,7 +1302,7 @@ Index: qemu-0.13.0/target-i386/helper_opengl.c
1300+ 1302+
1301+ printf("oops\n"); 1303+ printf("oops\n");
1302+ 1304+
1303+ /* if (show_stack_from_signal_handler && counter == 1) { struct ucontext* 1305+ /* if (show_stack_from_signal_handler && counter == 1) { struct ucontext*
1304+ * ctxt = (struct ucontext*)ptr; show_stack_from_signal_handler(10, 1306+ * ctxt = (struct ucontext*)ptr; show_stack_from_signal_handler(10,
1305+ * ctxt->uc_mcontext.gregs[REG_EBP], ctxt->uc_mcontext.gregs[REG_ESP]); } */ 1307+ * ctxt->uc_mcontext.gregs[REG_EBP], ctxt->uc_mcontext.gregs[REG_ESP]); } */
1306+ anticrash_handler(ptr); 1308+ anticrash_handler(ptr);
@@ -2091,11 +2093,11 @@ Index: qemu-0.13.0/target-i386/helper_opengl.c
2091+ io_register(); 2093+ io_register();
2092+} 2094+}
2093+#endif 2095+#endif
2094Index: qemu-0.13.0/target-i386/kvm.c 2096Index: qemu-0.14.0/target-i386/kvm.c
2095=================================================================== 2097===================================================================
2096--- qemu-0.13.0.orig/target-i386/kvm.c 2011-01-17 16:41:59.000000000 +0800 2098--- qemu-0.14.0.orig/target-i386/kvm.c
2097+++ qemu-0.13.0/target-i386/kvm.c 2011-01-17 16:42:36.000000000 +0800 2099+++ qemu-0.14.0/target-i386/kvm.c
2098@@ -746,7 +746,7 @@ 2100@@ -957,7 +957,7 @@ static int kvm_get_xcrs(CPUState *env)
2099 #endif 2101 #endif
2100 } 2102 }
2101 2103
@@ -2104,10 +2106,10 @@ Index: qemu-0.13.0/target-i386/kvm.c
2104 { 2106 {
2105 struct kvm_sregs sregs; 2107 struct kvm_sregs sregs;
2106 uint32_t hflags; 2108 uint32_t hflags;
2107Index: qemu-0.13.0/target-i386/mesa_enums.c 2109Index: qemu-0.14.0/target-i386/mesa_enums.c
2108=================================================================== 2110===================================================================
2109--- /dev/null 1970-01-01 00:00:00.000000000 +0000 2111--- /dev/null
2110+++ qemu-0.13.0/target-i386/mesa_enums.c 2011-01-17 16:42:36.000000000 +0800 2112+++ qemu-0.14.0/target-i386/mesa_enums.c
2111@@ -0,0 +1,4890 @@ 2113@@ -0,0 +1,4890 @@
2112+/* DO NOT EDIT - This file generated automatically by gl_enums.py (from Mesa) script */ 2114+/* DO NOT EDIT - This file generated automatically by gl_enums.py (from Mesa) script */
2113+ 2115+
@@ -6999,10 +7001,10 @@ Index: qemu-0.13.0/target-i386/mesa_enums.c
6999+} 7001+}
7000+ 7002+
7001+ 7003+
7002Index: qemu-0.13.0/target-i386/mesa_get.c 7004Index: qemu-0.14.0/target-i386/mesa_get.c
7003=================================================================== 7005===================================================================
7004--- /dev/null 1970-01-01 00:00:00.000000000 +0000 7006--- /dev/null
7005+++ qemu-0.13.0/target-i386/mesa_get.c 2011-01-17 16:42:36.000000000 +0800 7007+++ qemu-0.14.0/target-i386/mesa_get.c
7006@@ -0,0 +1,5563 @@ 7008@@ -0,0 +1,5563 @@
7007+ 7009+
7008+/*** 7010+/***
@@ -12567,10 +12569,10 @@ Index: qemu-0.13.0/target-i386/mesa_get.c
12567+ params[i] = (GLdouble) values[i]; 12569+ params[i] = (GLdouble) values[i];
12568+} 12570+}
12569+ 12571+
12570Index: qemu-0.13.0/target-i386/mesa_gl.h 12572Index: qemu-0.14.0/target-i386/mesa_gl.h
12571=================================================================== 12573===================================================================
12572--- /dev/null 1970-01-01 00:00:00.000000000 +0000 12574--- /dev/null
12573+++ qemu-0.13.0/target-i386/mesa_gl.h 2011-01-17 16:42:36.000000000 +0800 12575+++ qemu-0.14.0/target-i386/mesa_gl.h
12574@@ -0,0 +1,2251 @@ 12576@@ -0,0 +1,2251 @@
12575+/* 12577+/*
12576+ * Mesa 3-D graphics library 12578+ * Mesa 3-D graphics library
@@ -14823,10 +14825,10 @@ Index: qemu-0.13.0/target-i386/mesa_gl.h
14823+#endif 14825+#endif
14824+ 14826+
14825+#endif /* __gl_h_ */ 14827+#endif /* __gl_h_ */
14826Index: qemu-0.13.0/target-i386/mesa_glext.h 14828Index: qemu-0.14.0/target-i386/mesa_glext.h
14827=================================================================== 14829===================================================================
14828--- /dev/null 1970-01-01 00:00:00.000000000 +0000 14830--- /dev/null
14829+++ qemu-0.13.0/target-i386/mesa_glext.h 2011-01-17 16:42:36.000000000 +0800 14831+++ qemu-0.14.0/target-i386/mesa_glext.h
14830@@ -0,0 +1,7279 @@ 14832@@ -0,0 +1,7279 @@
14831+#ifndef __glext_h_ 14833+#ifndef __glext_h_
14832+#define __glext_h_ 14834+#define __glext_h_
@@ -22107,10 +22109,10 @@ Index: qemu-0.13.0/target-i386/mesa_glext.h
22107+ 22109+
22108+/* ERO */ 22110+/* ERO */
22109+GLAPI void GLAPIENTRY fake_gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data); 22111+GLAPI void GLAPIENTRY fake_gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data);
22110Index: qemu-0.13.0/target-i386/mesa_glu.h 22112Index: qemu-0.14.0/target-i386/mesa_glu.h
22111=================================================================== 22113===================================================================
22112--- /dev/null 1970-01-01 00:00:00.000000000 +0000 22114--- /dev/null
22113+++ qemu-0.13.0/target-i386/mesa_glu.h 2011-01-17 16:42:36.000000000 +0800 22115+++ qemu-0.14.0/target-i386/mesa_glu.h
22114@@ -0,0 +1,354 @@ 22116@@ -0,0 +1,354 @@
22115+/* 22117+/*
22116+** License Applicability. Except to the extent portions of this file are 22118+** License Applicability. Except to the extent portions of this file are
@@ -22466,10 +22468,10 @@ Index: qemu-0.13.0/target-i386/mesa_glu.h
22466+#endif 22468+#endif
22467+ 22469+
22468+#endif /* __glu_h__ */ 22470+#endif /* __glu_h__ */
22469Index: qemu-0.13.0/target-i386/mesa_glx.h 22471Index: qemu-0.14.0/target-i386/mesa_glx.h
22470=================================================================== 22472===================================================================
22471--- /dev/null 1970-01-01 00:00:00.000000000 +0000 22473--- /dev/null
22472+++ qemu-0.13.0/target-i386/mesa_glx.h 2011-01-17 16:42:36.000000000 +0800 22474+++ qemu-0.14.0/target-i386/mesa_glx.h
22473@@ -0,0 +1,510 @@ 22475@@ -0,0 +1,510 @@
22474+/* 22476+/*
22475+ * Mesa 3-D graphics library 22477+ * Mesa 3-D graphics library
@@ -22981,10 +22983,10 @@ Index: qemu-0.13.0/target-i386/mesa_glx.h
22981+#endif 22983+#endif
22982+ 22984+
22983+#endif 22985+#endif
22984Index: qemu-0.13.0/target-i386/mesa_glxext.h 22986Index: qemu-0.14.0/target-i386/mesa_glxext.h
22985=================================================================== 22987===================================================================
22986--- /dev/null 1970-01-01 00:00:00.000000000 +0000 22988--- /dev/null
22987+++ qemu-0.13.0/target-i386/mesa_glxext.h 2011-01-17 16:42:36.000000000 +0800 22989+++ qemu-0.14.0/target-i386/mesa_glxext.h
22988@@ -0,0 +1,785 @@ 22990@@ -0,0 +1,785 @@
22989+#ifndef __glxext_h_ 22991+#ifndef __glxext_h_
22990+#define __glxext_h_ 22992+#define __glxext_h_
@@ -22995,7 +22997,7 @@ Index: qemu-0.13.0/target-i386/mesa_glxext.h
22995+ 22997+
22996+/* 22998+/*
22997+** Copyright (c) 2007 The Khronos Group Inc. 22999+** Copyright (c) 2007 The Khronos Group Inc.
22998+** 23000+**
22999+** Permission is hereby granted, free of charge, to any person obtaining a 23001+** Permission is hereby granted, free of charge, to any person obtaining a
23000+** copy of this software and/or associated documentation files (the 23002+** copy of this software and/or associated documentation files (the
23001+** "Materials"), to deal in the Materials without restriction, including 23003+** "Materials"), to deal in the Materials without restriction, including
@@ -23003,10 +23005,10 @@ Index: qemu-0.13.0/target-i386/mesa_glxext.h
23003+** distribute, sublicense, and/or sell copies of the Materials, and to 23005+** distribute, sublicense, and/or sell copies of the Materials, and to
23004+** permit persons to whom the Materials are furnished to do so, subject to 23006+** permit persons to whom the Materials are furnished to do so, subject to
23005+** the following conditions: 23007+** the following conditions:
23006+** 23008+**
23007+** The above copyright notice and this permission notice shall be included 23009+** The above copyright notice and this permission notice shall be included
23008+** in all copies or substantial portions of the Materials. 23010+** in all copies or substantial portions of the Materials.
23009+** 23011+**
23010+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 23012+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23011+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23013+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23012+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23014+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -23771,10 +23773,10 @@ Index: qemu-0.13.0/target-i386/mesa_glxext.h
23771+#endif 23773+#endif
23772+ 23774+
23773+#endif 23775+#endif
23774Index: qemu-0.13.0/target-i386/mesa_mipmap.c 23776Index: qemu-0.14.0/target-i386/mesa_mipmap.c
23775=================================================================== 23777===================================================================
23776--- /dev/null 1970-01-01 00:00:00.000000000 +0000 23778--- /dev/null
23777+++ qemu-0.13.0/target-i386/mesa_mipmap.c 2011-01-17 16:42:36.000000000 +0800 23779+++ qemu-0.14.0/target-i386/mesa_mipmap.c
23778@@ -0,0 +1,824 @@ 23780@@ -0,0 +1,824 @@
23779+ 23781+
23780+/* 23782+/*
@@ -24600,10 +24602,10 @@ Index: qemu-0.13.0/target-i386/mesa_mipmap.c
24600+ 24602+
24601+ return retval; 24603+ return retval;
24602+} 24604+}
24603Index: qemu-0.13.0/target-i386/opengl_exec.c 24605Index: qemu-0.14.0/target-i386/opengl_exec.c
24604=================================================================== 24606===================================================================
24605--- /dev/null 1970-01-01 00:00:00.000000000 +0000 24607--- /dev/null
24606+++ qemu-0.13.0/target-i386/opengl_exec.c 2011-01-17 16:42:36.000000000 +0800 24608+++ qemu-0.14.0/target-i386/opengl_exec.c
24607@@ -0,0 +1,3931 @@ 24609@@ -0,0 +1,3931 @@
24608+/* 24610+/*
24609+ * Host-side implementation of GL/GLX API 24611+ * Host-side implementation of GL/GLX API
@@ -24820,7 +24822,7 @@ Index: qemu-0.13.0/target-i386/opengl_exec.c
24820+ 24822+
24821+ XSync(dpy, 0); 24823+ XSync(dpy, 0);
24822+ 24824+
24823+ /* 24825+ /*
24824+ * int loop = 1; while (loop) { while (XPending(dpy) > 0) { XEvent event; 24826+ * int loop = 1; while (loop) { while (XPending(dpy) > 0) { XEvent event;
24825+ * XNextEvent(dpy, &event); switch (event.type) { case CreateNotify: { if 24827+ * XNextEvent(dpy, &event); switch (event.type) { case CreateNotify: { if
24826+ * (((XCreateWindowEvent*)&event)->window == win) { loop = 0; } break; } } 24828+ * (((XCreateWindowEvent*)&event)->window == win) { loop = 0; } break; } }
@@ -27323,7 +27325,7 @@ Index: qemu-0.13.0/target-i386/opengl_exec.c
27323+ process->current_state->normalPointerSize); 27325+ process->current_state->normalPointerSize);
27324+ memcpy(process->current_state->normalPointer + offset, 27326+ memcpy(process->current_state->normalPointer + offset,
27325+ (void *) args[4], bytes_size); 27327+ (void *) args[4], bytes_size);
27326+ // fprintf(stderr, "glNormalPointer_fake_func type=%d, stride=%d, 27328+ // fprintf(stderr, "glNormalPointer_fake_func type=%d, stride=%d,
27327+ // byte_size=%d\n", type, stride, bytes_size); 27329+ // byte_size=%d\n", type, stride, bytes_size);
27328+ glNormalPointer(type, stride, 27330+ glNormalPointer(type, stride,
27329+ process->current_state->normalPointer); 27331+ process->current_state->normalPointer);
@@ -27547,7 +27549,7 @@ Index: qemu-0.13.0/target-i386/opengl_exec.c
27547+ process->current_state->texCoordPointerSize[index]); 27549+ process->current_state->texCoordPointerSize[index]);
27548+ memcpy(process->current_state->texCoordPointer[index] + offset, 27550+ memcpy(process->current_state->texCoordPointer[index] + offset,
27549+ (void *) args[6], bytes_size); 27551+ (void *) args[6], bytes_size);
27550+ /* fprintf(stderr, "glTexCoordPointer_fake_func size=%d, type=%d, 27552+ /* fprintf(stderr, "glTexCoordPointer_fake_func size=%d, type=%d,
27551+ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */ 27553+ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
27552+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + index); 27554+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + index);
27553+ glTexCoordPointer(size, type, stride, 27555+ glTexCoordPointer(size, type, stride,
@@ -28423,36 +28425,36 @@ Index: qemu-0.13.0/target-i386/opengl_exec.c
28423+ break; 28425+ break;
28424+ } 28426+ }
28425+ 28427+
28426+ /* 28428+ /*
28427+ * case glEnableClientState_func: { if (display_function_call) 28429+ * case glEnableClientState_func: { if (display_function_call)
28428+ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] - 28430+ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
28429+ * GL_VERTEX_ARRAY]); glEnableClientState(args[0]); break; } 28431+ * GL_VERTEX_ARRAY]); glEnableClientState(args[0]); break; }
28430+ * 28432+ *
28431+ * case glDisableClientState_func: { if (display_function_call) 28433+ * case glDisableClientState_func: { if (display_function_call)
28432+ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] - 28434+ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
28433+ * GL_VERTEX_ARRAY]); glDisableClientState(args[0]); break; } 28435+ * GL_VERTEX_ARRAY]); glDisableClientState(args[0]); break; }
28434+ * 28436+ *
28435+ * case glClientActiveTexture_func: case 28437+ * case glClientActiveTexture_func: case
28436+ * glClientActiveTextureARB_func: { if (display_function_call) 28438+ * glClientActiveTextureARB_func: { if (display_function_call)
28437+ * fprintf(stderr, "client activeTexture %d\n", args[0] - 28439+ * fprintf(stderr, "client activeTexture %d\n", args[0] -
28438+ * GL_TEXTURE0_ARB); glClientActiveTextureARB(args[0]); break; } 28440+ * GL_TEXTURE0_ARB); glClientActiveTextureARB(args[0]); break; }
28439+ * 28441+ *
28440+ * case glActiveTextureARB_func: { if (display_function_call) 28442+ * case glActiveTextureARB_func: { if (display_function_call)
28441+ * fprintf(stderr, "server activeTexture %d\n", args[0] - 28443+ * fprintf(stderr, "server activeTexture %d\n", args[0] -
28442+ * GL_TEXTURE0_ARB); glActiveTextureARB(args[0]); break; } 28444+ * GL_TEXTURE0_ARB); glActiveTextureARB(args[0]); break; }
28443+ * 28445+ *
28444+ * case glLockArraysEXT_func: break; 28446+ * case glLockArraysEXT_func: break;
28445+ * 28447+ *
28446+ * case glUnlockArraysEXT_func: break; 28448+ * case glUnlockArraysEXT_func: break;
28447+ * 28449+ *
28448+ * case glArrayElement_func: { glArrayElement(args[0]); break; } 28450+ * case glArrayElement_func: { glArrayElement(args[0]); break; }
28449+ * 28451+ *
28450+ * case glDrawArrays_func: { glDrawArrays(args[0],args[1],args[2]); 28452+ * case glDrawArrays_func: { glDrawArrays(args[0],args[1],args[2]);
28451+ * break; } 28453+ * break; }
28452+ * 28454+ *
28453+ * case glDrawElements_func: { 28455+ * case glDrawElements_func: {
28454+ * glDrawElements(args[0],args[1],args[2],(void*)args[3]); break; } 28456+ * glDrawElements(args[0],args[1],args[2],(void*)args[3]); break; }
28455+ * 28457+ *
28456+ * case glDrawRangeElements_func: { 28458+ * case glDrawRangeElements_func: {
28457+ * glDrawRangeElements(args[0],args[1],args[2],args[3],args[4],(void*)args[5]); 28459+ * glDrawRangeElements(args[0],args[1],args[2],args[3],args[4],(void*)args[5]);
28458+ * break; } */ 28460+ * break; } */
@@ -28536,10 +28538,10 @@ Index: qemu-0.13.0/target-i386/opengl_exec.c
28536+ 28538+
28537+ return ret_int; 28539+ return ret_int;
28538+} 28540+}
28539Index: qemu-0.13.0/target-i386/opengl_func.h 28541Index: qemu-0.14.0/target-i386/opengl_func.h
28540=================================================================== 28542===================================================================
28541--- /dev/null 1970-01-01 00:00:00.000000000 +0000 28543--- /dev/null
28542+++ qemu-0.13.0/target-i386/opengl_func.h 2011-01-17 16:42:36.000000000 +0800 28544+++ qemu-0.14.0/target-i386/opengl_func.h
28543@@ -0,0 +1,1108 @@ 28545@@ -0,0 +1,1108 @@
28544+/* 28546+/*
28545+ * Main header for both host and guest sides 28547+ * Main header for both host and guest sides
@@ -29649,10 +29651,10 @@ Index: qemu-0.13.0/target-i386/opengl_func.h
29649+#error Unsupported ABI 29651+#error Unsupported ABI
29650+#endif 29652+#endif
29651+#endif 29653+#endif
29652Index: qemu-0.13.0/target-i386/opengl_player.c 29654Index: qemu-0.14.0/target-i386/opengl_player.c
29653=================================================================== 29655===================================================================
29654--- /dev/null 1970-01-01 00:00:00.000000000 +0000 29656--- /dev/null
29655+++ qemu-0.13.0/target-i386/opengl_player.c 2011-01-17 16:42:36.000000000 +0800 29657+++ qemu-0.14.0/target-i386/opengl_player.c
29656@@ -0,0 +1,1461 @@ 29658@@ -0,0 +1,1461 @@
29657+/* 29659+/*
29658+ * Plays a sequence of OpenGL calls recorded either under qemu or with opengl_server 29660+ * Plays a sequence of OpenGL calls recorded either under qemu or with opengl_server
@@ -30109,13 +30111,13 @@ Index: qemu-0.13.0/target-i386/opengl_player.c
30109+ } 30111+ }
30110+ // fwrite(&func_number, sizeof(short), 1, fopcodes); 30112+ // fwrite(&func_number, sizeof(short), 1, fopcodes);
30111+ 30113+
30112+ /* 30114+ /*
30113+ * instrWindow[instrWindowPtr] = func_number; instrWindowPtr++; if 30115+ * instrWindow[instrWindowPtr] = func_number; instrWindowPtr++; if
30114+ * (instrWindowPtr == INSTR_WINDOW_SIZE) instrWindowPtr = 0; 30116+ * (instrWindowPtr == INSTR_WINDOW_SIZE) instrWindowPtr = 0;
30115+ * instrWindowCount++; if (instrWindowCount >= INSTR_WINDOW_SIZE) { 30117+ * instrWindowCount++; if (instrWindowCount >= INSTR_WINDOW_SIZE) {
30116+ * if ((instrWindowCount % (INSTR_WINDOW_SIZE / 2)) == 0) 30118+ * if ((instrWindowCount % (INSTR_WINDOW_SIZE / 2)) == 0)
30117+ * find_repeated_seq(instrWindow, instrWindowBeginPtr, 30119+ * find_repeated_seq(instrWindow, instrWindowBeginPtr,
30118+ * INSTR_WINDOW_SIZE); instrWindowBeginPtr++; if (instrWindowBeginPtr 30120+ * INSTR_WINDOW_SIZE); instrWindowBeginPtr++; if (instrWindowBeginPtr
30119+ * == INSTR_WINDOW_SIZE) instrWindowBeginPtr = 0; } */ 30121+ * == INSTR_WINDOW_SIZE) instrWindowBeginPtr = 0; } */
30120+ 30122+
30121+ /* -1 is special code that indicates time synchro */ 30123+ /* -1 is special code that indicates time synchro */
@@ -31115,10 +31117,10 @@ Index: qemu-0.13.0/target-i386/opengl_player.c
31115+ } 31117+ }
31116+ return 0; 31118+ return 0;
31117+} 31119+}
31118Index: qemu-0.13.0/target-i386/opengl_server.c 31120Index: qemu-0.14.0/target-i386/opengl_server.c
31119=================================================================== 31121===================================================================
31120--- /dev/null 1970-01-01 00:00:00.000000000 +0000 31122--- /dev/null
31121+++ qemu-0.13.0/target-i386/opengl_server.c 2011-01-17 16:42:36.000000000 +0800 31123+++ qemu-0.14.0/target-i386/opengl_server.c
31122@@ -0,0 +1,826 @@ 31124@@ -0,0 +1,826 @@
31123+/* 31125+/*
31124+ * TCP/IP OpenGL server 31126+ * TCP/IP OpenGL server
@@ -31946,10 +31948,10 @@ Index: qemu-0.13.0/target-i386/opengl_server.c
31946+ 31948+
31947+ return 0; 31949+ return 0;
31948+} 31950+}
31949Index: qemu-0.13.0/target-i386/opengl_utils.h 31951Index: qemu-0.14.0/target-i386/opengl_utils.h
31950=================================================================== 31952===================================================================
31951--- /dev/null 1970-01-01 00:00:00.000000000 +0000 31953--- /dev/null
31952+++ qemu-0.13.0/target-i386/opengl_utils.h 2011-01-17 16:42:36.000000000 +0800 31954+++ qemu-0.14.0/target-i386/opengl_utils.h
31953@@ -0,0 +1,453 @@ 31955@@ -0,0 +1,453 @@
31954+/* 31956+/*
31955+ * Functions used by host & client sides 31957+ * Functions used by host & client sides
@@ -32404,10 +32406,10 @@ Index: qemu-0.13.0/target-i386/opengl_utils.h
32404+} 32406+}
32405+ 32407+
32406+#endif 32408+#endif
32407Index: qemu-0.13.0/target-i386/parse_gl_h.c 32409Index: qemu-0.14.0/target-i386/parse_gl_h.c
32408=================================================================== 32410===================================================================
32409--- /dev/null 1970-01-01 00:00:00.000000000 +0000 32411--- /dev/null
32410+++ qemu-0.13.0/target-i386/parse_gl_h.c 2011-01-17 16:42:36.000000000 +0800 32412+++ qemu-0.14.0/target-i386/parse_gl_h.c
32411@@ -0,0 +1,1496 @@ 32413@@ -0,0 +1,1496 @@
32412+/* 32414+/*
32413+ * Parse gl.h et glx.h to auto-generate source code 32415+ * Parse gl.h et glx.h to auto-generate source code
@@ -33905,10 +33907,10 @@ Index: qemu-0.13.0/target-i386/parse_gl_h.c
33905+ 33907+
33906+ return 0; 33908+ return 0;
33907+} 33909+}
33908Index: qemu-0.13.0/target-i386/parse_mesa_get_c.c 33910Index: qemu-0.14.0/target-i386/parse_mesa_get_c.c
33909=================================================================== 33911===================================================================
33910--- /dev/null 1970-01-01 00:00:00.000000000 +0000 33912--- /dev/null
33911+++ qemu-0.13.0/target-i386/parse_mesa_get_c.c 2011-01-17 16:42:36.000000000 +0800 33913+++ qemu-0.14.0/target-i386/parse_mesa_get_c.c
33912@@ -0,0 +1,225 @@ 33914@@ -0,0 +1,225 @@
33913+/* 33915+/*
33914+ * Parse the "get.c" from mesa source tree to generate "glgetv_cst.h" 33916+ * Parse the "get.c" from mesa source tree to generate "glgetv_cst.h"
@@ -34135,11 +34137,11 @@ Index: qemu-0.13.0/target-i386/parse_mesa_get_c.c
34135+ fclose(outf); 34137+ fclose(outf);
34136+ return 0; 34138+ return 0;
34137+} 34139+}
34138Index: qemu-0.13.0/target-i386/translate.c 34140Index: qemu-0.14.0/target-i386/translate.c
34139=================================================================== 34141===================================================================
34140--- qemu-0.13.0.orig/target-i386/translate.c 2011-01-17 16:41:59.000000000 +0800 34142--- qemu-0.14.0.orig/target-i386/translate.c
34141+++ qemu-0.13.0/target-i386/translate.c 2011-01-17 16:42:36.000000000 +0800 34143+++ qemu-0.14.0/target-i386/translate.c
34142@@ -745,6 +745,8 @@ 34144@@ -723,6 +723,8 @@ static void gen_check_io(DisasContext *s
34143 int state_saved; 34145 int state_saved;
34144 target_ulong next_eip; 34146 target_ulong next_eip;
34145 34147
@@ -34148,7 +34150,7 @@ Index: qemu-0.13.0/target-i386/translate.c
34148 state_saved = 0; 34150 state_saved = 0;
34149 if (s->pe && (s->cpl > s->iopl || s->vm86)) { 34151 if (s->pe && (s->cpl > s->iopl || s->vm86)) {
34150 if (s->cc_op != CC_OP_DYNAMIC) 34152 if (s->cc_op != CC_OP_DYNAMIC)
34151@@ -2672,11 +2674,18 @@ 34153@@ -2650,11 +2652,18 @@ static void gen_exception(DisasContext *
34152 s->is_jmp = DISAS_TB_JUMP; 34154 s->is_jmp = DISAS_TB_JUMP;
34153 } 34155 }
34154 34156
@@ -34167,11 +34169,11 @@ Index: qemu-0.13.0/target-i386/translate.c
34167 if (s->cc_op != CC_OP_DYNAMIC) 34169 if (s->cc_op != CC_OP_DYNAMIC)
34168 gen_op_set_cc_op(s->cc_op); 34170 gen_op_set_cc_op(s->cc_op);
34169 gen_jmp_im(cur_eip); 34171 gen_jmp_im(cur_eip);
34170Index: qemu-0.13.0/vl.c 34172Index: qemu-0.14.0/vl.c
34171=================================================================== 34173===================================================================
34172--- qemu-0.13.0.orig/vl.c 2011-01-17 16:41:59.000000000 +0800 34174--- qemu-0.14.0.orig/vl.c
34173+++ qemu-0.13.0/vl.c 2011-01-17 16:42:36.000000000 +0800 34175+++ qemu-0.14.0/vl.c
34174@@ -217,12 +217,14 @@ 34176@@ -222,12 +222,14 @@ QEMUOptionRom option_rom[MAX_OPTION_ROMS
34175 int nb_option_roms; 34177 int nb_option_roms;
34176 int semihosting_enabled = 0; 34178 int semihosting_enabled = 0;
34177 int old_param = 0; 34179 int old_param = 0;
@@ -34184,18 +34186,18 @@ Index: qemu-0.13.0/vl.c
34184 int boot_menu; 34186 int boot_menu;
34185+extern int enable_gl; 34187+extern int enable_gl;
34186 34188
34187 int nb_numa_nodes; 34189 typedef struct FWBootEntry FWBootEntry;
34188 uint64_t node_mem[MAX_NODES]; 34190
34189@@ -1433,6 +1435,8 @@ 34191@@ -1525,6 +1527,8 @@ static void select_vgahw (const char *p)
34190 } else if (strstart(p, "xenfb", &opts)) { 34192 } else if (strstart(p, "qxl", &opts)) {
34191 vga_interface_type = VGA_XENFB; 34193 vga_interface_type = VGA_QXL;
34192 } else if (!strstart(p, "none", &opts)) { 34194 } else if (!strstart(p, "none", &opts)) {
34193+ } 34195+ }
34194+ else { 34196+ else {
34195 invalid_vga: 34197 invalid_vga:
34196 fprintf(stderr, "Unknown vga type: %s\n", p); 34198 fprintf(stderr, "Unknown vga type: %s\n", p);
34197 exit(1); 34199 exit(1);
34198@@ -2535,6 +2539,9 @@ 34200@@ -2648,6 +2652,9 @@ int main(int argc, char **argv, char **e
34199 case QEMU_OPTION_old_param: 34201 case QEMU_OPTION_old_param:
34200 old_param = 1; 34202 old_param = 1;
34201 break; 34203 break;
@@ -34205,7 +34207,7 @@ Index: qemu-0.13.0/vl.c
34205 case QEMU_OPTION_clock: 34207 case QEMU_OPTION_clock:
34206 configure_alarms(optarg); 34208 configure_alarms(optarg);
34207 break; 34209 break;
34208@@ -2548,6 +2555,12 @@ 34210@@ -2661,6 +2668,12 @@ int main(int argc, char **argv, char **e
34209 } 34211 }
34210 configure_rtc(opts); 34212 configure_rtc(opts);
34211 break; 34213 break;
@@ -34218,7 +34220,7 @@ Index: qemu-0.13.0/vl.c
34218 case QEMU_OPTION_tb_size: 34220 case QEMU_OPTION_tb_size:
34219 tb_size = strtol(optarg, NULL, 0); 34221 tb_size = strtol(optarg, NULL, 0);
34220 if (tb_size < 0) 34222 if (tb_size < 0)
34221@@ -2887,6 +2900,14 @@ 34223@@ -3018,6 +3031,14 @@ int main(int argc, char **argv, char **e
34222 if (foreach_device_config(DEV_USB, usb_parse) < 0) 34224 if (foreach_device_config(DEV_USB, usb_parse) < 0)
34223 exit(1); 34225 exit(1);
34224 } 34226 }
@@ -34232,12 +34234,12 @@ Index: qemu-0.13.0/vl.c
34232+#endif 34234+#endif
34233 34235
34234 /* init generic devices */ 34236 /* init generic devices */
34235 if (qemu_opts_foreach(&qemu_device_opts, device_init_func, NULL, 1) != 0) 34237 if (qemu_opts_foreach(qemu_find_opts("device"), device_init_func, NULL, 1) != 0)
34236Index: qemu-0.13.0/qemu-options.hx 34238Index: qemu-0.14.0/qemu-options.hx
34237=================================================================== 34239===================================================================
34238--- qemu-0.13.0.orig/qemu-options.hx 2011-01-17 16:41:59.000000000 +0800 34240--- qemu-0.14.0.orig/qemu-options.hx
34239+++ qemu-0.13.0/qemu-options.hx 2011-01-17 16:44:27.000000000 +0800 34241+++ qemu-0.14.0/qemu-options.hx
34240@@ -2024,6 +2024,18 @@ 34242@@ -2118,6 +2118,18 @@ many timer interrupts were not processed
34241 re-inject them. 34243 re-inject them.
34242 ETEXI 34244 ETEXI
34243 34245
@@ -34256,11 +34258,11 @@ Index: qemu-0.13.0/qemu-options.hx
34256 DEF("icount", HAS_ARG, QEMU_OPTION_icount, \ 34258 DEF("icount", HAS_ARG, QEMU_OPTION_icount, \
34257 "-icount [N|auto]\n" \ 34259 "-icount [N|auto]\n" \
34258 " enable virtual instruction counter with 2^N clock ticks per\n" \ 34260 " enable virtual instruction counter with 2^N clock ticks per\n" \
34259Index: qemu-0.13.0/ui/sdl.c 34261Index: qemu-0.14.0/ui/sdl.c
34260=================================================================== 34262===================================================================
34261--- qemu-0.13.0.orig/ui/sdl.c 2011-01-17 16:41:59.000000000 +0800 34263--- qemu-0.14.0.orig/ui/sdl.c
34262+++ qemu-0.13.0/ui/sdl.c 2011-01-17 16:42:36.000000000 +0800 34264+++ qemu-0.14.0/ui/sdl.c
34263@@ -59,6 +59,8 @@ 34265@@ -63,6 +63,8 @@ static SDL_PixelFormat host_format;
34264 static int scaling_active = 0; 34266 static int scaling_active = 0;
34265 static Notifier mouse_mode_notifier; 34267 static Notifier mouse_mode_notifier;
34266 34268
@@ -34269,7 +34271,7 @@ Index: qemu-0.13.0/ui/sdl.c
34269 static void sdl_update(DisplayState *ds, int x, int y, int w, int h) 34271 static void sdl_update(DisplayState *ds, int x, int y, int w, int h)
34270 { 34272 {
34271 // printf("updating x=%d y=%d w=%d h=%d\n", x, y, w, h); 34273 // printf("updating x=%d y=%d w=%d h=%d\n", x, y, w, h);
34272@@ -121,12 +123,22 @@ 34274@@ -119,12 +121,22 @@ static void do_sdl_resize(int new_width,
34273 34275
34274 static void sdl_resize(DisplayState *ds) 34276 static void sdl_resize(DisplayState *ds)
34275 { 34277 {
@@ -34293,7 +34295,7 @@ Index: qemu-0.13.0/ui/sdl.c
34293 } else { 34295 } else {
34294 if (guest_screen != NULL) { 34296 if (guest_screen != NULL) {
34295 SDL_FreeSurface(guest_screen); 34297 SDL_FreeSurface(guest_screen);
34296@@ -455,7 +467,7 @@ 34298@@ -457,7 +469,7 @@ static void sdl_show_cursor(void)
34297 34299
34298 if (!kbd_mouse_is_absolute()) { 34300 if (!kbd_mouse_is_absolute()) {
34299 SDL_ShowCursor(1); 34301 SDL_ShowCursor(1);
@@ -34302,7 +34304,7 @@ Index: qemu-0.13.0/ui/sdl.c
34302 (gui_grab || kbd_mouse_is_absolute() || absolute_enabled)) 34304 (gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
34303 SDL_SetCursor(guest_sprite); 34305 SDL_SetCursor(guest_sprite);
34304 else 34306 else
34305@@ -466,7 +478,8 @@ 34307@@ -468,7 +480,8 @@ static void sdl_show_cursor(void)
34306 static void sdl_grab_start(void) 34308 static void sdl_grab_start(void)
34307 { 34309 {
34308 if (guest_cursor) { 34310 if (guest_cursor) {
@@ -34312,7 +34314,7 @@ Index: qemu-0.13.0/ui/sdl.c
34312 if (!kbd_mouse_is_absolute() && !absolute_enabled) 34314 if (!kbd_mouse_is_absolute() && !absolute_enabled)
34313 SDL_WarpMouse(guest_x, guest_y); 34315 SDL_WarpMouse(guest_x, guest_y);
34314 } else 34316 } else
34315@@ -768,7 +781,8 @@ 34317@@ -770,7 +783,8 @@ static void sdl_mouse_warp(int x, int y,
34316 if (!guest_cursor) 34318 if (!guest_cursor)
34317 sdl_show_cursor(); 34319 sdl_show_cursor();
34318 if (gui_grab || kbd_mouse_is_absolute() || absolute_enabled) { 34320 if (gui_grab || kbd_mouse_is_absolute() || absolute_enabled) {
@@ -34322,7 +34324,7 @@ Index: qemu-0.13.0/ui/sdl.c
34322 if (!kbd_mouse_is_absolute() && !absolute_enabled) 34324 if (!kbd_mouse_is_absolute() && !absolute_enabled)
34323 SDL_WarpMouse(x, y); 34325 SDL_WarpMouse(x, y);
34324 } 34326 }
34325@@ -796,7 +810,7 @@ 34327@@ -798,7 +812,7 @@ static void sdl_mouse_define(QEMUCursor
34326 qemu_free(image); 34328 qemu_free(image);
34327 qemu_free(mask); 34329 qemu_free(mask);
34328 34330
@@ -34331,7 +34333,7 @@ Index: qemu-0.13.0/ui/sdl.c
34331 (gui_grab || kbd_mouse_is_absolute() || absolute_enabled)) 34333 (gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
34332 SDL_SetCursor(guest_sprite); 34334 SDL_SetCursor(guest_sprite);
34333 } 34335 }
34334@@ -813,6 +827,7 @@ 34336@@ -815,6 +829,7 @@ void sdl_display_init(DisplayState *ds,
34335 int flags; 34337 int flags;
34336 uint8_t data = 0; 34338 uint8_t data = 0;
34337 DisplayAllocator *da; 34339 DisplayAllocator *da;
@@ -34339,7 +34341,7 @@ Index: qemu-0.13.0/ui/sdl.c
34339 const SDL_VideoInfo *vi; 34341 const SDL_VideoInfo *vi;
34340 34342
34341 #if defined(__APPLE__) 34343 #if defined(__APPLE__)
34342@@ -842,6 +857,12 @@ 34344@@ -848,6 +863,12 @@ void sdl_display_init(DisplayState *ds,
34343 vi = SDL_GetVideoInfo(); 34345 vi = SDL_GetVideoInfo();
34344 host_format = *(vi->vfmt); 34346 host_format = *(vi->vfmt);
34345 34347
@@ -34352,7 +34354,7 @@ Index: qemu-0.13.0/ui/sdl.c
34352 dcl = qemu_mallocz(sizeof(DisplayChangeListener)); 34354 dcl = qemu_mallocz(sizeof(DisplayChangeListener));
34353 dcl->dpy_update = sdl_update; 34355 dcl->dpy_update = sdl_update;
34354 dcl->dpy_resize = sdl_resize; 34356 dcl->dpy_resize = sdl_resize;
34355@@ -876,4 +897,9 @@ 34357@@ -882,4 +903,9 @@ void sdl_display_init(DisplayState *ds,
34356 gui_fullscreen_initial_grab = 1; 34358 gui_fullscreen_initial_grab = 1;
34357 sdl_grab_start(); 34359 sdl_grab_start();
34358 } 34360 }
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/qemu-vmware-vga-depth.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/qemu-vmware-vga-depth.patch
index 5bdbaf3937..42ec98fee5 100644
--- a/meta/recipes-devtools/qemu/qemu-0.13.0/qemu-vmware-vga-depth.patch
+++ b/meta/recipes-devtools/qemu/qemu-0.14.0/qemu-vmware-vga-depth.patch
@@ -1,11 +1,11 @@
1# fix VMware VGA driver depth calculation error, which may cause segmentation fault 1# fix VMware VGA driver depth calculation error, which may cause segmentation fault
2# 2#
3# ktian1, 06/29/2010 3# ktian1, 06/29/2010
4Index: qemu-0.13.0/console.h 4Index: qemu-0.14.0/console.h
5=================================================================== 5===================================================================
6--- qemu-0.13.0.orig/console.h 2011-01-17 16:41:58.000000000 +0800 6--- qemu-0.14.0.orig/console.h
7+++ qemu-0.13.0/console.h 2011-01-17 16:48:00.000000000 +0800 7+++ qemu-0.14.0/console.h
8@@ -171,6 +171,12 @@ 8@@ -171,6 +171,12 @@ struct DisplayAllocator {
9 void (*free_displaysurface)(DisplaySurface *surface); 9 void (*free_displaysurface)(DisplaySurface *surface);
10 }; 10 };
11 11
@@ -18,7 +18,7 @@ Index: qemu-0.13.0/console.h
18 struct DisplayState { 18 struct DisplayState {
19 struct DisplaySurface *surface; 19 struct DisplaySurface *surface;
20 void *opaque; 20 void *opaque;
21@@ -178,6 +184,7 @@ 21@@ -178,6 +184,7 @@ struct DisplayState {
22 22
23 struct DisplayAllocator* allocator; 23 struct DisplayAllocator* allocator;
24 struct DisplayChangeListener* listeners; 24 struct DisplayChangeListener* listeners;
@@ -26,7 +26,7 @@ Index: qemu-0.13.0/console.h
26 26
27 void (*mouse_set)(int x, int y, int on); 27 void (*mouse_set)(int x, int y, int on);
28 void (*cursor_define)(QEMUCursor *cursor); 28 void (*cursor_define)(QEMUCursor *cursor);
29@@ -229,6 +236,12 @@ 29@@ -229,6 +236,12 @@ static inline void register_displaychang
30 ds->listeners = dcl; 30 ds->listeners = dcl;
31 } 31 }
32 32
@@ -39,11 +39,11 @@ Index: qemu-0.13.0/console.h
39 static inline void dpy_update(DisplayState *s, int x, int y, int w, int h) 39 static inline void dpy_update(DisplayState *s, int x, int y, int w, int h)
40 { 40 {
41 struct DisplayChangeListener *dcl = s->listeners; 41 struct DisplayChangeListener *dcl = s->listeners;
42Index: qemu-0.13.0/hw/vmware_vga.c 42Index: qemu-0.14.0/hw/vmware_vga.c
43=================================================================== 43===================================================================
44--- qemu-0.13.0.orig/hw/vmware_vga.c 2011-01-17 16:42:36.000000000 +0800 44--- qemu-0.14.0.orig/hw/vmware_vga.c
45+++ qemu-0.13.0/hw/vmware_vga.c 2011-01-17 16:48:00.000000000 +0800 45+++ qemu-0.14.0/hw/vmware_vga.c
46@@ -957,8 +957,9 @@ 46@@ -1001,8 +1001,9 @@ static void vmsvga_update_display(void *
47 } 47 }
48 } 48 }
49 49
@@ -54,7 +54,7 @@ Index: qemu-0.13.0/hw/vmware_vga.c
54 s->index = 0; 54 s->index = 0;
55 s->enable = 0; 55 s->enable = 0;
56 s->config = 0; 56 s->config = 0;
57@@ -1163,6 +1164,8 @@ 57@@ -1207,6 +1208,8 @@ static const VMStateDescription vmstate_
58 58
59 static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size) 59 static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size)
60 { 60 {
@@ -63,9 +63,9 @@ Index: qemu-0.13.0/hw/vmware_vga.c
63 s->scratch_size = SVGA_SCRATCH_SIZE; 63 s->scratch_size = SVGA_SCRATCH_SIZE;
64 s->scratch = qemu_malloc(s->scratch_size * 4); 64 s->scratch = qemu_malloc(s->scratch_size * 4);
65 65
66@@ -1190,7 +1193,10 @@ 66@@ -1224,7 +1227,10 @@ static void vmsvga_init(struct vmsvga_st
67 67 vga_init(&s->vga);
68 rom_add_vga(VGABIOS_FILENAME); 68 vmstate_register(NULL, 0, &vmstate_vga_common, &s->vga);
69 69
70- vmsvga_reset(s); 70- vmsvga_reset(s);
71+ dpc = qemu_mallocz(sizeof(DisplayPostCallback)); 71+ dpc = qemu_mallocz(sizeof(DisplayPostCallback));
@@ -75,11 +75,11 @@ Index: qemu-0.13.0/hw/vmware_vga.c
75 } 75 }
76 76
77 static void pci_vmsvga_map_ioport(PCIDevice *pci_dev, int region_num, 77 static void pci_vmsvga_map_ioport(PCIDevice *pci_dev, int region_num,
78Index: qemu-0.13.0/qemu-common.h 78Index: qemu-0.14.0/qemu-common.h
79=================================================================== 79===================================================================
80--- qemu-0.13.0.orig/qemu-common.h 2011-01-17 16:41:58.000000000 +0800 80--- qemu-0.14.0.orig/qemu-common.h
81+++ qemu-0.13.0/qemu-common.h 2011-01-17 16:48:00.000000000 +0800 81+++ qemu-0.14.0/qemu-common.h
82@@ -205,6 +205,7 @@ 82@@ -241,6 +241,7 @@ typedef struct DisplayState DisplayState
83 typedef struct DisplayChangeListener DisplayChangeListener; 83 typedef struct DisplayChangeListener DisplayChangeListener;
84 typedef struct DisplaySurface DisplaySurface; 84 typedef struct DisplaySurface DisplaySurface;
85 typedef struct DisplayAllocator DisplayAllocator; 85 typedef struct DisplayAllocator DisplayAllocator;
@@ -87,22 +87,22 @@ Index: qemu-0.13.0/qemu-common.h
87 typedef struct PixelFormat PixelFormat; 87 typedef struct PixelFormat PixelFormat;
88 typedef struct TextConsole TextConsole; 88 typedef struct TextConsole TextConsole;
89 typedef TextConsole QEMUConsole; 89 typedef TextConsole QEMUConsole;
90Index: qemu-0.13.0/vl.c 90Index: qemu-0.14.0/vl.c
91=================================================================== 91===================================================================
92--- qemu-0.13.0.orig/vl.c 2011-01-17 16:42:36.000000000 +0800 92--- qemu-0.14.0.orig/vl.c
93+++ qemu-0.13.0/vl.c 2011-01-17 16:48:00.000000000 +0800 93+++ qemu-0.14.0/vl.c
94@@ -1814,6 +1814,7 @@ 94@@ -1920,6 +1920,7 @@ int main(int argc, char **argv, char **e
95 char boot_devices[33] = "cad"; /* default to HD->floppy->CD-ROM */ 95 char boot_devices[33] = "cad"; /* default to HD->floppy->CD-ROM */
96 DisplayState *ds; 96 DisplayState *ds;
97 DisplayChangeListener *dcl; 97 DisplayChangeListener *dcl;
98+ DisplayPostCallback *dpc; 98+ DisplayPostCallback *dpc;
99 int cyls, heads, secs, translation; 99 int cyls, heads, secs, translation;
100 QemuOpts *hda_opts = NULL, *opts; 100 QemuOpts *hda_opts = NULL, *opts;
101 int optind; 101 QemuOptsList *olist;
102@@ -2960,6 +2961,13 @@ 102@@ -3101,6 +3102,13 @@ int main(int argc, char **argv, char **e
103 }
104 dpy_resize(ds);
105 103
104 /* display setup */
105 dpy_resize(ds);
106+ dpc = ds->postcalls; 106+ dpc = ds->postcalls;
107+ while (dpc != NULL) { 107+ while (dpc != NULL) {
108+ if (dpc->postcall != NULL) 108+ if (dpc->postcall != NULL)
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/qemugl-allow-glxcontext-release.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/qemugl-allow-glxcontext-release.patch
index 43acc361a0..478b204274 100644
--- a/meta/recipes-devtools/qemu/qemu-0.13.0/qemugl-allow-glxcontext-release.patch
+++ b/meta/recipes-devtools/qemu/qemu-0.14.0/qemugl-allow-glxcontext-release.patch
@@ -10,10 +10,10 @@ committer Andrzej Zaborowski <andrew.zaborowski@intel.com> Tue, 16 Jun 2009 22:2
10 target-i386/opengl_exec.c | 31 ++++++++++++++++--------------- 10 target-i386/opengl_exec.c | 31 ++++++++++++++++---------------
11 1 files changed, 16 insertions(+), 15 deletions(-) 11 1 files changed, 16 insertions(+), 15 deletions(-)
12 12
13Index: qemu/target-i386/opengl_exec.c 13Index: qemu-0.14.0/target-i386/opengl_exec.c
14=================================================================== 14===================================================================
15--- qemu.orig/target-i386/opengl_exec.c 2010-05-10 18:46:43.175394992 -0400 15--- qemu-0.14.0.orig/target-i386/opengl_exec.c
16+++ qemu/target-i386/opengl_exec.c 2010-05-10 18:46:43.218419933 -0400 16+++ qemu-0.14.0/target-i386/opengl_exec.c
17@@ -1600,10 +1600,9 @@ int do_function_call(int func_number, ar 17@@ -1600,10 +1600,9 @@ int do_function_call(int func_number, ar
18 fprintf(stderr, "client_drawable=%p fake_ctx=%d\n", 18 fprintf(stderr, "client_drawable=%p fake_ctx=%d\n",
19 (void *) client_drawable, fake_ctxt); 19 (void *) client_drawable, fake_ctxt);
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/spice-qxl-locking-fix-for-qemu-kvm.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/spice-qxl-locking-fix-for-qemu-kvm.patch
new file mode 100644
index 0000000000..87d5927850
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.14.0/spice-qxl-locking-fix-for-qemu-kvm.patch
@@ -0,0 +1,150 @@
1Description: spice/qxl: locking fix for qemu-kvm
2Author: Gerd Hoffmann <kraxel@redhat.com>
3Source: upstream, http://patchwork.ozlabs.org/patch/84704/
4Forwarding: not-needed
5
6Index: qemu-0.14.0/hw/qxl.c
7===================================================================
8--- qemu-0.14.0.orig/hw/qxl.c
9+++ qemu-0.14.0/hw/qxl.c
10@@ -125,6 +125,27 @@ static void qxl_reset_memslots(PCIQXLDev
11 static void qxl_reset_surfaces(PCIQXLDevice *d);
12 static void qxl_ring_set_dirty(PCIQXLDevice *qxl);
13
14+/* qemu-kvm locking ... */
15+void qxl_unlock_iothread(SimpleSpiceDisplay *ssd)
16+{
17+ if (cpu_single_env) {
18+ assert(ssd->env == NULL);
19+ ssd->env = cpu_single_env;
20+ cpu_single_env = NULL;
21+ }
22+ qemu_mutex_unlock_iothread();
23+}
24+
25+void qxl_lock_iothread(SimpleSpiceDisplay *ssd)
26+{
27+ qemu_mutex_lock_iothread();
28+ if (ssd->env) {
29+ assert(cpu_single_env == NULL);
30+ cpu_single_env = ssd->env;
31+ ssd->env = NULL;
32+ }
33+}
34+
35 static inline uint32_t msb_mask(uint32_t val)
36 {
37 uint32_t mask;
38@@ -662,10 +683,10 @@ static void qxl_hard_reset(PCIQXLDevice
39 dprint(d, 1, "%s: start%s\n", __FUNCTION__,
40 loadvm ? " (loadvm)" : "");
41
42- qemu_mutex_unlock_iothread();
43+ qxl_unlock_iothread(&d->ssd);
44 d->ssd.worker->reset_cursor(d->ssd.worker);
45 d->ssd.worker->reset_image_cache(d->ssd.worker);
46- qemu_mutex_lock_iothread();
47+ qxl_lock_iothread(&d->ssd);
48 qxl_reset_surfaces(d);
49 qxl_reset_memslots(d);
50
51@@ -795,9 +816,9 @@ static void qxl_reset_surfaces(PCIQXLDev
52 {
53 dprint(d, 1, "%s:\n", __FUNCTION__);
54 d->mode = QXL_MODE_UNDEFINED;
55- qemu_mutex_unlock_iothread();
56+ qxl_unlock_iothread(&d->ssd);
57 d->ssd.worker->destroy_surfaces(d->ssd.worker);
58- qemu_mutex_lock_iothread();
59+ qxl_lock_iothread(&d->ssd);
60 memset(&d->guest_surfaces.cmds, 0, sizeof(d->guest_surfaces.cmds));
61 }
62
63@@ -866,9 +887,9 @@ static void qxl_destroy_primary(PCIQXLDe
64 dprint(d, 1, "%s\n", __FUNCTION__);
65
66 d->mode = QXL_MODE_UNDEFINED;
67- qemu_mutex_unlock_iothread();
68+ qxl_unlock_iothread(&d->ssd);
69 d->ssd.worker->destroy_primary_surface(d->ssd.worker, 0);
70- qemu_mutex_lock_iothread();
71+ qxl_lock_iothread(&d->ssd);
72 }
73
74 static void qxl_set_mode(PCIQXLDevice *d, int modenr, int loadvm)
75@@ -938,10 +959,10 @@ static void ioport_write(void *opaque, u
76 case QXL_IO_UPDATE_AREA:
77 {
78 QXLRect update = d->ram->update_area;
79- qemu_mutex_unlock_iothread();
80+ qxl_unlock_iothread(&d->ssd);
81 d->ssd.worker->update_area(d->ssd.worker, d->ram->update_surface,
82 &update, NULL, 0, 0);
83- qemu_mutex_lock_iothread();
84+ qxl_lock_iothread(&d->ssd);
85 break;
86 }
87 case QXL_IO_NOTIFY_CMD:
88Index: qemu-0.14.0/ui/spice-display.c
89===================================================================
90--- qemu-0.14.0.orig/ui/spice-display.c
91+++ qemu-0.14.0/ui/spice-display.c
92@@ -186,18 +186,18 @@ void qemu_spice_create_host_primary(Simp
93 surface.mem = (intptr_t)ssd->buf;
94 surface.group_id = MEMSLOT_GROUP_HOST;
95
96- qemu_mutex_unlock_iothread();
97+ qxl_unlock_iothread(ssd);
98 ssd->worker->create_primary_surface(ssd->worker, 0, &surface);
99- qemu_mutex_lock_iothread();
100+ qxl_lock_iothread(ssd);
101 }
102
103 void qemu_spice_destroy_host_primary(SimpleSpiceDisplay *ssd)
104 {
105 dprint(1, "%s:\n", __FUNCTION__);
106
107- qemu_mutex_unlock_iothread();
108+ qxl_unlock_iothread(ssd);
109 ssd->worker->destroy_primary_surface(ssd->worker, 0);
110- qemu_mutex_lock_iothread();
111+ qxl_lock_iothread(ssd);
112 }
113
114 void qemu_spice_vm_change_state_handler(void *opaque, int running, int reason)
115@@ -207,9 +207,9 @@ void qemu_spice_vm_change_state_handler(
116 if (running) {
117 ssd->worker->start(ssd->worker);
118 } else {
119- qemu_mutex_unlock_iothread();
120+ qxl_unlock_iothread(ssd);
121 ssd->worker->stop(ssd->worker);
122- qemu_mutex_lock_iothread();
123+ qxl_lock_iothread(ssd);
124 }
125 ssd->running = running;
126 }
127Index: qemu-0.14.0/ui/spice-display.h
128===================================================================
129--- qemu-0.14.0.orig/ui/spice-display.h
130+++ qemu-0.14.0/ui/spice-display.h
131@@ -43,6 +43,9 @@ typedef struct SimpleSpiceDisplay {
132 QXLRect dirty;
133 int notify;
134 int running;
135+
136+ /* qemu-kvm locking ... */
137+ void *env;
138 } SimpleSpiceDisplay;
139
140 typedef struct SimpleSpiceUpdate {
141@@ -52,6 +55,9 @@ typedef struct SimpleSpiceUpdate {
142 uint8_t *bitmap;
143 } SimpleSpiceUpdate;
144
145+void qxl_unlock_iothread(SimpleSpiceDisplay *ssd);
146+void qxl_lock_iothread(SimpleSpiceDisplay *ssd);
147+
148 int qemu_spice_rect_is_empty(const QXLRect* r);
149 void qemu_spice_rect_union(QXLRect *dest, const QXLRect *r);
150
diff --git a/meta/recipes-devtools/qemu/qemu_0.13.0.bb b/meta/recipes-devtools/qemu/qemu_0.14.0.bb
index 71b56b7b54..d8535b24d8 100644
--- a/meta/recipes-devtools/qemu/qemu_0.13.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_0.14.0.bb
@@ -3,35 +3,30 @@ require qemu.inc
3LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ 3LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
4 file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913" 4 file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
5 5
6PR = "r1" 6PR = "r0"
7 7
8FILESPATH = "${FILE_DIRNAME}/qemu-${PV}" 8FILESPATH = "${FILE_DIRNAME}/qemu-${PV}"
9FILESDIR = "${WORKDIR}" 9FILESDIR = "${WORKDIR}"
10 10
11SRC_URI = "\ 11SRC_URI = "\
12 http://download.savannah.gnu.org/releases/qemu/qemu-${PV}.tar.gz \ 12 http://download.savannah.gnu.org/releases/qemu/qemu-${PV}.tar.gz \
13 file://workaround_bad_futex_headers.patch \ 13 file://powerpc_rom.bin \
14 file://qemu-git-qemugl-host.patch \ 14 file://qemu-git-qemugl-host.patch \
15 file://no-strip.patch \ 15 file://no-strip.patch \
16 file://fix-dirent.patch \
17 file://fix-nogl.patch \ 16 file://fix-nogl.patch \
18 file://qemugl-allow-glxcontext-release.patch \ 17 file://qemugl-allow-glxcontext-release.patch \
19 file://linker-flags.patch \ 18 file://linker-flags.patch \
20 file://init-info.patch \ 19 file://init-info.patch \
21 file://qemu-vmware-vga-depth.patch \ 20 file://qemu-vmware-vga-depth.patch \
22 file://qemu-ppc-hack.patch \
23 file://enable-i386-linux-user.patch \ 21 file://enable-i386-linux-user.patch \
24 file://vmware-vga-fifo-rewind.patch \
25 file://fix-configure-checks.patch \ 22 file://fix-configure-checks.patch \
26 file://parallel_make.patch \
27 file://wacom-tablet-fix.patch \
28 file://port92_fix.patch \
29 file://powerpc_rom.bin \
30 file://fallback-to-safe-mmap_min_addr.patch \ 23 file://fallback-to-safe-mmap_min_addr.patch \
24 file://spice-qxl-locking-fix-for-qemu-kvm.patch \
25 file://Detect-and-use-GCC-atomic-builtins-for-locking.patch \
26 file://larger_default_ram_size.patch \
31 " 27 "
32 28SRC_URI[md5sum] = "f9d145d5c09de9f0984ffe9bd1229970"
33SRC_URI[md5sum] = "397a0d665da8ba9d3b9583629f3d6421" 29SRC_URI[sha256sum] = "ba21e84d7853217830e167dae9999cdbff481189c6a0bb600ac7fb7201453108"
34SRC_URI[sha256sum] = "1e6f5851b05cea6e377c835f4668408d4124cfb845f9948d922808743c5fd877"
35 30
36do_install_append () { 31do_install_append () {
37 install -d ${D}${datadir}/qemu 32 install -d ${D}${datadir}/qemu