qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL for-1.6 0/1] spice patch queue
@ 2013-07-30  8:40 Gerd Hoffmann
  2013-07-30  8:40 ` [Qemu-devel] [PATCH 1/1] spice: fix display initialization Gerd Hoffmann
  0 siblings, 1 reply; 3+ messages in thread
From: Gerd Hoffmann @ 2013-07-30  8:40 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi,

This is the spice patch queue, with a single fix for 1.6.

please pull,
  Gerd

The following changes since commit dbe49aea76a7805f05b33d548b2e543b51fa8bb1:

  Update version for 1.6.0-rc0 (2013-07-29 20:30:29 -0500)

are available in the git repository at:

  git://anongit.freedesktop.org/spice/qemu spice.v72

for you to fetch changes up to 58ae52a8dc7752e3da9a905678580b4cb8181cdc:

  spice: fix display initialization (2013-07-30 10:25:47 +0200)

----------------------------------------------------------------
Gerd Hoffmann (1):
      spice: fix display initialization

 include/sysemu/sysemu.h |    1 -
 include/ui/qemu-spice.h |    2 ++
 ui/spice-core.c         |    5 +++++
 vl.c                    |    2 +-
 4 files changed, 8 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] [PATCH 1/1] spice: fix display initialization
  2013-07-30  8:40 [Qemu-devel] [PULL for-1.6 0/1] spice patch queue Gerd Hoffmann
@ 2013-07-30  8:40 ` Gerd Hoffmann
  2013-07-30 10:30   ` Alon Levy
  0 siblings, 1 reply; 3+ messages in thread
From: Gerd Hoffmann @ 2013-07-30  8:40 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Gerd Hoffmann

Spice has two display interface implementations:  One integrated into
the qxl graphics card, and one generic which can operate with every
qemu-emulated graphics card.

The generic one is activated in case spice is used without qxl.  The
logic for that only caught the "-vga qxl" case, "-device qxl-vga" goes
unnoticed.  Fix that by adding a check in the spice interface
registration so we'll notice the qxl card no matter how it is created.

https://bugzilla.redhat.com/show_bug.cgi?id=981094

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 include/sysemu/sysemu.h |    1 -
 include/ui/qemu-spice.h |    2 ++
 ui/spice-core.c         |    5 +++++
 vl.c                    |    2 +-
 4 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 3caeb66..d7a77b6 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -103,7 +103,6 @@ typedef enum {
 
 extern int vga_interface_type;
 #define xenfb_enabled (vga_interface_type == VGA_XENFB)
-#define qxl_enabled (vga_interface_type == VGA_QXL)
 
 extern int graphic_width;
 extern int graphic_height;
diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h
index eba6d77..c6c756b 100644
--- a/include/ui/qemu-spice.h
+++ b/include/ui/qemu-spice.h
@@ -27,6 +27,7 @@
 #include "monitor/monitor.h"
 
 extern int using_spice;
+extern int spice_displays;
 
 void qemu_spice_init(void);
 void qemu_spice_input_init(void);
@@ -57,6 +58,7 @@ static inline CharDriverState *qemu_chr_open_spice_port(const char *name)
 #include "monitor/monitor.h"
 
 #define using_spice 0
+#define spice_displays 0
 static inline int qemu_spice_set_passwd(const char *passwd,
                                         bool fail_if_connected,
                                         bool disconnect_if_connected)
diff --git a/ui/spice-core.c b/ui/spice-core.c
index 033fd89..bd7a248 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -48,6 +48,7 @@ static char *auth_passwd;
 static time_t auth_expires = TIME_MAX;
 static int spice_migration_completed;
 int using_spice = 0;
+int spice_displays;
 
 static QemuThread me;
 
@@ -836,6 +837,10 @@ int qemu_spice_add_interface(SpiceBaseInstance *sin)
         qemu_add_vm_change_state_handler(vm_change_state_handler, NULL);
     }
 
+    if (strcmp(sin->sif->type, SPICE_INTERFACE_QXL) == 0) {
+        spice_displays++;
+    }
+
     return spice_server_add_interface(spice_server, sin);
 }
 
diff --git a/vl.c b/vl.c
index 25b8f2f..f422a1c 100644
--- a/vl.c
+++ b/vl.c
@@ -4387,7 +4387,7 @@ int main(int argc, char **argv, char **envp)
     }
 #endif
 #ifdef CONFIG_SPICE
-    if (using_spice && !qxl_enabled) {
+    if (using_spice && !spice_displays) {
         qemu_spice_display_init(ds);
     }
 #endif
-- 
1.7.9.7

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH 1/1] spice: fix display initialization
  2013-07-30  8:40 ` [Qemu-devel] [PATCH 1/1] spice: fix display initialization Gerd Hoffmann
