All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: peter.maydell@linaro.org
Cc: "Daniel P . Berrangé" <berrange@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	qemu-devel@nongnu.org, "John Snow" <jsnow@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: [PULL 02/31] spice: Update QXLInterface for spice >= 0.15.0
Date: Wed, 12 Jan 2022 11:26:53 +0000	[thread overview]
Message-ID: <20220112112722.3641051-3-alex.bennee@linaro.org> (raw)
In-Reply-To: <20220112112722.3641051-1-alex.bennee@linaro.org>

From: John Snow <jsnow@redhat.com>

spice updated the spelling (and arguments) of "attache_worker" in
0.15.0. Update QEMU to match, preventing -Wdeprecated-declarations
compilations from reporting build errors.

See also:
https://gitlab.freedesktop.org/spice/spice/-/commit/974692bda1e77af92b71ed43b022439448492cb9

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20211215141949.3512719-3-berrange@redhat.com>
Message-Id: <20220105135009.1584676-3-alex.bennee@linaro.org>

diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h
index 71ecd6cfd1..21fe195e18 100644
--- a/include/ui/qemu-spice.h
+++ b/include/ui/qemu-spice.h
@@ -40,6 +40,12 @@ int qemu_spice_migrate_info(const char *hostname, int port, int tls_port,
 #define SPICE_NEEDS_SET_MM_TIME 0
 #endif
 
+#if defined(SPICE_SERVER_VERSION) && (SPICE_SERVER_VERSION >= 0x000f00)
+#define SPICE_HAS_ATTACHED_WORKER 1
+#else
+#define SPICE_HAS_ATTACHED_WORKER 0
+#endif
+
 #else  /* CONFIG_SPICE */
 
 #include "qemu/error-report.h"
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index e2d6e317da..1f9ad31943 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -517,13 +517,20 @@ static int qxl_track_command(PCIQXLDevice *qxl, struct QXLCommandExt *ext)
 
 /* spice display interface callbacks */
 
-static void interface_attach_worker(QXLInstance *sin, QXLWorker *qxl_worker)
+static void interface_attached_worker(QXLInstance *sin)
 {
     PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl);
 
     trace_qxl_interface_attach_worker(qxl->id);
 }
 
+#if !(SPICE_HAS_ATTACHED_WORKER)
+static void interface_attach_worker(QXLInstance *sin, QXLWorker *qxl_worker)
+{
+    interface_attached_worker(sin);
+}
+#endif
+
 static void interface_set_compression_level(QXLInstance *sin, int level)
 {
     PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl);
