[Spice-devel] [PATCH] make unstable qxl compatible with 0.4 qxl

Gerd Hoffmann kraxel at redhat.com
Wed Apr 14 05:59:13 PDT 2010


Add SET_MODE IO port back in.
Add QXLRom offset fields back in.

I/O ports, RAM and ROM layout are binary compatible now.

With these changes merged it should be possible to create *one* qxl
device which supports *both* 0.4 and unstable spice commands.

Everything the guest touches before entering native mode is binary
compatible.  Old (0.4) guests drivers enter native mode via SET_MODE,
new (unstqable) guest drivers enter native mode using CREATE_PRIMARY,
so when we see spice commands from the guest come in we know
whenever we have to interpret them as 0.4 or unstable ones.

Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
 spice/qxl_dev.h |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h
index 2873101..0dbe3a7 100644
--- a/spice/qxl_dev.h
+++ b/spice/qxl_dev.h
@@ -62,6 +62,7 @@ enum {
     QXL_IO_UPDATE_IRQ,
     QXL_IO_NOTIFY_OOM,
     QXL_IO_RESET,
+    QXL_IO_SET_MODE,                  /* qxl-1 */
     QXL_IO_LOG,
     QXL_IO_MEMSLOT_ADD,
     QXL_IO_MEMSLOT_DEL,
@@ -81,9 +82,15 @@ typedef struct SPICE_ATTR_PACKED QXLRom {
     uint32_t update_id;
     uint32_t compression_level;
     uint32_t log_level;
+    uint32_t mode;                    /* qxl-1 */
     uint32_t modes_offset;
     uint32_t num_pages;
-    uint32_t surface0_area_size;
+    uint32_t pages_offset;            /* qxl-1 */
+    uint32_t draw_area_offset;        /* qxl-1 */
+    union {
+        uint32_t draw_area_size;      /* qxl-1 */
+        uint32_t surface0_area_size;  /* qxl-2 */
+    };
     uint32_t ram_header_offset;
     uint32_t mm_clock;
     uint64_t flags;
-- 
1.6.6.1



More information about the Spice-devel mailing list