summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2012-06-10 17:59:15 +0300
committerAlon Levy <alevy@redhat.com>2012-06-29 17:42:54 +0300
commit4592aed78085c9f7457e8a1b75ab14807c91a9ea (patch)
treee5e4e6476268418a886047959c56eccfe96527d9
parent65701191270dc74f70ca105bb161aced306dd293 (diff)
qxl: add QXL_IO_MONITORS_CONFIG_ASYNC
Bumps spice-protocol to 0.12.0 and raises default revision to QXL_REVISION_STABLE_V12. Signed-off-by: Alon Levy <alevy@redhat.com>
-rwxr-xr-xconfigure2
-rw-r--r--hw/qxl.c28
-rw-r--r--hw/qxl.h2
m---------roms/openbios0
-rw-r--r--trace-events1
5 files changed, 31 insertions, 2 deletions
diff --git a/configure b/configure
index b68c0ca19..8f59b64e1 100755
--- a/configure
+++ b/configure
@@ -2595,7 +2595,7 @@ EOF
spice_cflags=$($pkg_config --cflags spice-protocol spice-server 2>/dev/null)
spice_libs=$($pkg_config --libs spice-protocol spice-server 2>/dev/null)
if $pkg_config --atleast-version=0.8.2 spice-server >/dev/null 2>&1 && \
- $pkg_config --atleast-version=0.8.1 spice-protocol > /dev/null 2>&1 && \
+ $pkg_config --atleast-version=0.12.0 spice-protocol > /dev/null 2>&1 && \
compile_prog "$spice_cflags" "$spice_libs" ; then
spice="yes"
libs_softmmu="$libs_softmmu $spice_libs"
diff --git a/hw/qxl.c b/hw/qxl.c
index 01bed135e..154c15f14 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -27,6 +27,10 @@
#include "qxl.h"
+#if SPICE_SERVER_VERSION >= 0x000b00
+#define QXL_HAVE_MONITORS_CONFIG
+#endif
+
#define VGA_RAM_SIZE (8192 * 1024)
/*
@@ -251,6 +255,21 @@ static void qxl_spice_destroy_surfaces(PCIQXLDevice *qxl, qxl_async_io async)
}
}
+static void qxl_spice_monitors_config_async(PCIQXLDevice *qxl)
+{
+#ifdef QXL_HAVE_MONITORS_CONFIG
+ trace_qxl_spice_monitors_config(qxl->id);
+ spice_qxl_monitors_config_async(&qxl->ssd.qxl,
+ qxl->ram->monitors_config,
+ MEMSLOT_GROUP_GUEST,
+ (uintptr_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO,
+ QXL_IO_MONITORS_CONFIG_ASYNC));
+#else
+ fprintf(stderr, "%s: spice server too old to support monitors_config\n",
+ __func__);
+#endif
+}
+
void qxl_spice_reset_image_cache(PCIQXLDevice *qxl)
{
trace_qxl_spice_reset_image_cache(qxl->id);
@@ -824,6 +843,7 @@ static void interface_async_complete_io(PCIQXLDevice *qxl, QXLCookie *cookie)
case QXL_IO_DESTROY_PRIMARY_ASYNC:
case QXL_IO_UPDATE_AREA_ASYNC:
case QXL_IO_FLUSH_SURFACES_ASYNC:
+ case QXL_IO_MONITORS_CONFIG_ASYNC:
break;
case QXL_IO_CREATE_PRIMARY_ASYNC:
qxl_create_guest_primary_complete(qxl);
@@ -1372,6 +1392,7 @@ static void ioport_write(void *opaque, target_phys_addr_t addr,
case QXL_IO_DESTROY_ALL_SURFACES_ASYNC:
io_port = QXL_IO_DESTROY_ALL_SURFACES;
goto async_common;
+ case QXL_IO_MONITORS_CONFIG_ASYNC:
case QXL_IO_FLUSH_SURFACES_ASYNC:
async_common:
async = QXL_ASYNC;
@@ -1502,6 +1523,9 @@ async_common:
d->mode = QXL_MODE_UNDEFINED;
qxl_spice_destroy_surfaces(d, async);
break;
+ case QXL_IO_MONITORS_CONFIG_ASYNC:
+ qxl_spice_monitors_config_async(d);
+ break;
default:
qxl_set_guest_bug(d, "%s: unexpected ioport=0x%x\n", __func__, io_port);
}
@@ -1818,6 +1842,10 @@ static int qxl_init_common(PCIQXLDevice *qxl)
io_size = 16;
break;
case 3: /* qxl-3 */
+ pci_device_rev = QXL_REVISION_STABLE_V10;
+ io_size = 24;
+ break;
+ case 4: /* qxl-4 */
default:
pci_device_rev = QXL_DEFAULT_REVISION;
io_size = msb_mask(QXL_IO_RANGE_SIZE * 2 - 1);
diff --git a/hw/qxl.h b/hw/qxl.h
index 1bb693eee..df47c9be6 100644
--- a/hw/qxl.h
+++ b/hw/qxl.h
@@ -129,7 +129,7 @@ typedef struct PCIQXLDevice {
} \
} while (0)
-#define QXL_DEFAULT_REVISION QXL_REVISION_STABLE_V10
+#define QXL_DEFAULT_REVISION QXL_REVISION_STABLE_V12
/* qxl.c */
void *qxl_phys2virt(PCIQXLDevice *qxl, QXLPHYSICAL phys, int group_id);
diff --git a/roms/openbios b/roms/openbios
-Subproject d1d2787f87167edf487a60e61b9168514d5a743
+Subproject ff61d973e5a4a68b29e485b3f88e6a2d1d96cf4
diff --git a/trace-events b/trace-events
index ccc284f59..d7e337ec2 100644
--- a/trace-events
+++ b/trace-events
@@ -832,6 +832,7 @@ qxl_spice_destroy_surfaces(int qid, int async) "%d async=%d"
qxl_spice_destroy_surface_wait_complete(int qid, uint32_t id) "%d sid=%d"
qxl_spice_destroy_surface_wait(int qid, uint32_t id, int async) "%d sid=%d async=%d"
qxl_spice_flush_surfaces_async(int qid, uint32_t surface_count, uint32_t num_free_res) "%d s#=%d, res#=%d"
+qxl_spice_monitors_config(int id) "%d"
qxl_spice_loadvm_commands(int qid, void *ext, uint32_t count) "%d ext=%p count=%d"
qxl_spice_oom(int qid) "%d"
qxl_spice_reset_cursor(int qid) "%d"