virtio-dev.lists.oasis-open.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Jiqian Chen <Jiqian.Chen@amd.com>
Cc: "Marc-André Lureau" <marcandre.lureau@gmail.com>,
	"Robert Beckett" <bob.beckett@collabora.com>,
	virtio-comment@lists.oasis-open.org,
	virtio-dev@lists.oasis-open.org,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Alex Deucher" <Alexander.Deucher@amd.com>,
	"Christian Koenig" <Christian.Koenig@amd.com>,
	"Stewart Hildebrand" <Stewart.Hildebrand@amd.com>,
	"Xenia Ragiadakou" <burzalodowa@gmail.com>,
	"Honglei Huang" <Honglei1.Huang@amd.com>,
	"Julia Zhang" <Julia.Zhang@amd.com>,
	"Huang Rui" <Ray.Huang@amd.com>
Subject: [virtio-dev] Re: [VIRTIO GPU PATCH v2 1/1] virtio-gpu: Add new feature flag VIRTIO_GPU_F_FREEZING
Date: Wed, 19 Jul 2023 16:02:35 +0200	[thread overview]
Message-ID: <ssg43kipfjmaqhegnlnd4gog3kxz2vhfvodbxxruez2zodwmzx@bqpb67ud7ssg> (raw)
In-Reply-To: <20230712093629.1410765-2-Jiqian.Chen@amd.com>

> +\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-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


      reply	other threads:[~2023-07-19 14:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-12  9:36 [virtio-dev] [VIRTIO GPU PATCH v2 0/1] Add new feature flag VIRTIO_GPU_F_FREEZING Jiqian Chen
2023-07-12  9:36 ` [virtio-dev] [VIRTIO GPU PATCH v2 1/1] virtio-gpu: " Jiqian Chen
2023-07-19 14:02   ` Gerd Hoffmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ssg43kipfjmaqhegnlnd4gog3kxz2vhfvodbxxruez2zodwmzx@bqpb67ud7ssg \
    --to=kraxel@redhat.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=Honglei1.Huang@amd.com \
    --cc=Jiqian.Chen@amd.com \
    --cc=Julia.Zhang@amd.com \
    --cc=Ray.Huang@amd.com \
    --cc=Stewart.Hildebrand@amd.com \
    --cc=bob.beckett@collabora.com \
    --cc=burzalodowa@gmail.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=virtio-comment@lists.oasis-open.org \
    --cc=virtio-dev@lists.oasis-open.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).