summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-05-22 14:52:11 +0300
committerAlon Levy <alevy@redhat.com>2011-06-20 13:22:15 +0200
commitcd2e8d91e0207325e50b858227b9662243e7f556 (patch)
treefe2ca66b7b1cdb11a08a97446014522a642aec9e
parent5bb6ff4fa6c0a86442decd4bd00813642edf637c (diff)
add QXL_IO_UPDATE_MEM for sleep (S3) supports3.v1
Adds a new revision to notify of this new IO to the driver. This new revision (QXL_REVISION_STABLE_V10) will also include other IO updates for async IO. related RHBZ: 688883 Sleep is supported by the following flow: (G stands for Guest, D is the device) G: (1#) QXL_IO_UPDATE_MEM(QXL_UPDATE_MEM_RENDER_ALL) G: destroy all surfaces, release all memory references G: (2#) QXL_IO_UPDATE_MEM(QXL_UPDATE_MEM_FLUSH) G: acpi reset D: qxl_reset_handler G: sends surface create commands The UPDATE_MEM io port is optimization mostly, to reduce vmexits. It is used to: update all surfaces at once (equivalent to UPDATE_AREA X NUM_ACTIVE_SURFACES) destroy all surfaces to release resources but not destroy the guest side surfaces get device to flush all server released resources to the release ring (could use multiple calls to OOM - but this is not well defined, would need to loop) After the two calls (1# and 2# above) there will be no memory allocated on the pci bars. Adds #define FEATURE_QXL_IO_UPDATE_MEM for qemu/hw/qxl.c to check for, to not require a version bump.
-rw-r--r--spice/qxl_dev.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h
index e3e0696..4449f61 100644
--- a/spice/qxl_dev.h
+++ b/spice/qxl_dev.h
@@ -43,8 +43,12 @@
/* 0x100-0x11f reserved for spice, 0x1ff used for unstable work */
#define QXL_DEVICE_ID_STABLE 0x0100
-#define QXL_REVISION_STABLE_V04 0x01
-#define QXL_REVISION_STABLE_V06 0x02
+
+enum {
+ QXL_REVISION_STABLE_V04=0x01,
+ QXL_REVISION_STABLE_V06=0x02,
+ QXL_REVISION_STABLE_V10=0x03
+};
#define QXL_DEVICE_ID_DEVEL 0x01ff
#define QXL_REVISION_DEVEL 0x01
@@ -61,6 +65,9 @@ enum {
QXL_PCI_RANGES
};
+/* flag for qemu to check for availability of this io port */
+#define FEATURE_QXL_IO_UPDATE_MEM
+
/* qxl-1 compat: append only */
enum {
QXL_IO_NOTIFY_CMD,
@@ -80,10 +87,18 @@ enum {
QXL_IO_DESTROY_PRIMARY,
QXL_IO_DESTROY_SURFACE_WAIT,
QXL_IO_DESTROY_ALL_SURFACES,
+ /* qxl-3 onwards (sleep support) */
+ QXL_IO_UPDATE_MEM,
QXL_IO_RANGE_SIZE
};
+/* QXL_IO_UPDATE_MEM values */
+enum {
+ QXL_UPDATE_MEM_RENDER_ALL,
+ QXL_UPDATE_MEM_FLUSH
+};
+
typedef uint64_t QXLPHYSICAL;
typedef int32_t QXLFIXED; //fixed 28.4