diff --git a/0225-qxl-always-update-displaysurface-on-resize.patch b/0225-qxl-always-update-displaysurface-on-resize.patch new file mode 100644 index 0000000..ec92f32 --- /dev/null +++ b/0225-qxl-always-update-displaysurface-on-resize.patch @@ -0,0 +1,44 @@ +From 8046044514de3ef6a37bb982c8e239b9dc34208d Mon Sep 17 00:00:00 2001 +From: Gerd Hoffmann +Date: Fri, 14 Sep 2012 22:09:23 +0200 +Subject: [PATCH 225/228] qxl: always update displaysurface on resize + +Don't try to be clever and skip displaysurface reinitialization in case +the size hasn't changed. Other parameters might have changed +nevertheless, for example depth or stride, resulting in rendering being +broken then. + +Trigger: boot linux guest with vesafb, start X11, make sure both vesafb +and X11 use the display same resolution. Then watch X11 screen being +upside down. + +Signed-off-by: Gerd Hoffmann +--- + hw/qxl-render.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/hw/qxl-render.c b/hw/qxl-render.c +index e2e3fe2..b66c168 100644 +--- a/hw/qxl-render.c ++++ b/hw/qxl-render.c +@@ -99,7 +99,6 @@ static void qxl_render_update_area_unlocked(PCIQXLDevice *qxl) + { + VGACommonState *vga = &qxl->vga; + int i; +- DisplaySurface *surface = vga->ds->surface; + + if (qxl->guest_primary.resized) { + qxl->guest_primary.resized = 0; +@@ -112,9 +111,6 @@ static void qxl_render_update_area_unlocked(PCIQXLDevice *qxl) + qxl->guest_primary.qxl_stride, + qxl->guest_primary.bytes_pp, + qxl->guest_primary.bits_pp); +- } +- if (surface->width != qxl->guest_primary.surface.width || +- surface->height != qxl->guest_primary.surface.height) { + if (qxl->guest_primary.qxl_stride > 0) { + qemu_free_displaysurface(vga->ds); + qemu_create_displaysurface_from(qxl->guest_primary.surface.width, +-- +1.7.12 + diff --git a/0226-qxl-update_area_io-cleanup-invalid-parameters-handli.patch b/0226-qxl-update_area_io-cleanup-invalid-parameters-handli.patch new file mode 100644 index 0000000..9082549 --- /dev/null +++ b/0226-qxl-update_area_io-cleanup-invalid-parameters-handli.patch @@ -0,0 +1,49 @@ +From 286f37492e7e3f746aba6fb5df4579a7fc1301da Mon Sep 17 00:00:00 2001 +From: Michael Tokarev +Date: Wed, 19 Sep 2012 17:41:26 +0400 +Subject: [PATCH 227/228] qxl/update_area_io: cleanup invalid parameters + handling + +This cleans up two additions of almost the same code in commits +511b13e2c9 and ccc2960d654. While at it, make error paths +consistent (always use 'break' instead of 'return'). + +Signed-off-by: Michael Tokarev +Cc: Dunrong Huang +Cc: Alon Levy +Signed-off-by: Gerd Hoffmann +--- + hw/qxl.c | 13 +++---------- + 1 file changed, 3 insertions(+), 10 deletions(-) + +diff --git a/hw/qxl.c b/hw/qxl.c +index bb0b5e1..1f0f4e7 100644 +--- a/hw/qxl.c ++++ b/hw/qxl.c +@@ -1551,20 +1551,13 @@ async_common: + if (d->ram->update_surface > d->ssd.num_surfaces) { + qxl_set_guest_bug(d, "QXL_IO_UPDATE_AREA: invalid surface id %d\n", + d->ram->update_surface); +- return; ++ break; + } +- if (update.left >= update.right || update.top >= update.bottom) { ++ if (update.left >= update.right || update.top >= update.bottom || ++ update.left < 0 || update.top < 0) { + qxl_set_guest_bug(d, + "QXL_IO_UPDATE_AREA: invalid area (%ux%u)x(%ux%u)\n", + update.left, update.top, update.right, update.bottom); +- return; +- } +- +- if (update.left < 0 || update.top < 0 || update.left >= update.right || +- update.top >= update.bottom) { +- qxl_set_guest_bug(d, "QXL_IO_UPDATE_AREA: " +- "invalid area(%d,%d,%d,%d)\n", update.left, +- update.right, update.top, update.bottom); + break; + } + if (async == QXL_ASYNC) { +-- +1.7.12 + diff --git a/0227-qxl-fix-range-check-for-rev3-io-commands.patch b/0227-qxl-fix-range-check-for-rev3-io-commands.patch new file mode 100644 index 0000000..95df3f9 --- /dev/null +++ b/0227-qxl-fix-range-check-for-rev3-io-commands.patch @@ -0,0 +1,29 @@ +From 3133cf6b440dab301639ff979714bb08cab68eec Mon Sep 17 00:00:00 2001 +From: Gerd Hoffmann +Date: Tue, 25 Sep 2012 13:56:40 +0200 +Subject: [PATCH 228/228] qxl: fix range check for rev3 io commands. + +Enables QXL_IO_FLUSH_SURFACES_ASYNC and QXL_IO_FLUSH_RELEASE +which are part of the qxl rev3 feature set. + +Signed-off-by: Gerd Hoffmann +--- + hw/qxl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/hw/qxl.c b/hw/qxl.c +index 1f0f4e7..ad5ebd5 100644 +--- a/hw/qxl.c ++++ b/hw/qxl.c +@@ -1470,7 +1470,7 @@ static void ioport_write(void *opaque, target_phys_addr_t addr, + } + + if (d->revision <= QXL_REVISION_STABLE_V10 && +- io_port >= QXL_IO_FLUSH_SURFACES_ASYNC) { ++ io_port > QXL_IO_FLUSH_RELEASE) { + qxl_set_guest_bug(d, "unsupported io %d for revision %d\n", + io_port, d->revision); + return; +-- +1.7.12 + diff --git a/0370-usb-redir-Adjust-pkg-config-check-for-usbredirparser.patch b/0370-usb-redir-Adjust-pkg-config-check-for-usbredirparser.patch new file mode 100644 index 0000000..f38d08e --- /dev/null +++ b/0370-usb-redir-Adjust-pkg-config-check-for-usbredirparser.patch @@ -0,0 +1,49 @@ +From a873076925e599afe3852f87546e479f23c279ba Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Tue, 25 Sep 2012 13:22:21 +0200 +Subject: [PATCH 370/382] usb-redir: Adjust pkg-config check for + usbredirparser .pc file rename (v2) + +The usbredir 0.5 release introduced the new API for 64 bit packet ids, but +it kept the libusbredirparser.pc name as is, meaning that older versions of +qemu will still have their pkg-config check for usbredirparser fulfilled, +and build with the usb-redir device. Due to the API change there will be +some compiler warnings, but the build will succeed, however the usb-redir +device will be broken on 32 bit machines. + +To solve this a new usbredir-0.5.2 release is coming, which renames the +libusbredirparser.pc file to libusbredirparser-0.5.pc, so that it will no +longer fulfill the pkg-config check of the qemu-1.2 and older releases, +stopping the (silent) breakage. This patch adjusts qemu master's configure +to properly detect the new usbredir release. + +Changes in v2: +-Not only use the new .pc name in the check but also when getting cflags + and libs! + +Signed-off-by: Hans de Goede +--- + configure | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure b/configure +index d63530a..6c8b8c9 100755 +--- a/configure ++++ b/configure +@@ -2765,10 +2765,10 @@ fi + + # check for usbredirparser for usb network redirection support + if test "$usb_redir" != "no" ; then +- if $pkg_config --atleast-version=0.5 libusbredirparser >/dev/null 2>&1 ; then ++ if $pkg_config --atleast-version=0.5 libusbredirparser-0.5 >/dev/null 2>&1 ; then + usb_redir="yes" +- usb_redir_cflags=$($pkg_config --cflags libusbredirparser 2>/dev/null) +- usb_redir_libs=$($pkg_config --libs libusbredirparser 2>/dev/null) ++ usb_redir_cflags=$($pkg_config --cflags libusbredirparser-0.5 2>/dev/null) ++ usb_redir_libs=$($pkg_config --libs libusbredirparser-0.5 2>/dev/null) + QEMU_CFLAGS="$QEMU_CFLAGS $usb_redir_cflags" + libs_softmmu="$libs_softmmu $usb_redir_libs" + else +-- +1.7.12 + diff --git a/qemu.spec b/qemu.spec index e06b79e..224a55c 100644 --- a/qemu.spec +++ b/qemu.spec @@ -39,7 +39,7 @@ Summary: QEMU is a FAST! processor emulator Name: qemu Version: 1.2.0 -Release: 9%{?dist} +Release: 10%{?dist} # Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped Epoch: 2 License: GPLv2+ and LGPLv2+ and BSD @@ -126,6 +126,9 @@ Patch221: 0221-qxl-better-cleanup-for-surface-destroy.patch Patch222: 0222-hw-qxl-tracing-fixes.patch Patch223: 0223-qxl-add-trace-event-for-QXL_IO_LOG.patch Patch224: 0224-hw-qxl-support-client-monitor-configuration-via-devi.patch +Patch225: 0225-qxl-always-update-displaysurface-on-resize.patch +Patch226: 0226-qxl-update_area_io-cleanup-invalid-parameters-handli.patch +Patch227: 0227-qxl-fix-range-check-for-rev3-io-commands.patch # Ugh, ton of USB bugfixes / preparation patches for usb-redir # live-migration which did not make 1.2.0 :| @@ -201,6 +204,7 @@ Patch0368: 0368-uhci-Don-t-queue-up-packets-after-one-with-the-SPD-f.patch # And the last few ehci fixes + the actual usb-redir live migration code # Not yet upstream but should get there real soon Patch0369: 0369-ehci-Fix-interrupt-packet-MULT-handling.patch +Patch0370: 0370-usb-redir-Adjust-pkg-config-check-for-usbredirparser.patch # Revert c3767ed0eb5d0. # NOT upstream (hopefully will be soon). @@ -222,7 +226,7 @@ BuildRequires: pciutils-devel BuildRequires: pulseaudio-libs-devel BuildRequires: ncurses-devel BuildRequires: libattr-devel -BuildRequires: usbredir-devel >= 0.5 +BuildRequires: usbredir-devel >= 0.5.2 BuildRequires: texinfo %ifarch %{ix86} x86_64 BuildRequires: spice-protocol >= 0.12.1 @@ -529,6 +533,9 @@ such as kvm_stat. %patch222 -p1 %patch223 -p1 %patch224 -p1 +%patch225 -p1 +%patch226 -p1 +%patch227 -p1 %patch301 -p1 %patch302 -p1 @@ -599,6 +606,7 @@ such as kvm_stat. %patch367 -p1 %patch368 -p1 %patch369 -p1 +%patch370 -p1 %patch900 -p1 @@ -1069,6 +1077,10 @@ fi %{_mandir}/man1/qemu-img.1* %changelog +* Tue Sep 25 2012 Hans de Goede - 2:1.2.0-9 +- Sync Spice patchsets with upstream (rhbz#860238) +- Fix building with usbredir >= 0.5.2 + * Thu Sep 20 2012 Hans de Goede - 2:1.2.0-9 - Sync USB and Spice patchsets with upstream