@ 2013-07-30 10:30   ` Alon Levy
  0 siblings, 0 replies; 3+ messages in thread
From: Alon Levy @ 2013-07-30 10:30 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: Anthony Liguori, qemu-devel

> Spice has two display interface implementations:  One integrated into
> the qxl graphics card, and one generic which can operate with every
> qemu-emulated graphics card.
> 
> The generic one is activated in case spice is used without qxl.  The
> logic for that only caught the "-vga qxl" case, "-device qxl-vga" goes
> unnoticed.  Fix that by adding a check in the spice interface
> registration so we'll notice the qxl card no matter how it is created.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=981094

Reviewed-by: Alon Levy <alevy@redhat.com>

> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  include/sysemu/sysemu.h |    1 -
>  include/ui/qemu-spice.h |    2 ++
>  ui/spice-core.c         |    5 +++++
>  vl.c                    |    2 +-
>  4 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
> index 3caeb66..d7a77b6 100644
> --- a/include/sysemu/sysemu.h
> +++ b/include/sysemu/sysemu.h
> @@ -103,7 +103,6 @@ typedef enum {
>  
>  extern int vga_interface_type;
>  #define xenfb_enabled (vga_interface_type == VGA_XENFB)
> -#define qxl_enabled (vga_interface_type == VGA_QXL)
>  
>  extern int graphic_width;
>  extern int graphic_height;
> diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h
> index eba6d77..c6c756b 100644
> --- a/include/ui/qemu-spice.h
> +++ b/include/ui/qemu-spice.h
> @@ -27,6 +27,7 @@
>  #include "monitor/monitor.h"
>  
>  extern int using_spice;
> +extern int spice_displays;
>  
>  void qemu_spice_init(void);
>  void qemu_spice_input_init(void);
> @@ -57,6 +58,7 @@ static inline CharDriverState
> *qemu_chr_open_spice_port(const char *name)
>  #include "monitor/monitor.h"
>  
>  #define using_spice 0
> +#define spice_displays 0
>  static inline int qemu_spice_set_passwd(const char *passwd,
>                                          bool fail_if_connected,
>                                          bool disconnect_if_connected)
> diff --git a/ui/spice-core.c b/ui/spice-core.c
> index 033fd89..bd7a248 100644
> --- a/ui/spice-core.c
> +++ b/ui/spice-core.c
> @@ -48,6 +48,7 @@ static char *auth_passwd;
>  static time_t auth_expires = TIME_MAX;
>  static int spice_migration_completed;
>  int using_spice = 0;
> +int spice_displays;
>  
>  static QemuThread me;
>  
> @@ -836,6 +837,10 @@ int qemu_spice_add_interface(SpiceBaseInstance *sin)
>          qemu_add_vm_change_state_handler(vm_change_state_handler, NULL);
>      }
>  
> +    if (strcmp(sin->sif->type, SPICE_INTERFACE_QXL) == 0) {
> +        spice_displays++;
> +    }
> +
>      return spice_server_add_interface(spice_server, sin);
>  }
>  
> diff --git a/vl.c b/vl.c
> index 25b8f2f..f422a1c 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -4387,7 +4387,7 @@ int main(int argc, char **argv, char **envp)
>      }
>  #endif
>  #ifdef CONFIG_SPICE
> -    if (using_spice && !qxl_enabled) {
> +    if (using_spice && !spice_displays) {
>          qemu_spice_display_init(ds);
>      }
>  #endif
> --
> 1.7.9.7
> 
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-30 10:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-30  8:40 [Qemu-devel] [PULL for-1.6 0/1] spice patch queue Gerd Hoffmann
2013-07-30  8:40 ` [Qemu-devel] [PATCH 1/1] spice: fix display initialization Gerd Hoffmann
2013-07-30 10:30   ` Alon Levy

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).