summaryrefslogtreecommitdiff
path: root/meta/packages/qemu
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2010-05-20 13:02:39 -0400
committerJoshua Lock <josh@linux.intel.com>2010-05-26 14:14:48 +0100
commita49e605a52a3bd6b688a16104fa9b5d17e06bcd5 (patch)
treec5c36a93775d59b3675ee9d671f00300959fcd72 /meta/packages/qemu
parenteb69ecdfcc23cad8a40c3d57bc8e989e6e0666d0 (diff)
downloadopenembedded-core-a49e605a52a3bd6b688a16104fa9b5d17e06bcd5.tar.gz
openembedded-core-a49e605a52a3bd6b688a16104fa9b5d17e06bcd5.tar.bz2
openembedded-core-a49e605a52a3bd6b688a16104fa9b5d17e06bcd5.zip
qemu: Updated to 0.12.0
Updated the metadata in the recipe, changed the git revision in poky-default-revisions.inc, and pulled the qemu patches forward.
Diffstat (limited to 'meta/packages/qemu')
-rw-r--r--meta/packages/qemu/qemu-git/2ca2078e287174522e3a6229618947d3d285b8c0.patch130
-rw-r--r--meta/packages/qemu/qemu-git/fix-dirent.patch6
-rw-r--r--meta/packages/qemu/qemu-git/fix-nogl.patch31
-rw-r--r--meta/packages/qemu/qemu-git/no-strip.patch30
-rw-r--r--meta/packages/qemu/qemu-git/qemu-git-qemugl-host.patch561
-rw-r--r--meta/packages/qemu/qemu-git/qemugl-allow-glxcontext-release.patch12
-rw-r--r--meta/packages/qemu/qemu-git/workaround_bad_futex_headers.patch10
-rw-r--r--meta/packages/qemu/qemu-git/zlibsearch.patch13
-rw-r--r--meta/packages/qemu/qemu_git.bb10
9 files changed, 290 insertions, 513 deletions
diff --git a/meta/packages/qemu/qemu-git/2ca2078e287174522e3a6229618947d3d285b8c0.patch b/meta/packages/qemu/qemu-git/2ca2078e287174522e3a6229618947d3d285b8c0.patch
deleted file mode 100644
index e2ebf67922..0000000000
--- a/meta/packages/qemu/qemu-git/2ca2078e287174522e3a6229618947d3d285b8c0.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From 2ca2078e287174522e3a6229618947d3d285b8c0 Mon Sep 17 00:00:00 2001
-From: François Revol <revol@free.fr>
-Date: Tue, 25 Aug 2009 09:14:10 +0000
-Subject: Fixed wacom emulation
-
-- for absolute mode, scale coordinates to the real device maximum values,
-since some drivers (on Haiku and Linux at least) need them as such,
-and the HID descriptor is boggus on some models anyway,
-- keep the coordinates even when no button is pressed, on real tablet
-the pen is sensed on the surface even without direct contact,
-and drivers expect this,
-- map left button to pressure according to what the Haiku driver wants,
-- map the right button to the pen button,
-- map the middle button to the eraser,
-- use asynchronous reporting as the hid code does, stops the Haiku driver
-(and probably others) from spending 50% cpu polling for changes.
-
-Signed-off-by: François Revol <revol@free.fr>
-Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
----
-Index: git/hw/usb-wacom.c
-===================================================================
---- git.orig/hw/usb-wacom.c 2009-11-24 14:10:15.000000000 +0000
-+++ git/hw/usb-wacom.c 2009-11-24 16:39:26.000000000 +0000
-@@ -50,6 +50,8 @@
- WACOM_MODE_HID = 1,
- WACOM_MODE_WACOM = 2,
- } mode;
-+ uint8_t idle;
-+ int changed;
- } USBWacomState;
-
- static const uint8_t qemu_wacom_dev_descriptor[] = {
-@@ -125,6 +127,7 @@
- s->dy += dy1;
- s->dz += dz1;
- s->buttons_state = buttons_state;
-+ s->changed = 1;
- }
-
- static void usb_wacom_event(void *opaque,
-@@ -132,10 +135,12 @@
- {
- USBWacomState *s = opaque;
-
-- s->x = x;
-- s->y = y;
-+ /* scale to Penpartner resolution */
-+ s->x = (x * 5040 / 0x7FFF);
-+ s->y = (y * 3780 / 0x7FFF);
- s->dz += dz;
- s->buttons_state = buttons_state;
-+ s->changed = 1;
- }
-
- static inline int int_clamp(int val, int vmin, int vmax)
-@@ -199,26 +204,22 @@
- if (s->buttons_state & MOUSE_EVENT_LBUTTON)
- b |= 0x01;
- if (s->buttons_state & MOUSE_EVENT_RBUTTON)
-- b |= 0x02;
-+ b |= 0x40;
- if (s->buttons_state & MOUSE_EVENT_MBUTTON)
-- b |= 0x04;
-+ b |= 0x20; /* eraser */
-
- if (len < 7)
- return 0;
-
- buf[0] = s->mode;
-- buf[5] = 0x00;
-- if (b) {
-- buf[1] = s->x & 0xff;
-- buf[2] = s->x >> 8;
-- buf[3] = s->y & 0xff;
-- buf[4] = s->y >> 8;
-+ buf[5] = 0x00 | (b & 0xf0);
-+ buf[1] = s->x & 0xff;
-+ buf[2] = s->x >> 8;
-+ buf[3] = s->y & 0xff;
-+ buf[4] = s->y >> 8;
-+ if (b & 0x3f) {
- buf[6] = 0;
- } else {
-- buf[1] = 0;
-- buf[2] = 0;
-- buf[3] = 0;
-- buf[4] = 0;
- buf[6] = (unsigned char) -127;
- }
-
-@@ -350,7 +351,12 @@
- else if (s->mode == WACOM_MODE_WACOM)
- ret = usb_wacom_poll(s, data, length);
- break;
-+ case HID_GET_IDLE:
-+ ret = 1;
-+ data[0] = s->idle;
-+ break;
- case HID_SET_IDLE:
-+ s->idle = (uint8_t) (value >> 8);
- ret = 0;
- break;
- default:
-@@ -369,6 +375,9 @@
- switch (p->pid) {
- case USB_TOKEN_IN:
- if (p->devep == 1) {
-+ if (!(s->changed || s->idle))
-+ return USB_RET_NAK;
-+ s->changed = 0;
- if (s->mode == WACOM_MODE_HID)
- ret = usb_mouse_poll(s, p->data, p->len);
- else if (s->mode == WACOM_MODE_WACOM)
-@@ -399,7 +408,6 @@
- s = qemu_mallocz(sizeof(USBWacomState));
- s->dev.speed = USB_SPEED_FULL;
- s->dev.handle_packet = usb_generic_handle_packet;
--
- s->dev.handle_reset = usb_wacom_handle_reset;
- s->dev.handle_control = usb_wacom_handle_control;
- s->dev.handle_data = usb_wacom_handle_data;
-@@ -407,6 +415,7 @@
-
- pstrcpy(s->dev.devname, sizeof(s->dev.devname),
- "QEMU PenPartner Tablet");
-+ s->changed = 1;
-
- return (USBDevice *) s;
- }
diff --git a/meta/packages/qemu/qemu-git/fix-dirent.patch b/meta/packages/qemu/qemu-git/fix-dirent.patch
index 575dbfa0c9..8bbfa0e88e 100644
--- a/meta/packages/qemu/qemu-git/fix-dirent.patch
+++ b/meta/packages/qemu/qemu-git/fix-dirent.patch
@@ -1,7 +1,7 @@
-Index: trunk/linux-user/syscall.c
+Index: qemu/linux-user/syscall.c
===================================================================
---- trunk.orig/linux-user/syscall.c 2009-01-05 12:51:52.000000000 +0000
-+++ trunk/linux-user/syscall.c 2009-01-05 12:51:52.000000000 +0000
+--- qemu.orig/linux-user/syscall.c 2010-05-11 13:16:22.421783949 -0400
++++ qemu/linux-user/syscall.c 2010-05-11 13:16:31.759805849 -0400
@@ -26,6 +26,7 @@
#include <errno.h>
#include <unistd.h>
diff --git a/meta/packages/qemu/qemu-git/fix-nogl.patch b/meta/packages/qemu/qemu-git/fix-nogl.patch
index 6cb812f00c..68efab3a1f 100644
--- a/meta/packages/qemu/qemu-git/fix-nogl.patch
+++ b/meta/packages/qemu/qemu-git/fix-nogl.patch
@@ -1,20 +1,21 @@
-Index: git/Makefile.target
+Index: qemu/Makefile.target
===================================================================
---- git.orig/Makefile.target 2009-06-09 22:05:27.000000000 +0100
-+++ git/Makefile.target 2009-06-09 22:05:28.000000000 +0100
-@@ -155,6 +155,8 @@
+--- qemu.orig/Makefile.target 2010-05-11 16:53:34.545811866 -0400
++++ qemu/Makefile.target 2010-05-11 16:53:37.743809704 -0400
+@@ -47,6 +47,9 @@ libobj-$(CONFIG_NOSOFTFLOAT) += fpu/soft
+ libobj-y += op_helper.o helper.o
+ libobj-$(CONFIG_NEED_MMU) += mmu.o
+ libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
++libobj-$(TARGET_X86_64) += helper_opengl.o opengl_exec.o
++libobj-$(TARGET_ARM) += dummygl.o
++libobj-$(TARGET_MIPS) += dummygl.o
+ libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
+ libobj-$(TARGET_ALPHA) += alpha_palcode.o
- ifeq ($(TARGET_BASE_ARCH), i386)
- LIBOBJS+=helper_opengl.o opengl_exec.o
-+else
-+LIBOBJS+=dummygl.o
- endif
-
- ifeq ($(TARGET_BASE_ARCH), arm)
-Index: git/target-arm/dummygl.c
+Index: qemu/target-arm/dummygl.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ git/target-arm/dummygl.c 2009-06-09 22:15:55.000000000 +0100
++++ qemu/target-arm/dummygl.c 2010-05-11 16:53:37.743809704 -0400
@@ -0,0 +1,22 @@
+#include <string.h>
+#include <stdlib.h>
@@ -38,10 +39,10 @@ Index: git/target-arm/dummygl.c
+{
+
+}
-Index: git/target-mips/dummygl.c
+Index: qemu/target-mips/dummygl.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ git/target-mips/dummygl.c 2009-06-09 22:15:55.000000000 +0100
++++ qemu/target-mips/dummygl.c 2010-05-11 16:53:37.744811919 -0400
@@ -0,0 +1,22 @@
+#include <string.h>
+#include <stdlib.h>
diff --git a/meta/packages/qemu/qemu-git/no-strip.patch b/meta/packages/qemu/qemu-git/no-strip.patch
index fc69b37e16..8a95a688b3 100644
--- a/meta/packages/qemu/qemu-git/no-strip.patch
+++ b/meta/packages/qemu/qemu-git/no-strip.patch
@@ -1,22 +1,26 @@
---- qemu.orig/Makefile 2008-01-29 23:16:27.000000000 -0800
-+++ qemu-0.9.1/Makefile 2008-01-29 23:16:38.000000000 -0800
-@@ -174,7 +174,7 @@
+Index: qemu/Makefile
+===================================================================
+--- qemu.orig/Makefile 2010-05-11 17:17:06.416912704 -0400
++++ qemu/Makefile 2010-05-11 17:17:17.051812402 -0400
+@@ -300,7 +300,7 @@ endif
install: all $(if $(BUILD_DOCS),install-doc)
- mkdir -p "$(DESTDIR)$(bindir)"
+ $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
ifneq ($(TOOLS),)
-- $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)"
-+ $(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(bindir)"
+- $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
++ $(INSTALL_PROG) $(TOOLS) "$(DESTDIR)$(bindir)"
endif
- mkdir -p "$(DESTDIR)$(datadir)"
- for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
---- qemu.orig/Makefile.target 2008-01-29 23:16:27.000000000 -0800
-+++ qemu-0.9.1/Makefile.target 2008-01-29 23:17:33.000000000 -0800
-@@ -632,7 +632,7 @@
+ ifneq ($(BLOBS),)
+ $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
+Index: qemu/Makefile.target
+===================================================================
+--- qemu.orig/Makefile.target 2010-05-11 17:17:12.188784092 -0400
++++ qemu/Makefile.target 2010-05-11 17:17:17.052808122 -0400
+@@ -351,7 +351,7 @@ clean:
install: all
ifneq ($(PROGS),)
-- $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)"
+- $(INSTALL) -m 755 $(STRIP_OPT) $(PROGS) "$(DESTDIR)$(bindir)"
+ $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
endif
- ifneq ($(wildcard .depend),)
+ # Include automatically generated dependency files
diff --git a/meta/packages/qemu/qemu-git/qemu-git-qemugl-host.patch b/meta/packages/qemu/qemu-git/qemu-git-qemugl-host.patch
index 00d9ca7cc2..7ec491daed 100644
--- a/meta/packages/qemu/qemu-git/qemu-git-qemugl-host.patch
+++ b/meta/packages/qemu/qemu-git/qemu-git-qemugl-host.patch
@@ -1,21 +1,18 @@
-Index: git/Makefile.target
+Index: qemu/Makefile.target
===================================================================
---- git.orig/Makefile.target 2009-12-02 13:13:56.000000000 +0000
-+++ git/Makefile.target 2010-01-14 16:34:58.000000000 +0000
-@@ -153,6 +153,10 @@
- CPPFLAGS+=-I$(SRC_PATH)/fpu
- LIBOBJS+= op_helper.o helper.o
+--- qemu.orig/Makefile.target 2010-05-11 18:05:22.955784896 -0400
++++ qemu/Makefile.target 2010-05-14 13:34:07.721301429 -0400
+@@ -46,6 +46,7 @@ libobj-$(CONFIG_SOFTFLOAT) += fpu/softfl
+ libobj-$(CONFIG_NOSOFTFLOAT) += fpu/softfloat-native.o
+ libobj-y += op_helper.o helper.o
+ libobj-$(CONFIG_NEED_MMU) += mmu.o
++libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
+ libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
+ libobj-$(TARGET_ALPHA) += alpha_palcode.o
-+ifeq ($(TARGET_BASE_ARCH), i386)
-+LIBOBJS+=helper_opengl.o opengl_exec.o
-+endif
-+
- ifeq ($(TARGET_BASE_ARCH), arm)
- LIBOBJS+= neon_helper.o iwmmxt_helper.o
- endif
-@@ -224,6 +228,21 @@
-
- cpu-exec.o: CFLAGS += $(HELPER_CFLAGS)
+@@ -82,6 +83,21 @@ op_helper.o cpu-exec.o: QEMU_CFLAGS += $
+ # cpu_signal_handler() in cpu-exec.c.
+ signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
+parse_gl_h: parse_gl_h.c
+ $(HOST_CC) -g -o $@ $<
@@ -35,29 +32,31 @@ Index: git/Makefile.target
#########################################################
# Linux user emulator target
-@@ -584,7 +603,7 @@
- OBJS+= cirrus_vga.o apic.o parallel.o acpi.o piix_pci.o
- OBJS+= usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o
- OBJS += device-hotplug.o pci-hotplug.o
--CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
-+CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE -DTARGET_OPENGL_OK
- endif
- ifeq ($(TARGET_BASE_ARCH), ppc)
- CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
-@@ -727,7 +746,7 @@
- $(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS)
+@@ -196,6 +212,10 @@ obj-i386-y += usb-uhci.o vmmouse.o vmpor
+ obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o wdt_ib700.o
+ obj-i386-y += ne2000-isa.o
+
++ifeq ($(TARGET_BASE_ARCH), i386)
++QEMU_CFLAGS += -DTARGET_OPENGL_OK
++endif
++
+ # shared objects
+ obj-ppc-y = ppc.o ide/core.o ide/qdev.o ide/isa.o ide/pci.o ide/macio.o
+ obj-ppc-y += ide/cmd646.o
+@@ -303,6 +323,8 @@ vl.o: qemu-options.h
- $(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a
-- $(LINK)
-+ $(LINK) -lGL -lGLU
+ monitor.o: qemu-monitor.h
- endif # !CONFIG_USER_ONLY
++LIBS += -lGL -lGLU
++
+ ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
-Index: git/hw/pixel_ops.h
+ endif # CONFIG_SOFTMMU
+Index: qemu/hw/pixel_ops.h
===================================================================
---- git.orig/hw/pixel_ops.h 2009-12-02 13:13:56.000000000 +0000
-+++ git/hw/pixel_ops.h 2010-01-14 15:55:40.000000000 +0000
-@@ -4,6 +4,12 @@
+--- qemu.orig/hw/pixel_ops.h 2010-05-11 18:05:22.959804376 -0400
++++ qemu/hw/pixel_ops.h 2010-05-12 12:10:40.092908994 -0400
+@@ -4,6 +4,12 @@ static inline unsigned int rgb_to_pixel8
return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6);
}
@@ -70,11 +69,11 @@ Index: git/hw/pixel_ops.h
static inline unsigned int rgb_to_pixel15(unsigned int r, unsigned int g,
unsigned int b)
{
-Index: git/hw/vmware_vga.c
+Index: qemu/hw/vmware_vga.c
===================================================================
---- git.orig/hw/vmware_vga.c 2009-12-02 13:13:56.000000000 +0000
-+++ git/hw/vmware_vga.c 2010-01-14 15:55:40.000000000 +0000
-@@ -484,6 +484,8 @@
+--- qemu.orig/hw/vmware_vga.c 2010-05-11 18:05:22.959804376 -0400
++++ qemu/hw/vmware_vga.c 2010-05-12 12:10:40.124785891 -0400
+@@ -489,6 +489,8 @@ static inline void vmsvga_cursor_define(
#define CMD(f) le32_to_cpu(s->cmd->f)
@@ -83,7 +82,7 @@ Index: git/hw/vmware_vga.c
static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s)
{
if (!s->config || !s->enable)
-@@ -493,11 +495,18 @@
+@@ -498,11 +500,18 @@ static inline int vmsvga_fifo_empty(stru
static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s)
{
@@ -106,7 +105,7 @@ Index: git/hw/vmware_vga.c
}
static inline uint32_t vmsvga_fifo_read(struct vmsvga_state_s *s)
-@@ -507,12 +516,12 @@
+@@ -512,12 +521,12 @@ static inline uint32_t vmsvga_fifo_read(
static void vmsvga_fifo_run(struct vmsvga_state_s *s)
{
@@ -121,7 +120,7 @@ Index: git/hw/vmware_vga.c
case SVGA_CMD_UPDATE:
case SVGA_CMD_UPDATE_VERBOSE:
x = vmsvga_fifo_read(s);
-@@ -612,7 +621,7 @@
+@@ -617,7 +626,7 @@ static void vmsvga_fifo_run(struct vmsvg
while (args --)
vmsvga_fifo_read(s);
printf("%s: Unknown command 0x%02x in SVGA command FIFO\n",
@@ -130,71 +129,24 @@ Index: git/hw/vmware_vga.c
break;
}
-@@ -914,8 +923,9 @@
- s->width = -1;
- s->height = -1;
- s->svgaid = SVGA_ID;
-- s->depth = 24;
-+ s->depth = 32;
- s->bypp = (s->depth + 7) >> 3;
-+ s->bypp = 4; /* XXX: until we can get host's actual depth */
- s->cursor.on = 0;
- s->redraw_fifo_first = 0;
- s->redraw_fifo_last = 0;
-@@ -1140,6 +1150,12 @@
- /* XXX: use optimized standard vga accesses */
- cpu_register_physical_memory(VBE_DISPI_LFB_PHYSICAL_ADDRESS,
- vga_ram_size, vga_ram_offset);
-+
-+#ifdef EMBED_STDVGA
-+ s->map_addr = VBE_DISPI_LFB_PHYSICAL_ADDRESS;
-+ s->map_end = VBE_DISPI_LFB_PHYSICAL_ADDRESS + vga_ram_size;
-+ vga_dirty_log_start((VGAState *) s);
-+#endif
- #endif
- }
+@@ -1136,6 +1145,12 @@ static void vmsvga_init(struct vmsvga_st
-Index: git/kqemu.c
-===================================================================
---- git.orig/kqemu.c 2009-12-02 13:13:56.000000000 +0000
-+++ git/kqemu.c 2010-01-14 15:55:40.000000000 +0000
-@@ -93,6 +93,8 @@
- int qpi_io_memory;
- uint32_t kqemu_comm_base; /* physical address of the QPI communication page */
+ vga_init_vbe(&s->vga);
-+extern int enable_gl;
++#ifdef EMBED_STDVGA
++ s->vga.map_addr = VBE_DISPI_LFB_PHYSICAL_ADDRESS;
++ s->vga.map_end = VBE_DISPI_LFB_PHYSICAL_ADDRESS + vga_ram_size;
++ vga_dirty_log_start(s);
++#endif
+
- #define cpuid(index, eax, ebx, ecx, edx) \
- asm volatile ("cpuid" \
- : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) \
-@@ -860,6 +862,22 @@
- else
- env->hflags &= ~HF_OSFXSR_MASK;
+ rom_add_vga(VGABIOS_FILENAME);
-+ /* OPENGL Stuff */
-+ if (enable_gl && ((env->hflags & HF_CPL_MASK) == 3)) {
-+ int index = (env->eip >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
-+ if (env->segs[R_CS].base != 0)
-+ fprintf(stderr, "env->segs[R_CS].base != 0 !\n");
-+ else if (__builtin_expect(env->tlb_table[1][index].addr_code !=
-+ (env->eip & TARGET_PAGE_MASK), 0))
-+ ldub_code(env->eip);
-+
-+ if (env->tlb_table[1][index].addend) {
-+ unsigned char *ptr = env->eip + env->tlb_table[1][index].addend;
-+ if (ptr[0] == 0xcd && ptr[1] == 0x99)
-+ helper_opengl();
-+ }
-+ }
-+
- LOG_INT("kqemu: kqemu_cpu_exec: ret=0x%x\n", ret);
- if (ret == KQEMU_RET_SYSCALL) {
- /* syscall instruction */
-Index: git/qemu-char.c
+ vmsvga_reset(s);
+Index: qemu/qemu-char.c
===================================================================
---- git.orig/qemu-char.c 2009-12-02 13:13:56.000000000 +0000
-+++ git/qemu-char.c 2010-01-14 15:55:40.000000000 +0000
-@@ -2112,6 +2112,69 @@
+--- qemu.orig/qemu-char.c 2010-05-11 18:05:22.955784896 -0400
++++ qemu/qemu-char.c 2010-05-12 17:20:54.280909040 -0400
+@@ -2232,6 +2232,69 @@ static CharDriverState *qemu_chr_open_so
return NULL;
}
@@ -253,7 +205,7 @@ Index: git/qemu-char.c
+ chr->opaque = chr;
+ chr->chr_write = opengl_chr_write;
+
-+ qemu_chr_reset(chr);
++ qemu_chr_generic_open(chr);
+
+ return chr;
+}
@@ -261,57 +213,66 @@ Index: git/qemu-char.c
+#define qemu_chr_open_opengl() 0
+#endif
+
- CharDriverState *qemu_chr_open(const char *label, const char *filename, void (*init)(struct CharDriverState *s))
+ QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
{
- const char *p;
-@@ -2192,6 +2255,9 @@
- chr = chr_baum_init();
- } else
- #endif
-+ if (!strcmp(filename, "opengl")) {
-+ chr = qemu_chr_open_opengl();
-+ } else
- {
- chr = NULL;
+ char host[65], port[33], width[8], height[8];
+@@ -2352,6 +2415,10 @@ QemuOpts *qemu_chr_parse_compat(const ch
+ qemu_opt_set(opts, "path", filename);
+ return opts;
}
-Index: git/sdl.c
++ if (!strcmp(filename, "opengl")){
++ qemu_opt_set(opts, "backend", "opengl");
++ return opts;
++ }
+
+ fail:
+ fprintf(stderr, "%s: fail on \"%s\"\n", __FUNCTION__, filename);
+@@ -2368,6 +2435,7 @@ static const struct {
+ { .name = "udp", .open = qemu_chr_open_udp },
+ { .name = "msmouse", .open = qemu_chr_open_msmouse },
+ { .name = "vc", .open = text_console_init },
++ { .name = "opengl", .open = qemu_chr_open_opengl },
+ #ifdef _WIN32
+ { .name = "file", .open = qemu_chr_open_win_file_out },
+ { .name = "pipe", .open = qemu_chr_open_win_pipe },
+Index: qemu/sdl.c
===================================================================
---- git.orig/sdl.c 2009-12-02 13:13:56.000000000 +0000
-+++ git/sdl.c 2010-01-14 15:55:40.000000000 +0000
-@@ -54,6 +54,8 @@
- static int guest_x, guest_y;
- static SDL_Cursor *guest_sprite = 0;
+--- qemu.orig/sdl.c 2010-05-11 18:05:22.959804376 -0400
++++ qemu/sdl.c 2010-05-12 12:10:40.128783931 -0400
+@@ -58,6 +58,8 @@ static uint8_t allocator;
+ static SDL_PixelFormat host_format;
+ static int scaling_active = 0;
+extern void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window);
+
static void sdl_update(DisplayState *ds, int x, int y, int w, int h)
{
- SDL_Rect rec;
-@@ -85,7 +87,9 @@
+ // printf("updating x=%d y=%d w=%d h=%d\n", x, y, w, h);
+@@ -119,12 +121,22 @@ static void do_sdl_resize(int new_width,
static void sdl_resize(DisplayState *ds)
{
+- if (!allocator) {
+ SDL_SysWMinfo info;
- int flags;
+ static Display *dpy;
-
- // printf("resizing to %d %d\n", w, h);
-
-@@ -104,6 +108,13 @@
- }
-
- sdl_setdata(ds);
+
-+ SDL_GetWMInfo(&info);
-+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display &&
-+ (!dpy || dpy == info.info.x11.display)) {
-+ dpy = info.info.x11.display;
-+ opengl_exec_set_parent_window(dpy, info.info.x11.window);
-+ }
- }
-
- /* generic keyboard conversion */
-@@ -323,7 +334,7 @@
++ if (!allocator) {
+ if (!scaling_active)
+ do_sdl_resize(ds_get_width(ds), ds_get_height(ds), 0);
+ else if (real_screen->format->BitsPerPixel != ds_get_bits_per_pixel(ds))
+ do_sdl_resize(real_screen->w, real_screen->h, ds_get_bits_per_pixel(ds));
+ sdl_setdata(ds);
++
++ SDL_GetWMInfo(&info);
++ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display &&
++ (!dpy || dpy == info.info.x11.display)) {
++ dpy = info.info.x11.display;
++ opengl_exec_set_parent_window(dpy, info.info.x11.window);
++ }
+ } else {
+ if (guest_screen != NULL) {
+ SDL_FreeSurface(guest_screen);
+@@ -453,7 +465,7 @@ static void sdl_show_cursor(void)
if (!kbd_mouse_is_absolute()) {
SDL_ShowCursor(1);
@@ -320,7 +281,7 @@ Index: git/sdl.c
(gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
SDL_SetCursor(guest_sprite);
else
-@@ -334,7 +345,8 @@
+@@ -464,7 +476,8 @@ static void sdl_show_cursor(void)
static void sdl_grab_start(void)
{
if (guest_cursor) {
@@ -330,7 +291,7 @@ Index: git/sdl.c
if (!kbd_mouse_is_absolute() && !absolute_enabled)
SDL_WarpMouse(guest_x, guest_y);
} else
-@@ -375,8 +387,8 @@
+@@ -505,8 +518,8 @@ static void sdl_send_mouse_event(int dx,
absolute_enabled = 1;
}
@@ -341,7 +302,7 @@ Index: git/sdl.c
} else if (absolute_enabled) {
sdl_show_cursor();
absolute_enabled = 0;
-@@ -606,7 +618,8 @@
+@@ -760,7 +773,8 @@ static void sdl_mouse_warp(int x, int y,
if (!guest_cursor)
sdl_show_cursor();
if (gui_grab || kbd_mouse_is_absolute() || absolute_enabled) {
@@ -351,18 +312,7 @@ Index: git/sdl.c
if (!kbd_mouse_is_absolute() && !absolute_enabled)
SDL_WarpMouse(x, y);
}
-@@ -631,6 +644,10 @@
- line = image;
- for (x = 0; x < width; x ++, dst ++) {
- switch (bpp) {
-+ case 32:
-+ src = *(line ++); src |= *(line ++);
-+ src = *(line ++); src |= *(line ++);
-+ break;
- case 24:
- src = *(line ++); src |= *(line ++); src |= *(line ++);
- break;
-@@ -657,7 +674,7 @@
+@@ -814,7 +828,7 @@ static void sdl_mouse_define(int width,
}
guest_sprite = SDL_CreateCursor(sprite, mask, width, height, hot_x, hot_y);
@@ -371,17 +321,17 @@ Index: git/sdl.c
(gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
SDL_SetCursor(guest_sprite);
}
-@@ -673,6 +690,7 @@
- {
+@@ -831,6 +845,7 @@ void sdl_display_init(DisplayState *ds,
int flags;
uint8_t data = 0;
+ DisplayAllocator *da;
+ SDL_SysWMinfo info;
+ const SDL_VideoInfo *vi;
#if defined(__APPLE__)
- /* always use generic keymaps */
-@@ -694,6 +712,12 @@
- exit(1);
- }
+@@ -855,6 +870,12 @@ void sdl_display_init(DisplayState *ds,
+ vi = SDL_GetVideoInfo();
+ host_format = *(vi->vfmt);
+ SDL_GetWMInfo(&info);
+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
@@ -392,7 +342,7 @@ Index: git/sdl.c
dcl = qemu_mallocz(sizeof(DisplayChangeListener));
dcl->dpy_update = sdl_update;
dcl->dpy_resize = sdl_resize;
-@@ -717,4 +741,9 @@
+@@ -890,4 +911,9 @@ void sdl_display_init(DisplayState *ds,
gui_fullscreen_initial_grab = 1;
sdl_grab_start();
}
@@ -402,31 +352,19 @@ Index: git/sdl.c
+ opengl_exec_set_parent_window(info.info.x11.display,
+ info.info.x11.window);
}
-Index: git/slirp/ctl.h
+Index: qemu/slirp/udp.c
===================================================================
---- git.orig/slirp/ctl.h 2009-12-02 13:13:56.000000000 +0000
-+++ git/slirp/ctl.h 2010-01-14 15:55:40.000000000 +0000
-@@ -2,6 +2,7 @@
- #define CTL_EXEC 1
- #define CTL_ALIAS 2
- #define CTL_DNS 3
-+#define CTL_OPENGL 6
-
- #define CTL_SPECIAL "10.0.2.0"
- #define CTL_LOCAL "10.0.2.15"
-Index: git/slirp/udp.c
-===================================================================
---- git.orig/slirp/udp.c 2009-12-02 13:13:56.000000000 +0000
-+++ git/slirp/udp.c 2010-01-14 15:55:40.000000000 +0000
+--- qemu.orig/slirp/udp.c 2010-05-11 18:05:22.955784896 -0400
++++ qemu/slirp/udp.c 2010-05-12 12:10:40.129784123 -0400
@@ -40,6 +40,7 @@
#include <slirp.h>
#include "ip_icmp.h"
+#include "bswap.h"
- #ifdef LOG_ENABLED
- struct udpstat udpstat;
-@@ -153,6 +154,11 @@
+ static u_int8_t udp_tos(struct socket *so);
+
+@@ -125,6 +126,11 @@ udp_input(register struct mbuf *m, int i
goto bad;
}
@@ -435,25 +373,25 @@ Index: git/slirp/udp.c
+ goto bad;
+ }
+
- if (slirp_restrict)
+ if (slirp->restricted) {
goto bad;
-
-Index: git/sysemu.h
+ }
+Index: qemu/sysemu.h
===================================================================
---- git.orig/sysemu.h 2009-12-02 13:13:56.000000000 +0000
-+++ git/sysemu.h 2010-01-14 15:55:40.000000000 +0000
-@@ -96,6 +96,7 @@
- extern int no_quit;
- extern int semihosting_enabled;
+--- qemu.orig/sysemu.h 2010-05-11 18:05:22.959804376 -0400
++++ qemu/sysemu.h 2010-05-12 12:10:40.129784123 -0400
+@@ -141,6 +141,7 @@ extern int semihosting_enabled;
extern int old_param;
+ extern int boot_menu;
+ extern QEMUClock *rtc_clock;
+extern int force_pointer;
- extern const char *bootp_filename;
- #ifdef USE_KQEMU
-Index: git/target-i386/beginend_funcs.sh
+ #define MAX_NODES 64
+ extern int nb_numa_nodes;
+Index: qemu/target-i386/beginend_funcs.sh
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ git/target-i386/beginend_funcs.sh 2010-01-14 15:55:40.000000000 +0000
++++ qemu/target-i386/beginend_funcs.sh 2010-05-12 12:10:40.129784123 -0400
@@ -0,0 +1,23 @@
+#! /bin/sh
+# Copyright 2008 (C) Intel Corporation
@@ -478,10 +416,10 @@ Index: git/target-i386/beginend_funcs.sh
+echo -e MAGIC_MACRO\(glCallList\)\\n
+echo -e MAGIC_MACRO\(glCallLists\)\\n
+echo -e MAGIC_MACRO\(glEdgeFlag{,v}\)\\n
-Index: git/target-i386/ghash.c
+Index: qemu/target-i386/ghash.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ git/target-i386/ghash.c 2010-01-14 15:55:40.000000000 +0000
++++ qemu/target-i386/ghash.c 2010-05-12 12:10:40.130781590 -0400
@@ -0,0 +1,347 @@
+/* This is a modified and simplified version of original ghash.c */
+
@@ -830,10 +768,10 @@ Index: git/target-i386/ghash.c
+ hash_node = next;
+ }
+}
-Index: git/target-i386/ghash.h
+Index: qemu/target-i386/ghash.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ git/target-i386/ghash.h 2010-01-14 15:55:40.000000000 +0000
++++ qemu/target-i386/ghash.h 2010-05-12 12:10:40.130781590 -0400
@@ -0,0 +1,59 @@
+/* This is a modified and simplified version of original ghash.h */
+
@@ -894,10 +832,10 @@ Index: git/target-i386/ghash.h
+
+#endif /* __SIMPLE_HASH_H__ */
+
-Index: git/target-i386/gl_func_perso.h
+Index: qemu/target-i386/gl_func_perso.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ git/target-i386/gl_func_perso.h 2010-01-14 15:55:40.000000000 +0000
++++ qemu/target-i386/gl_func_perso.h 2010-05-12 12:10:40.130781590 -0400
@@ -0,0 +1,135 @@
+/*
+ * Hand-implemented GL/GLX API
@@ -1034,11 +972,11 @@ Index: git/target-i386/gl_func_perso.h
+MAGIC_MACRO(_glGetSelectBuffer_fake),
+MAGIC_MACRO(_glFeedbackBuffer_fake),
+MAGIC_MACRO(_glGetFeedbackBuffer_fake),
-Index: git/target-i386/helper.c
+Index: qemu/target-i386/helper.c
===================================================================
---- git.orig/target-i386/helper.c 2009-12-02 13:13:56.000000000 +0000
-+++ git/target-i386/helper.c 2010-01-14 15:55:40.000000000 +0000
-@@ -1326,7 +1326,7 @@
+--- qemu.orig/target-i386/helper.c 2010-05-11 18:05:22.955784896 -0400
++++ qemu/target-i386/helper.c 2010-05-12 12:10:40.131781711 -0400
+@@ -1433,7 +1433,7 @@ target_phys_addr_t cpu_get_phys_page_deb
}
page_offset = (addr & TARGET_PAGE_MASK) & (page_size - 1);
@@ -1047,21 +985,21 @@ Index: git/target-i386/helper.c
return paddr;
}
-Index: git/target-i386/helper.h
+Index: qemu/target-i386/helper.h
===================================================================
---- git.orig/target-i386/helper.h 2009-12-02 13:13:56.000000000 +0000
-+++ git/target-i386/helper.h 2010-01-14 15:55:40.000000000 +0000
-@@ -214,4 +214,6 @@
+--- qemu.orig/target-i386/helper.h 2010-05-11 18:05:22.956804503 -0400
++++ qemu/target-i386/helper.h 2010-05-12 12:10:40.131781711 -0400
+@@ -217,4 +217,6 @@ DEF_HELPER_2(rclq, tl, tl, tl)
DEF_HELPER_2(rcrq, tl, tl, tl)
#endif
+DEF_HELPER_0(opengl, void)
+
#include "def-helper.h"
-Index: git/target-i386/helper_opengl.c
+Index: qemu/target-i386/helper_opengl.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ git/target-i386/helper_opengl.c 2010-01-14 16:36:59.000000000 +0000
++++ qemu/target-i386/helper_opengl.c 2010-05-12 12:10:40.132781622 -0400
@@ -0,0 +1,1207 @@
+/*
+ * Host-side implementation of GL/GLX API
@@ -1148,16 +1086,16 @@ Index: git/target-i386/helper_opengl.c
+ cpu_x86_handle_mmu_fault((CPUState *) env, addr, 0, 1, 1));
+ return NULL;
+ } else {
-+ if (ret + TARGET_PAGE_SIZE <= phys_ram_size) {
-+ return phys_ram_base + ret +
-+ (((target_ulong) addr) & (TARGET_PAGE_SIZE - 1));
++ if (ret + TARGET_PAGE_SIZE <= last_ram_offset) {
++ return qemu_get_ram_ptr(ret +
++ (((target_ulong) addr) & (TARGET_PAGE_SIZE - 1)));
+ } else {
+ fprintf(stderr,
+ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
+ TARGET_FMT_lx "\n", addr, ret);
+ fprintf(stderr,
-+ "ret=" TARGET_FMT_lx " phys_ram_size= " TARGET_FMT_lx
-+ "\n", ret, (target_ulong) phys_ram_size);
++ "ret=" TARGET_FMT_lx " last_ram_offset= " TARGET_FMT_lx
++ "\n", ret, (target_ulong) last_ram_offset);
+ return NULL;
+ }
+ }
@@ -2270,11 +2208,11 @@ Index: git/target-i386/helper_opengl.c
+ io_register();
+}
+#endif
-Index: git/target-i386/kvm.c
+Index: qemu/target-i386/kvm.c
===================================================================
---- git.orig/target-i386/kvm.c 2009-12-02 13:13:56.000000000 +0000
-+++ git/target-i386/kvm.c 2010-01-14 15:55:40.000000000 +0000
-@@ -480,7 +480,7 @@
+--- qemu.orig/target-i386/kvm.c 2010-05-11 18:05:22.956804503 -0400
++++ qemu/target-i386/kvm.c 2010-05-12 12:10:40.132781622 -0400
+@@ -528,7 +528,7 @@ static int kvm_get_fpu(CPUState *env)
return 0;
}
@@ -2283,10 +2221,10 @@ Index: git/target-i386/kvm.c
{
struct kvm_sregs sregs;
uint32_t hflags;
-Index: git/target-i386/mesa_enums.c
+Index: qemu/target-i386/mesa_enums.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ git/target-i386/mesa_enums.c 2010-01-14 15:55:40.000000000 +0000
++++ qemu/target-i386/mesa_enums.c 2010-05-12 12:10:40.163783695 -0400
@@ -0,0 +1,4890 @@
+/* DO NOT EDIT - This file generated automatically by gl_enums.py (from Mesa) script */
+
@@ -7178,10 +7116,10 @@ Index: git/target-i386/mesa_enums.c
+}
+
+
-Index: git/target-i386/mesa_get.c
+Index: qemu/target-i386/mesa_get.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ git/target-i386/mesa_get.c 2010-01-14 15:55:40.000000000 +0000
++++ qemu/target-i386/mesa_get.c 2010-05-12 12:10:40.171781452 -0400
@@ -0,0 +1,5563 @@
+
+/***
@@ -12746,10 +12684,10 @@ Index: git/target-i386/mesa_get.c
+ params[i] = (GLdouble) values[i];
+}
+
-Index: git/target-i386/mesa_gl.h
+Index: qemu/target-i386/mesa_gl.h
===================================================================