@@ -1131,7 +1138,12 @@ static const QXLInterface qxl_interface = {
     .base.major_version      = SPICE_INTERFACE_QXL_MAJOR,
     .base.minor_version      = SPICE_INTERFACE_QXL_MINOR,
 
+#if SPICE_HAS_ATTACHED_WORKER
+    .attached_worker         = interface_attached_worker,
+#else
     .attache_worker          = interface_attach_worker,
+#endif
+
     .set_compression_level   = interface_set_compression_level,
 #if SPICE_NEEDS_SET_MM_TIME
     .set_mm_time             = interface_set_mm_time,
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 1043f47f94..a3078adf91 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -500,10 +500,17 @@ void qemu_spice_display_refresh(SimpleSpiceDisplay *ssd)
 
 /* spice display interface callbacks */
 
+#if SPICE_HAS_ATTACHED_WORKER
+static void interface_attached_worker(QXLInstance *sin)
+{
+    /* nothing to do */
+}
+#else
 static void interface_attach_worker(QXLInstance *sin, QXLWorker *qxl_worker)
 {
     /* nothing to do */
 }
+#endif
 
 static void interface_set_compression_level(QXLInstance *sin, int level)
 {
@@ -702,7 +709,11 @@ static const QXLInterface dpy_interface = {
     .base.major_version      = SPICE_INTERFACE_QXL_MAJOR,
     .base.minor_version      = SPICE_INTERFACE_QXL_MINOR,
 
+#if SPICE_HAS_ATTACHED_WORKER
+    .attached_worker         = interface_attached_worker,
+#else
     .attache_worker          = interface_attach_worker,
+#endif
     .set_compression_level   = interface_set_compression_level,
 #if SPICE_NEEDS_SET_MM_TIME
     .set_mm_time             = interface_set_mm_time,
-- 
2.30.2



  parent reply	other threads:[~2022-01-12 11:31 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-12 11:26 [PULL 00/31] testing/next and other misc fixes Alex Bennée
2022-01-12 11:26 ` [PULL 01/31] ui: avoid compiler warnings from unused clipboard info variable Alex Bennée
2022-01-12 11:26 ` Alex Bennée [this message]
2022-01-12 11:26 ` [PULL 03/31] meson: require liburing >= 0.3 Alex Bennée
2022-01-12 11:26 ` [PULL 04/31] ui: avoid warnings about directdb on Alpine / musl libc Alex Bennée
2022-01-12 11:26 ` [PULL 05/31] ci: explicitly skip I/O tests on alpine Alex Bennée
2022-01-12 11:26 ` [PULL 06/31] tests/docker: switch fedora image to release 35 Alex Bennée
2022-01-12 11:26 ` [PULL 07/31] tests: integrate lcitool for generating build env manifests Alex Bennée
2022-01-12 11:26 ` [PULL 08/31] tests/docker: auto-generate centos8.docker with lcitool Alex Bennée
2022-01-12 11:27 ` [PULL 09/31] tests/docker: auto-generate fedora.docker " Alex Bennée
2022-01-12 11:27 ` [PULL 10/31] tests/docker: auto-generate ubuntu1804.docker " Alex Bennée
2022-01-12 11:27 ` [PULL 11/31] tests/docker: auto-generate ubuntu2004.docker " Alex Bennée
2022-01-12 11:27 ` [PULL 12/31] tests/docker: auto-generate opensuse-leap.docker " Alex Bennée
2022-01-12 11:27 ` [PULL 13/31] tests/docker: remove ubuntu.docker container Alex Bennée
2022-01-12 11:27 ` [PULL 14/31] .gitlab-ci.d/cirrus: auto-generate variables with lcitool Alex Bennée
2022-01-12 11:27 ` [PULL 15/31] tests/docker: updates to alpine package list Alex Bennée
2022-01-12 11:27 ` [PULL 16/31] tests/docker: fix sorting of alpine image package lists Alex Bennée
2022-01-12 11:27 ` [PULL 17/31] tests/docker: fully expand the alpine package list Alex Bennée
2022-01-12 11:27 ` [PULL 18/31] tests/docker: auto-generate alpine.docker with lcitool Alex Bennée
2022-01-12 11:27 ` [PULL 19/31] tests/tcg: use CONFIG_LINUX_USER, not CONFIG_LINUX Alex Bennée
2022-01-12 11:27 ` [PULL 20/31] tests/docker: add libfuse3 development headers Alex Bennée
2022-01-12 11:27 ` [PULL 21/31] hw/arm: add control knob to disable kaslr_seed via DTB Alex Bennée
2022-01-12 11:27 ` [PULL 22/31] monitor: move x-query-profile into accel/tcg to fix build Alex Bennée
2022-01-12 11:27 ` [PULL 23/31] docs/devel: update C standard to C11 Alex Bennée
2022-01-12 11:27 ` [PULL 24/31] docs/devel: more documentation on the use of suffixes Alex Bennée
2022-01-12 11:27 ` [PULL 25/31] linux-user/elfload: add extra logging for hole finding Alex Bennée
2022-01-12 11:27 ` [PULL 26/31] linux-user: don't adjust base of found hole Alex Bennée
2022-01-12 11:27 ` [PULL 27/31] tests/tcg/multiarch: Read fp flags before printf Alex Bennée
2022-01-12 11:27 ` [PULL 28/31] test/tcg/ppc64le: Add float reference files Alex Bennée
2022-01-12 11:27 ` [PULL 29/31] FreeBSD: Upgrade to 12.3 release Alex Bennée
2022-01-12 11:27 ` [PULL 30/31] docker: include bison in debian-tricore-cross Alex Bennée
2022-01-12 11:27 ` [PULL 31/31] linux-user: Remove the deprecated ppc64abi32 target Alex Bennée
2022-02-07  8:51   ` Thomas Huth
2022-02-07 10:20     ` Alex Bennée
2022-01-12 21:20 ` [PULL 00/31] testing/next and other misc fixes Peter Maydell
2022-01-13 10:13   ` Alex Bennée
2022-01-13 12:49     ` Alex Bennée

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220112112722.3641051-3-alex.bennee@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.