summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-05-22 14:52:11 +0300
committerAlon Levy <alevy@redhat.com>2011-07-17 13:19:36 +0300
commitfbf2cfb145783dd77df6fbb7056269e7756e8eb9 (patch)
treecd43e8c6044d01c953565added7a87524762c704
parent7e30df2a8a9269f8503d6995c9dbfba38f98e974 (diff)
add QXL_IO_FLUSH_{SURFACES,RELEASE} for sleep (S3) support
related RHBZ: 688883 Guest initiated sleep looks like this: Guest: (0) stop putting new commands into the rings (1) QXL_IO_FLUSH_SURFACES qxl calls flush_surfaces(), spice-server flushes command rings and renders all surfaces, thereby flushing state to device memory. (2) QXL_IO_DESTROY_ALL_SURFACES zap surfaces (3) QXL_IO_FLUSH_RELEASE push release queue head into the release ring, so the guest will see it and can release everything. (4) tell acpi to reset Qemu: (5) qxl_reset_handler Guest: (6) sends surface create commands The QXL_IO_FLUSH_SURFACES is an optimization, to reduce vmexits. It is used to flush both command rings and 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 (1) there will be no memory allocated on the pci bars.
-rw-r--r--spice/qxl_dev.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h
index 10ecabd..82eb1c8 100644
--- a/spice/qxl_dev.h
+++ b/spice/qxl_dev.h
@@ -87,6 +87,8 @@ enum {
QXL_IO_DESTROY_PRIMARY_ASYNC,
QXL_IO_DESTROY_SURFACE_ASYNC,
QXL_IO_DESTROY_ALL_SURFACES_ASYNC,
+ QXL_IO_FLUSH_SURFACES_ASYNC,
+ QXL_IO_FLUSH_RELEASE,
QXL_IO_RANGE_SIZE
};