|
|
9ae3a8 |
From e2022d7c9e8623092daeca9c9a3f6118f3c7239e Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
Date: Fri, 30 Aug 2013 07:08:09 +0200
|
|
|
9ae3a8 |
Subject: [PATCH 01/29] spice: fix display initialization
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1377846489-22691-2-git-send-email-kraxel@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 53931
|
|
|
9ae3a8 |
O-Subject: [RHEL-7 qemu-kvm PATCH 1/1] spice: fix display initialization
|
|
|
9ae3a8 |
Bugzilla: 974887
|
|
|
9ae3a8 |
RH-Acked-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Spice has two display interface implementations: One integrated into
|
|
|
9ae3a8 |
the qxl graphics card, and one generic which can operate with every
|
|
|
9ae3a8 |
qemu-emulated graphics card.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
The generic one is activated in case spice is used without qxl. The
|
|
|
9ae3a8 |
logic for that only caught the "-vga qxl" case, "-device qxl-vga" goes
|
|
|
9ae3a8 |
unnoticed. Fix that by adding a check in the spice interface
|
|
|
9ae3a8 |
registration so we'll notice the qxl card no matter how it is created.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
https://bugzilla.redhat.com/show_bug.cgi?id=981094
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit 58ae52a8dc7752e3da9a905678580b4cb8181cdc)
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
include/sysemu/sysemu.h | 1 -
|
|
|
9ae3a8 |
include/ui/qemu-spice.h | 2 ++
|
|
|
9ae3a8 |
ui/spice-core.c | 5 +++++
|
|
|
9ae3a8 |
vl.c | 2 +-
|
|
|
9ae3a8 |
4 files changed, 8 insertions(+), 2 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
include/sysemu/sysemu.h | 1 -
|
|
|
9ae3a8 |
include/ui/qemu-spice.h | 2 ++
|
|
|
9ae3a8 |
ui/spice-core.c | 5 +++++
|
|
|
9ae3a8 |
vl.c | 2 +-
|
|
|
9ae3a8 |
4 files changed, 8 insertions(+), 2 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
|
|
|
9ae3a8 |
index 3caeb66..d7a77b6 100644
|
|
|
9ae3a8 |
--- a/include/sysemu/sysemu.h
|
|
|
9ae3a8 |
+++ b/include/sysemu/sysemu.h
|
|
|
9ae3a8 |
@@ -103,7 +103,6 @@ typedef enum {
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
extern int vga_interface_type;
|
|
|
9ae3a8 |
#define xenfb_enabled (vga_interface_type == VGA_XENFB)
|
|
|
9ae3a8 |
-#define qxl_enabled (vga_interface_type == VGA_QXL)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
extern int graphic_width;
|
|
|
9ae3a8 |
extern int graphic_height;
|
|
|
9ae3a8 |
diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h
|
|
|
9ae3a8 |
index eba6d77..c6c756b 100644
|
|
|
9ae3a8 |
--- a/include/ui/qemu-spice.h
|
|
|
9ae3a8 |
+++ b/include/ui/qemu-spice.h
|
|
|
9ae3a8 |
@@ -27,6 +27,7 @@
|
|
|
9ae3a8 |
#include "monitor/monitor.h"
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
extern int using_spice;
|
|
|
9ae3a8 |
+extern int spice_displays;
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
void qemu_spice_init(void);
|
|
|
9ae3a8 |
void qemu_spice_input_init(void);
|
|
|
9ae3a8 |
@@ -57,6 +58,7 @@ static inline CharDriverState *qemu_chr_open_spice_port(const char *name)
|
|
|
9ae3a8 |
#include "monitor/monitor.h"
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
#define using_spice 0
|
|
|
9ae3a8 |
+#define spice_displays 0
|
|
|
9ae3a8 |
static inline int qemu_spice_set_passwd(const char *passwd,
|
|
|
9ae3a8 |
bool fail_if_connected,
|
|
|
9ae3a8 |
bool disconnect_if_connected)
|
|
|
9ae3a8 |
diff --git a/ui/spice-core.c b/ui/spice-core.c
|
|
|
9ae3a8 |
index bcc4199..c8337ab 100644
|
|
|
9ae3a8 |
--- a/ui/spice-core.c
|
|
|
9ae3a8 |
+++ b/ui/spice-core.c
|
|
|
9ae3a8 |
@@ -48,6 +48,7 @@ static char *auth_passwd;
|
|
|
9ae3a8 |
static time_t auth_expires = TIME_MAX;
|
|
|
9ae3a8 |
static int spice_migration_completed;
|
|
|
9ae3a8 |
int using_spice = 0;
|
|
|
9ae3a8 |
+int spice_displays;
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static QemuThread me;
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
@@ -823,6 +824,10 @@ int qemu_spice_add_interface(SpiceBaseInstance *sin)
|
|
|
9ae3a8 |
qemu_add_vm_change_state_handler(vm_change_state_handler, NULL);
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
+ if (strcmp(sin->sif->type, SPICE_INTERFACE_QXL) == 0) {
|
|
|
9ae3a8 |
+ spice_displays++;
|
|
|
9ae3a8 |
+ }
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
return spice_server_add_interface(spice_server, sin);
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/vl.c b/vl.c
|
|
|
9ae3a8 |
index 51c04e7..f7b326a 100644
|
|
|
9ae3a8 |
--- a/vl.c
|
|
|
9ae3a8 |
+++ b/vl.c
|
|
|
9ae3a8 |
@@ -4405,7 +4405,7 @@ int main(int argc, char **argv, char **envp)
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
#endif
|
|
|
9ae3a8 |
#ifdef CONFIG_SPICE
|
|
|
9ae3a8 |
- if (using_spice && !qxl_enabled) {
|
|
|
9ae3a8 |
+ if (using_spice && !spice_displays) {
|
|
|
9ae3a8 |
qemu_spice_display_init(ds);
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
#endif
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|