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-18 11:20:39 +0300
commit49808025e7da2f9067d98b6fad730dbd63a4589d (patch)
treed74c265edd48cb5569d1fb40bdd388c8489a66db
parent9601a6353b1bd3262a464a12df5e0984c8ae7029 (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
};