All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: [PULL 04/14] spice: move display_init() to QemuSpiceOps.
Date: Thu, 22 Oct 2020 07:12:13 +0200	[thread overview]
Message-ID: <20201022051223.6181-5-kraxel@redhat.com> (raw)
In-Reply-To: <20201022051223.6181-1-kraxel@redhat.com>

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20201019075224.14803-5-kraxel@redhat.com
---
 include/ui/qemu-spice-module.h | 1 +
 include/ui/qemu-spice.h        | 7 -------
 softmmu/vl.c                   | 2 +-
 ui/spice-core.c                | 1 +
 ui/spice-module.c              | 9 +++++++++
 5 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/include/ui/qemu-spice-module.h b/include/ui/qemu-spice-module.h
index b182bc4c21a6..dbe09035dade 100644
--- a/include/ui/qemu-spice-module.h
+++ b/include/ui/qemu-spice-module.h
@@ -20,6 +20,7 @@
 
 struct QemuSpiceOps {
     void (*init)(void);
+    void (*display_init)(void);
     int (*migrate_info)(const char *h, int p, int t, const char *s);
 };
 
diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h
index e6df0a8715b0..a3fd1ea5ade8 100644
--- a/include/ui/qemu-spice.h
+++ b/include/ui/qemu-spice.h
@@ -66,13 +66,6 @@ static inline int qemu_spice_display_add_client(int csock, int skipauth,
     return -1;
 }
 
-static inline void qemu_spice_display_init(void)
-{
-    /* This must never be called if CONFIG_SPICE is disabled */
-    error_report("spice support is disabled");
-    abort();
-}
-
 #endif /* CONFIG_SPICE */
 
 static inline bool qemu_using_spice(Error **errp)
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 65c34a6b8a2e..8a06fe8bf77a 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -4447,7 +4447,7 @@ void qemu_init(int argc, char **argv, char **envp)
 #endif
 
     if (using_spice) {
-        qemu_spice_display_init();
+        qemu_spice.display_init();
     }
 
     if (foreach_device_config(DEV_GDB, gdbserver_start) < 0) {
diff --git a/ui/spice-core.c b/ui/spice-core.c
index 6ef66eb387de..82d5dbda3e26 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -995,6 +995,7 @@ int qemu_spice_display_is_running(SimpleSpiceDisplay *ssd)
 
 static struct QemuSpiceOps real_spice_ops = {
     .init         = qemu_spice_init,
+    .display_init = qemu_spice_display_init,
     .migrate_info = qemu_spice_migrate_info,
 };
 
diff --git a/ui/spice-module.c b/ui/spice-module.c
index a30fa452ea93..56868aaffe9a 100644
--- a/ui/spice-module.c
+++ b/ui/spice-module.c
@@ -18,6 +18,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/error-report.h"
 #include "ui/qemu-spice-module.h"
 
 int using_spice;
@@ -26,6 +27,13 @@ static void qemu_spice_init_stub(void)
 {
 }
 
+static void qemu_spice_display_init_stub(void)
+{
+    /* This must never be called if CONFIG_SPICE is disabled */
+    error_report("spice support is disabled");
+    abort();
+}
+
 static int qemu_spice_migrate_info_stub(const char *h, int p, int t,
                                         const char *s)
 {
@@ -34,5 +42,6 @@ static int qemu_spice_migrate_info_stub(const char *h, int p, int t,
 
 struct QemuSpiceOps qemu_spice = {
     .init         = qemu_spice_init_stub,
+    .display_init = qemu_spice_display_init_stub,
     .migrate_info = qemu_spice_migrate_info_stub,
 };
-- 
2.27.0



  parent reply	other threads:[~2020-10-22  5:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22  5:12 [PULL 00/14] Modules 20201022 patches Gerd Hoffmann
2020-10-22  5:12 ` [PULL 01/14] spice: add module helpers Gerd Hoffmann
2020-10-22  5:12 ` [PULL 02/14] spice: add QemuSpiceOps, move migrate_info Gerd Hoffmann
2020-10-22  5:12 ` [PULL 03/14] spice: move qemu_spice_init() to QemuSpiceOps Gerd Hoffmann
2020-10-22  5:12 ` Gerd Hoffmann [this message]
2020-10-22  5:12 ` [PULL 05/14] spice: move add_interface() " Gerd Hoffmann
2020-10-22  5:12 ` [PULL 06/14] spice: move auth functions " Gerd Hoffmann
2020-10-22  5:12 ` [PULL 07/14] spice: move display_add_client() " Gerd Hoffmann
2020-10-22  5:12 ` [PULL 08/14] spice: wire up monitor in QemuSpiceOps Gerd Hoffmann
2020-10-22  5:12 ` [PULL 09/14] spice: load module when enabled on the cmdline Gerd Hoffmann
2020-10-22  5:12 ` [PULL 10/14] modules: dependencies infrastructure Gerd Hoffmann
2020-10-22  5:12 ` [PULL 11/14] modules: add spice dependencies Gerd Hoffmann
2020-10-22  5:12 ` [PULL 12/14] spice: flip modules switch Gerd Hoffmann
2020-10-22  5:12 ` [PULL 13/14] opengl: build egl-headless display modular Gerd Hoffmann
2020-10-22  5:12 ` [PULL 14/14] opengl: build opengl helper code modular Gerd Hoffmann
2020-10-22 13:25 ` [PULL 00/14] Modules 20201022 patches Peter Maydell

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=20201022051223.6181-5-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@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.