> +\begin{lstlisting}
> +struct virtio_gpu_status_freezing {
> +  struct virtio_gpu_ctrl_hdr hdr;
> +  __u32 freezing;
> +};
> +\end{lstlisting}

> +This is added for S3 function in guest with virtio-gpu. When guest does
> +S3, let it notify QEMU if virtio-gpu is in freezing status or not in
> +\field{freezing}. Zero means it is not in freezing status, none-zero
> +is the opposite. When virtio-gpu is in freezing status, QEMU will not
> +destroy resources which are created by using commands
> +VIRTIO_GPU_CMD_RESOURCE_CREATE_*, so that guest can use those resources
> +to resume display.

Good, thanks for the update.

> +Note: this change is not enough to solve the problems of S4 function.
> +QEMU may lose resources after hibernation. It needs more research and
> +development.

So, eventually we will see changes to this in the future.  I'd suggest
to use an enum for freezing, so this can be extended with more modes in
the future, i.e. something along the lines of:

enum virtio_gpu_freeze_mode {
    VIRTIO_GPU_FREEZE_MODE_UNFREEZE  = 0,
    VIRTIO_GPU_FREEZE_MODE_FREEZE_S3 = 3,
};

Maybe also add a "_S3" postfix to the feature flag name.  In case we add
S4 support at some point in the future we will need another feature flag
for that.

take care,
  Gerd


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org

Reply via email to