|
Hans de Goede |
56753f |
From e07eeb01819b40b839cc12b2eb658f48f13a5ff0 Mon Sep 17 00:00:00 2001
|
|
Hans de Goede |
56753f |
From: Alon Levy <alevy@redhat.com>
|
|
Hans de Goede |
56753f |
Date: Fri, 24 Feb 2012 23:19:28 +0200
|
|
Hans de Goede |
56753f |
Subject: [PATCH 415/434] qxl: require spice >= 0.8.2
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
drop all ifdefs on SPICE_INTERFACE_QXL_MINOR >= 1 as a result,
|
|
Hans de Goede |
56753f |
any check for SPICE_SERVER_VERSION that is now always satisfied,
|
|
Hans de Goede |
56753f |
and SPICE_INTERFACE_CORE_MINOR >= 3 tests, because
|
|
Hans de Goede |
56753f |
0.8.2 has SPICE_INTERFACE_QXL_MINOR == 1 and
|
|
Hans de Goede |
56753f |
SPICE_INTERFACE_CORE_MINOR == 3.
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
Signed-off-by: Alon Levy <alevy@redhat.com>
|
|
Hans de Goede |
56753f |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Hans de Goede |
56753f |
---
|
|
Hans de Goede |
56753f |
configure | 2 +-
|
|
Hans de Goede |
56753f |
hw/qxl.c | 40 ----------------------------------------
|
|
Hans de Goede |
56753f |
hw/qxl.h | 4 ----
|
|
Hans de Goede |
56753f |
ui/spice-core.c | 17 -----------------
|
|
Hans de Goede |
56753f |
ui/spice-display.c | 12 ------------
|
|
Hans de Goede |
56753f |
5 files changed, 1 insertion(+), 74 deletions(-)
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
diff --git a/configure b/configure
|
|
Hans de Goede |
56753f |
index a4848a4..b03172c 100755
|
|
Hans de Goede |
56753f |
--- a/configure
|
|
Hans de Goede |
56753f |
+++ b/configure
|
|
Hans de Goede |
56753f |
@@ -2501,7 +2501,7 @@ int main(void) { spice_server_new(); return 0; }
|
|
Hans de Goede |
56753f |
EOF
|
|
Hans de Goede |
56753f |
spice_cflags=$($pkg_config --cflags spice-protocol spice-server 2>/dev/null)
|
|
Hans de Goede |
56753f |
spice_libs=$($pkg_config --libs spice-protocol spice-server 2>/dev/null)
|
|
Hans de Goede |
56753f |
- if $pkg_config --atleast-version=0.6.0 spice-server >/dev/null 2>&1 && \
|
|
Hans de Goede |
56753f |
+ if $pkg_config --atleast-version=0.8.2 spice-server >/dev/null 2>&1 && \
|
|
Hans de Goede |
56753f |
compile_prog "$spice_cflags" "$spice_libs" ; then
|
|
Hans de Goede |
56753f |
spice="yes"
|
|
Hans de Goede |
56753f |
libs_softmmu="$libs_softmmu $spice_libs"
|
|
Hans de Goede |
56753f |
diff --git a/hw/qxl.c b/hw/qxl.c
|
|
Hans de Goede |
56753f |
index 17f2576..0be9859 100644
|
|
Hans de Goede |
56753f |
--- a/hw/qxl.c
|
|
Hans de Goede |
56753f |
+++ b/hw/qxl.c
|
|
Hans de Goede |
56753f |
@@ -125,9 +125,7 @@ static void qxl_ring_set_dirty(PCIQXLDevice *qxl);
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
void qxl_guest_bug(PCIQXLDevice *qxl, const char *msg, ...)
|
|
Hans de Goede |
56753f |
{
|
|
Hans de Goede |
56753f |
-#if SPICE_INTERFACE_QXL_MINOR >= 1
|
|
Hans de Goede |
56753f |
qxl_send_events(qxl, QXL_INTERRUPT_ERROR);
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
if (qxl->guestdebug) {
|
|
Hans de Goede |
56753f |
va_list ap;
|
|
Hans de Goede |
56753f |
va_start(ap, msg);
|
|
Hans de Goede |
56753f |
@@ -149,12 +147,8 @@ void qxl_spice_update_area(PCIQXLDevice *qxl, uint32_t surface_id,
|
|
Hans de Goede |
56753f |
qxl->ssd.worker->update_area(qxl->ssd.worker, surface_id, area,
|
|
Hans de Goede |
56753f |
dirty_rects, num_dirty_rects, clear_dirty_region);
|
|
Hans de Goede |
56753f |
} else {
|
|
Hans de Goede |
56753f |
-#if SPICE_INTERFACE_QXL_MINOR >= 1
|
|
Hans de Goede |
56753f |
spice_qxl_update_area_async(&qxl->ssd.qxl, surface_id, area,
|
|
Hans de Goede |
56753f |
clear_dirty_region, 0);
|
|
Hans de Goede |
56753f |
-#else
|
|
Hans de Goede |
56753f |
- abort();
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
@@ -171,24 +165,18 @@ static void qxl_spice_destroy_surface_wait(PCIQXLDevice *qxl, uint32_t id,
|
|
Hans de Goede |
56753f |
qxl_async_io async)
|
|
Hans de Goede |
56753f |
{
|
|
Hans de Goede |
56753f |
if (async) {
|
|
Hans de Goede |
56753f |
-#if SPICE_INTERFACE_QXL_MINOR < 1
|
|
Hans de Goede |
56753f |
- abort();
|
|
Hans de Goede |
56753f |
-#else
|
|
Hans de Goede |
56753f |
spice_qxl_destroy_surface_async(&qxl->ssd.qxl, id,
|
|
Hans de Goede |
56753f |
(uint64_t)id);
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
} else {
|
|
Hans de Goede |
56753f |
qxl->ssd.worker->destroy_surface_wait(qxl->ssd.worker, id);
|
|
Hans de Goede |
56753f |
qxl_spice_destroy_surface_wait_complete(qxl, id);
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
-#if SPICE_INTERFACE_QXL_MINOR >= 1
|
|
Hans de Goede |
56753f |
static void qxl_spice_flush_surfaces_async(PCIQXLDevice *qxl)
|
|
Hans de Goede |
56753f |
{
|
|
Hans de Goede |
56753f |
spice_qxl_flush_surfaces_async(&qxl->ssd.qxl, 0);
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
void qxl_spice_loadvm_commands(PCIQXLDevice *qxl, struct QXLCommandExt *ext,
|
|
Hans de Goede |
56753f |
uint32_t count)
|
|
Hans de Goede |
56753f |
@@ -217,11 +205,7 @@ static void qxl_spice_destroy_surfaces_complete(PCIQXLDevice *qxl)
|
|
Hans de Goede |
56753f |
static void qxl_spice_destroy_surfaces(PCIQXLDevice *qxl, qxl_async_io async)
|
|
Hans de Goede |
56753f |
{
|
|
Hans de Goede |
56753f |
if (async) {
|
|
Hans de Goede |
56753f |
-#if SPICE_INTERFACE_QXL_MINOR < 1
|
|
Hans de Goede |
56753f |
- abort();
|
|
Hans de Goede |
56753f |
-#else
|
|
Hans de Goede |
56753f |
spice_qxl_destroy_surfaces_async(&qxl->ssd.qxl, 0);
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
} else {
|
|
Hans de Goede |
56753f |
qxl->ssd.worker->destroy_surfaces(qxl->ssd.worker);
|
|
Hans de Goede |
56753f |
qxl_spice_destroy_surfaces_complete(qxl);
|
|
Hans de Goede |
56753f |
@@ -493,7 +477,6 @@ static const char *io_port_to_string(uint32_t io_port)
|
|
Hans de Goede |
56753f |
[QXL_IO_DESTROY_PRIMARY] = "QXL_IO_DESTROY_PRIMARY",
|
|
Hans de Goede |
56753f |
[QXL_IO_DESTROY_SURFACE_WAIT] = "QXL_IO_DESTROY_SURFACE_WAIT",
|
|
Hans de Goede |
56753f |
[QXL_IO_DESTROY_ALL_SURFACES] = "QXL_IO_DESTROY_ALL_SURFACES",
|
|
Hans de Goede |
56753f |
-#if SPICE_INTERFACE_QXL_MINOR >= 1
|
|
Hans de Goede |
56753f |
[QXL_IO_UPDATE_AREA_ASYNC] = "QXL_IO_UPDATE_AREA_ASYNC",
|
|
Hans de Goede |
56753f |
[QXL_IO_MEMSLOT_ADD_ASYNC] = "QXL_IO_MEMSLOT_ADD_ASYNC",
|
|
Hans de Goede |
56753f |
[QXL_IO_CREATE_PRIMARY_ASYNC] = "QXL_IO_CREATE_PRIMARY_ASYNC",
|
|
Hans de Goede |
56753f |
@@ -503,7 +486,6 @@ static const char *io_port_to_string(uint32_t io_port)
|
|
Hans de Goede |
56753f |
= "QXL_IO_DESTROY_ALL_SURFACES_ASYNC",
|
|
Hans de Goede |
56753f |
[QXL_IO_FLUSH_SURFACES_ASYNC] = "QXL_IO_FLUSH_SURFACES_ASYNC",
|
|
Hans de Goede |
56753f |
[QXL_IO_FLUSH_RELEASE] = "QXL_IO_FLUSH_RELEASE",
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
};
|
|
Hans de Goede |
56753f |
return io_port_to_string[io_port];
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
@@ -738,8 +720,6 @@ static int interface_flush_resources(QXLInstance *sin)
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
static void qxl_create_guest_primary_complete(PCIQXLDevice *d);
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
-#if SPICE_INTERFACE_QXL_MINOR >= 1
|
|
Hans de Goede |
56753f |
-
|
|
Hans de Goede |
56753f |
/* called from spice server thread context only */
|
|
Hans de Goede |
56753f |
static void interface_async_complete(QXLInstance *sin, uint64_t cookie)
|
|
Hans de Goede |
56753f |
{
|
|
Hans de Goede |
56753f |
@@ -767,8 +747,6 @@ static void interface_async_complete(QXLInstance *sin, uint64_t cookie)
|
|
Hans de Goede |
56753f |
qxl_send_events(qxl, QXL_INTERRUPT_IO_CMD);
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
-
|
|
Hans de Goede |
56753f |
static const QXLInterface qxl_interface = {
|
|
Hans de Goede |
56753f |
.base.type = SPICE_INTERFACE_QXL,
|
|
Hans de Goede |
56753f |
.base.description = "qxl gpu",
|
|
Hans de Goede |
56753f |
@@ -788,9 +766,7 @@ static const QXLInterface qxl_interface = {
|
|
Hans de Goede |
56753f |
.req_cursor_notification = interface_req_cursor_notification,
|
|
Hans de Goede |
56753f |
.notify_update = interface_notify_update,
|
|
Hans de Goede |
56753f |
.flush_resources = interface_flush_resources,
|
|
Hans de Goede |
56753f |
-#if SPICE_INTERFACE_QXL_MINOR >= 1
|
|
Hans de Goede |
56753f |
.async_complete = interface_async_complete,
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
};
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
static void qxl_enter_vga_mode(PCIQXLDevice *d)
|
|
Hans de Goede |
56753f |
@@ -1140,9 +1116,7 @@ static void ioport_write(void *opaque, target_phys_addr_t addr,
|
|
Hans de Goede |
56753f |
PCIQXLDevice *d = opaque;
|
|
Hans de Goede |
56753f |
uint32_t io_port = addr;
|
|
Hans de Goede |
56753f |
qxl_async_io async = QXL_SYNC;
|
|
Hans de Goede |
56753f |
-#if SPICE_INTERFACE_QXL_MINOR >= 1
|
|
Hans de Goede |
56753f |
uint32_t orig_io_port = io_port;
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
switch (io_port) {
|
|
Hans de Goede |
56753f |
case QXL_IO_RESET:
|
|
Hans de Goede |
56753f |
@@ -1152,10 +1126,8 @@ static void ioport_write(void *opaque, target_phys_addr_t addr,
|
|
Hans de Goede |
56753f |
case QXL_IO_CREATE_PRIMARY:
|
|
Hans de Goede |
56753f |
case QXL_IO_UPDATE_IRQ:
|
|
Hans de Goede |
56753f |
case QXL_IO_LOG:
|
|
Hans de Goede |
56753f |
-#if SPICE_INTERFACE_QXL_MINOR >= 1
|
|
Hans de Goede |
56753f |
case QXL_IO_MEMSLOT_ADD_ASYNC:
|
|
Hans de Goede |
56753f |
case QXL_IO_CREATE_PRIMARY_ASYNC:
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
break;
|
|
Hans de Goede |
56753f |
default:
|
|
Hans de Goede |
56753f |
if (d->mode != QXL_MODE_VGA) {
|
|
Hans de Goede |
56753f |
@@ -1163,17 +1135,14 @@ static void ioport_write(void *opaque, target_phys_addr_t addr,
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
dprint(d, 1, "%s: unexpected port 0x%x (%s) in vga mode\n",
|
|
Hans de Goede |
56753f |
__func__, io_port, io_port_to_string(io_port));
|
|
Hans de Goede |
56753f |
-#if SPICE_INTERFACE_QXL_MINOR >= 1
|
|
Hans de Goede |
56753f |
/* be nice to buggy guest drivers */
|
|
Hans de Goede |
56753f |
if (io_port >= QXL_IO_UPDATE_AREA_ASYNC &&
|
|
Hans de Goede |
56753f |
io_port <= QXL_IO_DESTROY_ALL_SURFACES_ASYNC) {
|
|
Hans de Goede |
56753f |
qxl_send_events(d, QXL_INTERRUPT_IO_CMD);
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
return;
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
-#if SPICE_INTERFACE_QXL_MINOR >= 1
|
|
Hans de Goede |
56753f |
/* we change the io_port to avoid ifdeffery in the main switch */
|
|
Hans de Goede |
56753f |
orig_io_port = io_port;
|
|
Hans de Goede |
56753f |
switch (io_port) {
|
|
Hans de Goede |
56753f |
@@ -1212,7 +1181,6 @@ async_common:
|
|
Hans de Goede |
56753f |
default:
|
|
Hans de Goede |
56753f |
break;
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
switch (io_port) {
|
|
Hans de Goede |
56753f |
case QXL_IO_UPDATE_AREA:
|
|
Hans de Goede |
56753f |
@@ -1304,7 +1272,6 @@ async_common:
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
qxl_spice_destroy_surface_wait(d, val, async);
|
|
Hans de Goede |
56753f |
break;
|
|
Hans de Goede |
56753f |
-#if SPICE_INTERFACE_QXL_MINOR >= 1
|
|
Hans de Goede |
56753f |
case QXL_IO_FLUSH_RELEASE: {
|
|
Hans de Goede |
56753f |
QXLReleaseRing *ring = &d->ram->release_ring;
|
|
Hans de Goede |
56753f |
if (ring->prod - ring->cons + 1 == ring->num_items) {
|
|
Hans de Goede |
56753f |
@@ -1325,7 +1292,6 @@ async_common:
|
|
Hans de Goede |
56753f |
d->num_free_res);
|
|
Hans de Goede |
56753f |
qxl_spice_flush_surfaces_async(d);
|
|
Hans de Goede |
56753f |
break;
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
case QXL_IO_DESTROY_ALL_SURFACES:
|
|
Hans de Goede |
56753f |
d->mode = QXL_MODE_UNDEFINED;
|
|
Hans de Goede |
56753f |
qxl_spice_destroy_surfaces(d, async);
|
|
Hans de Goede |
56753f |
@@ -1336,16 +1302,12 @@ async_common:
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
return;
|
|
Hans de Goede |
56753f |
cancel_async:
|
|
Hans de Goede |
56753f |
-#if SPICE_INTERFACE_QXL_MINOR >= 1
|
|
Hans de Goede |
56753f |
if (async) {
|
|
Hans de Goede |
56753f |
qxl_send_events(d, QXL_INTERRUPT_IO_CMD);
|
|
Hans de Goede |
56753f |
qemu_mutex_lock(&d->async_lock);
|
|
Hans de Goede |
56753f |
d->current_async = QXL_UNDEFINED_IO;
|
|
Hans de Goede |
56753f |
qemu_mutex_unlock(&d->async_lock);
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
-#else
|
|
Hans de Goede |
56753f |
- return;
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
static uint64_t ioport_read(void *opaque, target_phys_addr_t addr,
|
|
Hans de Goede |
56753f |
@@ -1607,9 +1569,7 @@ static int qxl_init_common(PCIQXLDevice *qxl)
|
|
Hans de Goede |
56753f |
case 2: /* spice 0.6 -- qxl-2 */
|
|
Hans de Goede |
56753f |
pci_device_rev = QXL_REVISION_STABLE_V06;
|
|
Hans de Goede |
56753f |
break;
|
|
Hans de Goede |
56753f |
-#if SPICE_INTERFACE_QXL_MINOR >= 1
|
|
Hans de Goede |
56753f |
case 3: /* qxl-3 */
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
default:
|
|
Hans de Goede |
56753f |
pci_device_rev = QXL_DEFAULT_REVISION;
|
|
Hans de Goede |
56753f |
break;
|
|
Hans de Goede |
56753f |
diff --git a/hw/qxl.h b/hw/qxl.h
|
|
Hans de Goede |
56753f |
index a615eca..9288e46 100644
|
|
Hans de Goede |
56753f |
--- a/hw/qxl.h
|
|
Hans de Goede |
56753f |
+++ b/hw/qxl.h
|
|
Hans de Goede |
56753f |
@@ -108,11 +108,7 @@ typedef struct PCIQXLDevice {
|
|
Hans de Goede |
56753f |
} \
|
|
Hans de Goede |
56753f |
} while (0)
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
-#if SPICE_INTERFACE_QXL_MINOR >= 1
|
|
Hans de Goede |
56753f |
#define QXL_DEFAULT_REVISION QXL_REVISION_STABLE_V10
|
|
Hans de Goede |
56753f |
-#else
|
|
Hans de Goede |
56753f |
-#define QXL_DEFAULT_REVISION QXL_REVISION_STABLE_V06
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
/* qxl.c */
|
|
Hans de Goede |
56753f |
void *qxl_phys2virt(PCIQXLDevice *qxl, QXLPHYSICAL phys, int group_id);
|
|
Hans de Goede |
56753f |
diff --git a/ui/spice-core.c b/ui/spice-core.c
|
|
Hans de Goede |
56753f |
index 27216e9..2c815f1 100644
|
|
Hans de Goede |
56753f |
--- a/ui/spice-core.c
|
|
Hans de Goede |
56753f |
+++ b/ui/spice-core.c
|
|
Hans de Goede |
56753f |
@@ -139,8 +139,6 @@ static void watch_remove(SpiceWatch *watch)
|
|
Hans de Goede |
56753f |
g_free(watch);
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
-#if SPICE_INTERFACE_CORE_MINOR >= 3
|
|
Hans de Goede |
56753f |
-
|
|
Hans de Goede |
56753f |
typedef struct ChannelList ChannelList;
|
|
Hans de Goede |
56753f |
struct ChannelList {
|
|
Hans de Goede |
56753f |
SpiceChannelEventInfo *info;
|
|
Hans de Goede |
56753f |
@@ -257,15 +255,6 @@ static void channel_event(int event, SpiceChannelEventInfo *info)
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
-#else /* SPICE_INTERFACE_CORE_MINOR >= 3 */
|
|
Hans de Goede |
56753f |
-
|
|
Hans de Goede |
56753f |
-static QList *channel_list_get(void)
|
|
Hans de Goede |
56753f |
-{
|
|
Hans de Goede |
56753f |
- return NULL;
|
|
Hans de Goede |
56753f |
-}
|
|
Hans de Goede |
56753f |
-
|
|
Hans de Goede |
56753f |
-#endif /* SPICE_INTERFACE_CORE_MINOR >= 3 */
|
|
Hans de Goede |
56753f |
-
|
|
Hans de Goede |
56753f |
static SpiceCoreInterface core_interface = {
|
|
Hans de Goede |
56753f |
.base.type = SPICE_INTERFACE_CORE,
|
|
Hans de Goede |
56753f |
.base.description = "qemu core services",
|
|
Hans de Goede |
56753f |
@@ -281,9 +270,7 @@ static SpiceCoreInterface core_interface = {
|
|
Hans de Goede |
56753f |
.watch_update_mask = watch_update_mask,
|
|
Hans de Goede |
56753f |
.watch_remove = watch_remove,
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
-#if SPICE_INTERFACE_CORE_MINOR >= 3
|
|
Hans de Goede |
56753f |
.channel_event = channel_event,
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
};
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
#ifdef SPICE_INTERFACE_MIGRATION
|
|
Hans de Goede |
56753f |
@@ -490,7 +477,6 @@ static void migration_state_notifier(Notifier *notifier, void *data)
|
|
Hans de Goede |
56753f |
spice_server_migrate_start(spice_server);
|
|
Hans de Goede |
56753f |
#endif
|
|
Hans de Goede |
56753f |
} else if (migration_has_finished(s)) {
|
|
Hans de Goede |
56753f |
-#if SPICE_SERVER_VERSION >= 0x000701 /* 0.7.1 */
|
|
Hans de Goede |
56753f |
#ifndef SPICE_INTERFACE_MIGRATION
|
|
Hans de Goede |
56753f |
spice_server_migrate_switch(spice_server);
|
|
Hans de Goede |
56753f |
#else
|
|
Hans de Goede |
56753f |
@@ -498,7 +484,6 @@ static void migration_state_notifier(Notifier *notifier, void *data)
|
|
Hans de Goede |
56753f |
} else if (migration_has_failed(s)) {
|
|
Hans de Goede |
56753f |
spice_server_migrate_end(spice_server, false);
|
|
Hans de Goede |
56753f |
#endif
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
@@ -659,11 +644,9 @@ void qemu_spice_init(void)
|
|
Hans de Goede |
56753f |
spice_server_set_noauth(spice_server);
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
-#if SPICE_SERVER_VERSION >= 0x000801
|
|
Hans de Goede |
56753f |
if (qemu_opt_get_bool(opts, "disable-copy-paste", 0)) {
|
|
Hans de Goede |
56753f |
spice_server_set_agent_copypaste(spice_server, false);
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
compression = SPICE_IMAGE_COMPRESS_AUTO_GLZ;
|
|
Hans de Goede |
56753f |
str = qemu_opt_get(opts, "image-compression");
|
|
Hans de Goede |
56753f |
diff --git a/ui/spice-display.c b/ui/spice-display.c
|
|
Hans de Goede |
56753f |
index c6e61d8..ad76bae 100644
|
|
Hans de Goede |
56753f |
--- a/ui/spice-display.c
|
|
Hans de Goede |
56753f |
+++ b/ui/spice-display.c
|
|
Hans de Goede |
56753f |
@@ -64,11 +64,7 @@ void qemu_spice_add_memslot(SimpleSpiceDisplay *ssd, QXLDevMemSlot *memslot,
|
|
Hans de Goede |
56753f |
qxl_async_io async)
|
|
Hans de Goede |
56753f |
{
|
|
Hans de Goede |
56753f |
if (async != QXL_SYNC) {
|
|
Hans de Goede |
56753f |
-#if SPICE_INTERFACE_QXL_MINOR >= 1
|
|
Hans de Goede |
56753f |
spice_qxl_add_memslot_async(&ssd->qxl, memslot, 0);
|
|
Hans de Goede |
56753f |
-#else
|
|
Hans de Goede |
56753f |
- abort();
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
} else {
|
|
Hans de Goede |
56753f |
ssd->worker->add_memslot(ssd->worker, memslot);
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
@@ -84,11 +80,7 @@ void qemu_spice_create_primary_surface(SimpleSpiceDisplay *ssd, uint32_t id,
|
|
Hans de Goede |
56753f |
qxl_async_io async)
|
|
Hans de Goede |
56753f |
{
|
|
Hans de Goede |
56753f |
if (async != QXL_SYNC) {
|
|
Hans de Goede |
56753f |
-#if SPICE_INTERFACE_QXL_MINOR >= 1
|
|
Hans de Goede |
56753f |
spice_qxl_create_primary_surface_async(&ssd->qxl, id, surface, 0);
|
|
Hans de Goede |
56753f |
-#else
|
|
Hans de Goede |
56753f |
- abort();
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
} else {
|
|
Hans de Goede |
56753f |
ssd->worker->create_primary_surface(ssd->worker, id, surface);
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
@@ -99,11 +91,7 @@ void qemu_spice_destroy_primary_surface(SimpleSpiceDisplay *ssd,
|
|
Hans de Goede |
56753f |
uint32_t id, qxl_async_io async)
|
|
Hans de Goede |
56753f |
{
|
|
Hans de Goede |
56753f |
if (async != QXL_SYNC) {
|
|
Hans de Goede |
56753f |
-#if SPICE_INTERFACE_QXL_MINOR >= 1
|
|
Hans de Goede |
56753f |
spice_qxl_destroy_primary_surface_async(&ssd->qxl, id, 0);
|
|
Hans de Goede |
56753f |
-#else
|
|
Hans de Goede |
56753f |
- abort();
|
|
Hans de Goede |
56753f |
-#endif
|
|
Hans de Goede |
56753f |
} else {
|
|
Hans de Goede |
56753f |
ssd->worker->destroy_primary_surface(ssd->worker, id);
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
--
|
|
Hans de Goede |
56753f |
1.7.10
|
|
Hans de Goede |
56753f |
|