qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: kraxel@redhat.com, dgilbert@redhat.com, berrange@redhat.com,
	philmd@linaro.org
Subject: [PATCH v3 05/18] ui/spice: Require spice-server >= 0.14.0
Date: Tue, 20 Dec 2022 10:06:32 +0100	[thread overview]
Message-ID: <20221220090645.2844881-6-armbru@redhat.com> (raw)
In-Reply-To: <20221220090645.2844881-1-armbru@redhat.com>

Version 0.14.0 is now old enough to have made it into the major
distributions:

     Debian 11: 0.14.3
     RHEL-8: 0.14.3
     FreeBSD (ports): 0.15.0
     Fedora 35: 0.15.0
     Ubuntu 20.04: 0.14.2
     OpenSUSE Leap 15.3: 0.14.3

Requiring it lets us drop a number of version checks.  The next commit
will clean up some more.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
---
 meson.build                | 2 +-
 hw/display/qxl.h           | 2 --
 include/ui/qemu-spice.h    | 6 +-----
 include/ui/spice-display.h | 2 --
 chardev/spice.c            | 2 --
 hw/display/qxl.c           | 7 +------
 6 files changed, 3 insertions(+), 18 deletions(-)

diff --git a/meson.build b/meson.build
index 9f27c5cea3..31705f7fe9 100644
--- a/meson.build
+++ b/meson.build
@@ -746,7 +746,7 @@ if not get_option('spice_protocol').auto() or have_system
 endif
 spice = not_found
 if not get_option('spice').auto() or have_system
