From 11432c69fa396eaad3eb5bd1644e9c86b80b5e55 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 6 Sep 2012 15:22:55 -0700 Subject: qemu: Update from 0.15 to 1.2 Forward port the patches which were not applied upstream (From OE-Core rev: 0c1328a27881f1b3046ed527447608a9fa91b1ea) Signed-off-by: Khem Raj Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- .../qemu/qemu-1.2.0/qemu-vmware-vga-depth.patch | 106 +++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 meta/recipes-devtools/qemu/qemu-1.2.0/qemu-vmware-vga-depth.patch (limited to 'meta/recipes-devtools/qemu/qemu-1.2.0/qemu-vmware-vga-depth.patch') diff --git a/meta/recipes-devtools/qemu/qemu-1.2.0/qemu-vmware-vga-depth.patch b/meta/recipes-devtools/qemu/qemu-1.2.0/qemu-vmware-vga-depth.patch new file mode 100644 index 0000000000..a1b8035b70 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu-1.2.0/qemu-vmware-vga-depth.patch @@ -0,0 +1,106 @@ +# fix VMware VGA driver depth calculation error, which may cause segmentation fault +# +# ktian1, 06/29/2010 + +Upstream-Status: Pending + +Index: qemu-1.2.0/console.h +=================================================================== +--- qemu-1.2.0.orig/console.h 2012-09-06 14:12:23.371832381 -0700 ++++ qemu-1.2.0/console.h 2012-09-06 14:12:23.627832390 -0700 +@@ -171,6 +171,12 @@ + void (*free_displaysurface)(DisplaySurface *surface); + }; + ++struct DisplayPostCallback { ++ void (*postcall) (void *); ++ void *parm; ++ struct DisplayPostCallback *next; ++}; ++ + struct DisplayState { + struct DisplaySurface *surface; + void *opaque; +@@ -178,6 +184,7 @@ + + struct DisplayAllocator* allocator; + struct DisplayChangeListener* listeners; ++ struct DisplayPostCallback* postcalls; + + void (*mouse_set)(int x, int y, int on); + void (*cursor_define)(QEMUCursor *cursor); +@@ -233,6 +240,12 @@ + ds->listeners = dcl; + } + ++static inline void register_displaypostcallback(DisplayState *ds, DisplayPostCallback *dpc) ++{ ++ dpc->next = ds->postcalls; ++ ds->postcalls = dpc; ++} ++ + static inline void dpy_update(DisplayState *s, int x, int y, int w, int h) + { + struct DisplayChangeListener *dcl = s->listeners; +Index: qemu-1.2.0/hw/vmware_vga.c +=================================================================== +--- qemu-1.2.0.orig/hw/vmware_vga.c 2012-09-06 14:12:23.371832381 -0700 ++++ qemu-1.2.0/hw/vmware_vga.c 2012-09-06 14:18:05.595845288 -0700 +@@ -1081,6 +1081,8 @@ + static void vmsvga_init(struct vmsvga_state_s *s, + MemoryRegion *address_space, MemoryRegion *io) + { ++ DisplayPostCallback *dpc; ++ + s->scratch_size = SVGA_SCRATCH_SIZE; + s->scratch = g_malloc(s->scratch_size * 4); + +@@ -1098,6 +1100,10 @@ + vga_common_init(&s->vga); + vga_init(&s->vga, address_space, io, true); + vmstate_register(NULL, 0, &vmstate_vga_common, &s->vga); ++ dpc = g_malloc0(sizeof(DisplayPostCallback)); ++ dpc->postcall = vmsvga_reset; ++ dpc->parm = s; ++ register_displaypostcallback(s->vga.ds, dpc); + + s->depth = ds_get_bits_per_pixel(s->vga.ds); + s->bypp = ds_get_bytes_per_pixel(s->vga.ds); +Index: qemu-1.2.0/qemu-common.h +=================================================================== +--- qemu-1.2.0.orig/qemu-common.h 2012-09-06 14:12:23.371832381 -0700 ++++ qemu-1.2.0/qemu-common.h 2012-09-06 14:12:23.643832391 -0700 +@@ -250,6 +250,7 @@ + typedef struct DisplayChangeListener DisplayChangeListener; + typedef struct DisplaySurface DisplaySurface; + typedef struct DisplayAllocator DisplayAllocator; ++typedef struct DisplayPostCallback DisplayPostCallback; + typedef struct PixelFormat PixelFormat; + typedef struct TextConsole TextConsole; + typedef TextConsole QEMUConsole; +Index: qemu-1.2.0/vl.c +=================================================================== +--- qemu-1.2.0.orig/vl.c 2012-09-06 14:12:23.371832381 -0700 ++++ qemu-1.2.0/vl.c 2012-09-06 14:17:32.635844142 -0700 +@@ -2352,6 +2352,7 @@ + char boot_devices[33] = "cad"; /* default to HD->floppy->CD-ROM */ + DisplayState *ds; + DisplayChangeListener *dcl; ++ DisplayPostCallback *dpc; + int cyls, heads, secs, translation; + QemuOpts *hda_opts = NULL, *opts, *machine_opts; + QemuOptsList *olist; +@@ -3699,6 +3700,13 @@ + + /* display setup */ + dpy_resize(ds); ++ dpc = ds->postcalls; ++ while (dpc != NULL) { ++ if (dpc->postcall != NULL) ++ dpc->postcall(dpc->parm); ++ dpc = dpc->next; ++ } ++ + dcl = ds->listeners; + while (dcl != NULL) { + if (dcl->dpy_refresh != NULL) { -- cgit v1.2.3-54-g00ecf