From 50bb158a7ab92a97bc8ceccbab02a991e8eb123d Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Dec 12 2016 21:04:42 +0000 Subject: Rebase to qemu-2.8.0-rc3 --- diff --git a/0001-qxl-Only-emit-QXL_INTERRUPT_CLIENT_MONITORS_CONFIG-o.patch b/0001-qxl-Only-emit-QXL_INTERRUPT_CLIENT_MONITORS_CONFIG-o.patch deleted file mode 100644 index 9b0faa5..0000000 --- a/0001-qxl-Only-emit-QXL_INTERRUPT_CLIENT_MONITORS_CONFIG-o.patch +++ /dev/null @@ -1,106 +0,0 @@ -From d1fd2760ce6025f55b7c71ca303d49afbf17ad8e Mon Sep 17 00:00:00 2001 -Message-Id: -From: Christophe Fergeau -Date: Fri, 28 Oct 2016 16:48:40 +0200 -Subject: [PATCH] qxl: Only emit QXL_INTERRUPT_CLIENT_MONITORS_CONFIG on config - changes - -Currently if the client keeps sending the same monitor config to -QEMU/spice-server, QEMU will always raise -a QXL_INTERRUPT_CLIENT_MONITORS_CONFIG regardless of whether there was a -change or not. -Guest-side (with fedora 25), the kernel QXL KMS driver will also forward the -event to user-space without checking if there were actual changes. -Next in line are gnome-shell/mutter (on a default f25 install), which -will try to reconfigure everything without checking if there is anything -to do. -Where this gets ugly is that when applying the resolution changes, -gnome-shell/mutter will call drmModeRmFB, drmModeAddFB, and -drmModeSetCrtc, which will cause the primary surface to be destroyed and -recreated by the QXL KMS driver. This in turn will cause the client to -resend a client monitors config message, which will cause QEMU to reemit -an interrupt with an unchanged monitors configuration, ... -This causes https://bugzilla.redhat.com/show_bug.cgi?id=1266484 - -This commit makes sure that we only emit -QXL_INTERRUPT_CLIENT_MONITORS_CONFIG when there are actual configuration -changes the guest should act on. - -Signed-off-by: Christophe Fergeau -Signed-off-by: Cole Robinson ---- - hw/display/qxl.c | 37 ++++++++++++++++++++++++++++++++++++- - 1 file changed, 36 insertions(+), 1 deletion(-) - -diff --git a/hw/display/qxl.c b/hw/display/qxl.c -index 0e2682d..62d0c80 100644 ---- a/hw/display/qxl.c -+++ b/hw/display/qxl.c -@@ -992,6 +992,34 @@ static uint32_t qxl_crc32(const uint8_t *p, unsigned len) - return crc32(0xffffffff, p, len) ^ 0xffffffff; - } - -+static bool qxl_rom_monitors_config_changed(QXLRom *rom, -+ VDAgentMonitorsConfig *monitors_config, -+ unsigned int max_outputs) -+{ -+ int i; -+ unsigned int monitors_count; -+ -+ monitors_count = MIN(monitors_config->num_of_monitors, max_outputs); -+ -+ if (rom->client_monitors_config.count != monitors_count) { -+ return true; -+ } -+ -+ for (i = 0 ; i < rom->client_monitors_config.count ; ++i) { -+ VDAgentMonConfig *monitor = &monitors_config->monitors[i]; -+ QXLURect *rect = &rom->client_monitors_config.heads[i]; -+ /* monitor->depth ignored */ -+ if ((rect->left != monitor->x) || -+ (rect->top != monitor->y) || -+ (rect->right != monitor->x + monitor->width) || -+ (rect->bottom != monitor->y + monitor->height)) { -+ return true; -+ } -+ } -+ -+ return false; -+} -+ - /* called from main context only */ - static int interface_client_monitors_config(QXLInstance *sin, - VDAgentMonitorsConfig *monitors_config) -@@ -1000,6 +1028,7 @@ static int interface_client_monitors_config(QXLInstance *sin, - QXLRom *rom = memory_region_get_ram_ptr(&qxl->rom_bar); - int i; - unsigned max_outputs = ARRAY_SIZE(rom->client_monitors_config.heads); -+ bool config_changed = false; - - if (qxl->revision < 4) { - trace_qxl_client_monitors_config_unsupported_by_device(qxl->id, -@@ -1030,6 +1059,10 @@ static int interface_client_monitors_config(QXLInstance *sin, - } - #endif - -+ config_changed = qxl_rom_monitors_config_changed(rom, -+ monitors_config, -+ max_outputs); -+ - memset(&rom->client_monitors_config, 0, - sizeof(rom->client_monitors_config)); - rom->client_monitors_config.count = monitors_config->num_of_monitors; -@@ -1059,7 +1092,9 @@ static int interface_client_monitors_config(QXLInstance *sin, - trace_qxl_interrupt_client_monitors_config(qxl->id, - rom->client_monitors_config.count, - rom->client_monitors_config.heads); -- qxl_send_events(qxl, QXL_INTERRUPT_CLIENT_MONITORS_CONFIG); -+ if (config_changed) { -+ qxl_send_events(qxl, QXL_INTERRUPT_CLIENT_MONITORS_CONFIG); -+ } - return 1; - } - --- -2.9.3 - diff --git a/qemu.spec b/qemu.spec index f5d93d2..a8a0311 100644 --- a/qemu.spec +++ b/qemu.spec @@ -82,7 +82,7 @@ Requires: %{name}-block-ssh = %{epoch}:%{version}-%{release} %undefine _hardened_build # Release candidate version tracking -%global rcver rc2 +%global rcver rc3 %if 0%{?rcver:1} %global rcrel .%{rcver} %global rcstr -%{rcver} @@ -92,7 +92,7 @@ Requires: %{name}-block-ssh = %{epoch}:%{version}-%{release} Summary: QEMU is a FAST! processor emulator Name: qemu Version: 2.8.0 -Release: 0.2%{?rcrel}%{?dist} +Release: 0.3%{?rcrel}%{?dist} Epoch: 2 License: GPLv2+ and LGPLv2+ and BSD Group: Development/Tools @@ -126,10 +126,6 @@ Source21: 50-kvm-s390x.conf # /etc/security/limits.d/95-kvm-ppc64-memlock.conf Source22: 95-kvm-ppc64-memlock.conf -# Fix flickering display with boxes + wayland VM (bz #1392239) -# Posted, but not yet upstream -Patch0001: 0001-qxl-Only-emit-QXL_INTERRUPT_CLIENT_MONITORS_CONFIG-o.patch - # documentation deps BuildRequires: texi2html BuildRequires: texinfo @@ -1952,6 +1948,9 @@ getent passwd qemu >/dev/null || \ %changelog +* Mon Dec 12 2016 Cole Robinson - 2:2.8.0-0.3-rc3 +- Rebase to qemu-2.8.0-rc3 + * Mon Dec 05 2016 Cole Robinson - 2:2.8.0-0.2-rc2 - Rebuild to pick up changed libxen* sonames diff --git a/sources b/sources index 487ad5a..154a95c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7c8544a006e3dfc96124cb9a86350ce3 qemu-2.8.0-rc2.tar.bz2 +SHA512 (qemu-2.8.0-rc3.tar.bz2) = 3c153f5e6ed6e2e0ecc27e948e60b4145834fc7c6afdbf6d36d5ca0597c015e1e08600af63987eec666be50aff598b24a3eece2e6c37d03f738957f11134d95a