-  spice = dependency('spice-server', version: '>=0.12.5',
+  spice = dependency('spice-server', version: '>=0.14.0',
                      required: get_option('spice'),
                      method: 'pkg-config', kwargs: static_kwargs)
 endif
diff --git a/hw/display/qxl.h b/hw/display/qxl.h
index 7894bd5134..5bec25cdd3 100644
--- a/hw/display/qxl.h
+++ b/hw/display/qxl.h
@@ -100,9 +100,7 @@ struct PCIQXLDevice {
     QXLModes           *modes;
     uint32_t           rom_size;
     MemoryRegion       rom_bar;
-#if SPICE_SERVER_VERSION >= 0x000c06 /* release 0.12.6 */
     uint16_t           max_outputs;
-#endif
 
     /* vram pci bar */
     uint64_t           vram_size;
diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h
index 21fe195e18..a7a1890b3f 100644
--- a/include/ui/qemu-spice.h
+++ b/include/ui/qemu-spice.h
@@ -34,13 +34,9 @@ int qemu_spice_add_display_interface(QXLInstance *qxlin, QemuConsole *con);
 int qemu_spice_migrate_info(const char *hostname, int port, int tls_port,
                             const char *subject);
 
-#if !defined(SPICE_SERVER_VERSION) || (SPICE_SERVER_VERSION < 0xc06)
-#define SPICE_NEEDS_SET_MM_TIME 1
-#else
 #define SPICE_NEEDS_SET_MM_TIME 0
-#endif
 
-#if defined(SPICE_SERVER_VERSION) && (SPICE_SERVER_VERSION >= 0x000f00)
+#if SPICE_SERVER_VERSION >= 0x000f00 /* release 0.15.0 */
 #define SPICE_HAS_ATTACHED_WORKER 1
 #else
 #define SPICE_HAS_ATTACHED_WORKER 0
diff --git a/include/ui/spice-display.h b/include/ui/spice-display.h
index e271e011da..5aa13664d6 100644
--- a/include/ui/spice-display.h
+++ b/include/ui/spice-display.h
@@ -28,11 +28,9 @@
 #include "ui/console.h"
 
 #if defined(CONFIG_OPENGL) && defined(CONFIG_GBM)
-# if SPICE_SERVER_VERSION >= 0x000d01 /* release 0.13.1 */
 #  define HAVE_SPICE_GL 1
 #  include "ui/egl-helpers.h"
 #  include "ui/egl-context.h"
-# endif
 #endif
 
 #define NUM_MEMSLOTS 8
diff --git a/chardev/spice.c b/chardev/spice.c
index bbffef4913..e843d961a7 100644
--- a/chardev/spice.c
+++ b/chardev/spice.c
@@ -98,9 +98,7 @@ static SpiceCharDeviceInterface vmc_interface = {
     .write              = vmc_write,
     .read               = vmc_read,
     .event              = vmc_event,
-#if SPICE_SERVER_VERSION >= 0x000c06
     .flags              = SPICE_CHAR_DEVICE_NOTIFY_WRITABLE,
-#endif
 };
 
 
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 6772849dec..ddca611804 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -260,8 +260,7 @@ static void qxl_spice_monitors_config_async(PCIQXLDevice *qxl, int replay)
                     QXL_COOKIE_TYPE_POST_LOAD_MONITORS_CONFIG,
                     0));
     } else {
-/* >= release 0.12.6, < release 0.14.2 */
-#if SPICE_SERVER_VERSION >= 0x000c06 && SPICE_SERVER_VERSION < 0x000e02
+#if SPICE_SERVER_VERSION < 0x000e02 /* release 0.14.2 */
         if (qxl->max_outputs) {
             spice_qxl_set_max_monitors(&qxl->ssd.qxl, qxl->max_outputs);
         }
@@ -1089,12 +1088,10 @@ static int interface_client_monitors_config(QXLInstance *sin,
         return 1;
     }
 
-#if SPICE_SERVER_VERSION >= 0x000c06 /* release 0.12.6 */
     /* limit number of outputs based on setting limit */
     if (qxl->max_outputs && qxl->max_outputs <= max_outputs) {
         max_outputs = qxl->max_outputs;
     }
-#endif
 
     config_changed = qxl_rom_monitors_config_changed(rom,
                                                      monitors_config,
@@ -2487,9 +2484,7 @@ static Property qxl_properties[] = {
         DEFINE_PROP_UINT32("vram64_size_mb", PCIQXLDevice, vram_size_mb, -1),
         DEFINE_PROP_UINT32("vgamem_mb", PCIQXLDevice, vgamem_size_mb, 16),
         DEFINE_PROP_INT32("surfaces", PCIQXLDevice, ssd.num_surfaces, 1024),
-#if SPICE_SERVER_VERSION >= 0x000c06 /* release 0.12.6 */
         DEFINE_PROP_UINT16("max_outputs", PCIQXLDevice, max_outputs, 0),
-#endif
         DEFINE_PROP_UINT32("xres", PCIQXLDevice, xres, 0),
         DEFINE_PROP_UINT32("yres", PCIQXLDevice, yres, 0),
         DEFINE_PROP_BOOL("global-vmstate", PCIQXLDevice, vga.global_vmstate, false),
-- 
2.38.1



  parent reply	other threads:[~2022-12-20  9:48 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-20  9:06 [PATCH v3 00/18] ui: Move and clean up monitor command code Markus Armbruster
2022-12-20  9:06 ` [PATCH v3 01/18] ui: Check numeric part of expire_password argument @time properly Markus Armbruster
2022-12-20  9:10   ` Daniel P. Berrangé
2022-12-20  9:06 ` [PATCH v3 02/18] ui: Fix silent truncation of numeric keys in HMP sendkey Markus Armbruster
2023-01-04 16:19   ` Dr. David Alan Gilbert
2023-01-09 11:50     ` Markus Armbruster
2022-12-20  9:06 ` [PATCH v3 03/18] ui/spice: Require spice-protocol >= 0.14.0 Markus Armbruster
2022-12-20  9:06 ` [PATCH v3 04/18] Revert "hmp: info spice: take out webdav" Markus Armbruster
2022-12-20  9:06 ` Markus Armbruster [this message]
2022-12-20  9:06 ` [PATCH v3 06/18] ui/spice: QXLInterface method set_mm_time() is now dead, drop Markus Armbruster
2022-12-20  9:06 ` [PATCH v3 07/18] ui/spice: Give hmp_info_spice()'s channel_names[] static linkage Markus Armbruster
2022-12-20  9:06 ` [PATCH v3 08/18] ui: Clean up a few things checkpatch.pl would flag later on Markus Armbruster
2022-12-20 11:13   ` Philippe Mathieu-Daudé
2022-12-20  9:06 ` [PATCH v3 09/18] ui: Move QMP commands from monitor to new ui/ui-qmp-cmds.c Markus Armbruster
2022-12-20  9:06 ` [PATCH v3 10/18] ui: Factor out qmp_add_client() parts and move to ui/ui-qmp-cmds.c Markus Armbruster
2022-12-20  9:06 ` [PATCH v3 11/18] ui: Move HMP commands from monitor to new ui/ui-hmp-cmds.c Markus Armbruster
2022-12-20  9:06 ` [PATCH v3 12/18] ui: Move more HMP commands from monitor to ui/ Markus Armbruster
2022-12-20  9:11   ` Daniel P. Berrangé
2022-12-20 11:22   ` Philippe Mathieu-Daudé
2022-12-20 11:49     ` Markus Armbruster
2022-12-20 12:29       ` Philippe Mathieu-Daudé
2022-12-20 15:30         ` Markus Armbruster
2022-12-20 16:35           ` Philippe Mathieu-Daudé
2022-12-20  9:06 ` [PATCH v3 13/18] ui: Improve "change vnc" error reporting Markus Armbruster
2022-12-20 11:23   ` Philippe Mathieu-Daudé
2022-12-20  9:06 ` [PATCH v3 14/18] ui: Factor out hmp_change_vnc(), and move to ui/ui-hmp-cmds.c Markus Armbruster
2022-12-20  9:06 ` [PATCH v3 15/18] ui: Reduce nesting in hmp_change_vnc() slightly Markus Armbruster
2022-12-20  9:06 ` [PATCH v3 16/18] ui: Split hmp_mouse_set() and move the HMP part to ui/ Markus Armbruster
2022-12-20  9:15   ` Daniel P. Berrangé
2022-12-20 11:20     ` Markus Armbruster
2022-12-20 11:17   ` Philippe Mathieu-Daudé
2023-01-09 14:35     ` Markus Armbruster
2022-12-20  9:06 ` [PATCH v3 17/18] ui: Don't check for mode change after mouse_set error Markus Armbruster
2022-12-20  9:16   ` Daniel P. Berrangé
2022-12-20  9:06 ` [PATCH v3 18/18] ui: Simplify control flow in qemu_mouse_set() Markus Armbruster
2022-12-20  9:17   ` Daniel P. Berrangé
2022-12-20 10:52 ` [PATCH v3 00/18] ui: Move and clean up monitor command code Philippe Mathieu-Daudé
2022-12-20 11:17   ` Markus Armbruster

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=20221220090645.2844881-6-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=philmd@linaro.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).