virtio-comment.lists.oasis-open.org archive mirror
 help / color / mirror / Atom feed
From: Jiqian Chen <Jiqian.Chen@amd.com>
To: "Michael S . Tsirkin" <mst@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Parav Pandit" <parav@nvidia.com>,
	"Jason Wang" <jasowang@redhat.com>,
	"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
	"David Airlie" <airlied@redhat.com>,
	"Gurchetan Singh" <gurchetansingh@chromium.org>,
	"Chia-I Wu" <olvaffe@gmail.com>,
	"Marc-André Lureau" <marcandre.lureau@gmail.com>,
	"Robert Beckett" <bob.beckett@collabora.com>,
	"Mikhail Golubev-Ciuchea"
	<Mikhail.Golubev-Ciuchea@opensynergy.com>,
	virtio-comment@lists.oasis-open.org,
	virtio-dev@lists.oasis-open.org
Cc: Honglei Huang <Honglei1.Huang@amd.com>,
	Julia Zhang <Julia.Zhang@amd.com>, Huang Rui <Ray.Huang@amd.com>,
	Jiqian Chen <Jiqian.Chen@amd.com>
Subject: [virtio-comment] [PATCH v6 0/1] Add new feature VIRTIO_F_PRESERVE_RESOURCES
Date: Sat, 21 Oct 2023 11:51:10 +0800	[thread overview]
Message-ID: <20231021035111.650248-1-Jiqian.Chen@amd.com> (raw)

Hi all,
This is the version 6, thank Michael S. Tsirkin, Parav Pandit and Jason Wang
for their suggestions, it made below changes:
* Declared a new feature bit
* Add the description of conformance
* Improve it to virtio device level
* Change the unsuitable description, use "preserve resources" to replace
  "freeze mode" to avoid mixing with freeze. This patch is to protect all
  the resources that can't be re-create but we still need them, not to
  trigger any suspend or freeze behavior.

Best regards,
Jiqian Chen

v5:
makes below changes:
* Since this series patches add a new mechanism that let virtgpu and Qemu can negotiate
  their reset behavior, and other guys hope me can improve this mechanism to virtio pci
  level, so that other virtio devices can also benefit from it. So instead of adding
  new feature flag VIRTIO_GPU_F_FREEZE_S3 only serves for virtgpu, v5 add a new parameter
  named freeze_mode to struct virtio_pci_common_cfg, when guest begin suspending, set
  freeze_mode to VIRTIO_PCI_FREEZE_MODE_FREEZE_S3, and then all virtio devices can get
  this status, and notice that guest is suspending, then they can change their reset
  behavior.
V5 of Qemu patch:
https://lore.kernel.org/qemu-devel/20230919110225.2282914-1-Jiqian.Chen@amd.com/T/#t
V5 of kernel patch:
https://lore.kernel.org/lkml/20230919104607.2282248-1-Jiqian.Chen@amd.com/T/#t


v4:
no v4 patches.
V4 of Qemu patch:
https://lore.kernel.org/qemu-devel/20230719074726.1613088-1-Jiqian.Chen@amd.com/T/#t
No v4 of kernel patch


v3:
makes below changes:
* Use enum for freeze mode, so this can be extended with more
  modes in the future.
* Rename functions and paratemers with "_S3" postfix.
* Explain in more detail
Link:
https://lists.oasis-open.org/archives/virtio-comment/202307/msg00209.html
V3 of Qemu patch:
https://lore.kernel.org/qemu-devel/20230720120816.8751-1-Jiqian.Chen@amd.com
V3 of Kernel patch: https://lore.kernel.org/lkml/20230720115805.8206-1-Jiqian.Chen@amd.com/T/#t


v2:
makes below changes:
* Elaborate on the types of resources.
* Add some descriptions for S3 and S4.
Link:
https://lists.oasis-open.org/archives/virtio-comment/202307/msg00160.html
V2 of Qemu patch:
https://lore.kernel.org/qemu-devel/20230630070016.841459-1-Jiqian.Chen@amd.com/T/#t
V2 of Kernel patch:
https://lore.kernel.org/lkml/20230630073448.842767-1-Jiqian.Chen@amd.com/T/#t


v1:
Hi all,
I am working to implement virtgpu S3 function on Xen.

Currently on Xen, if we start a guest through Qemu with enabling virtgpu, and then suspend and s3resume guest. We can find that the guest kernel comes back, but the display doesn't. It just shown a black screen.

That is because when guest was during suspending, it called into Qemu and Qemu destroyed all resources and reset renderer. This made the display gone after guest resumed.

So, I add a mechanism that when guest is suspending, it will notify Qemu, and then Qemu will not destroy resources. That can help guest's display come back.

As discussed and suggested by Robert Beckett and Gerd Hoffmann on v1 qemu's mailing list.
Due to that mechanism needs cooperation between guest and host. What's more, as virtio drivers by design paravirt drivers, it is reasonable for guest to accept some cooperation with host to manage suspend/resume. So I request to add a new feature flag, so that guest and host can negotiate whenever freezing is supported or not.
Link:
https://lists.oasis-open.org/archives/virtio-comment/202306/msg00595.html
V1 of Qemu patch:
https://lore.kernel.org/qemu-devel/20230608025655.1674357-2-Jiqian.Chen@amd.com/
V1 of Kernel patch:
https://lore.kernel.org/lkml/20230608063857.1677973-1-Jiqian.Chen@amd.com/


Jiqian Chen (1):
  content: Add new feature VIRTIO_F_PRESERVE_RESOURCES

 conformance.tex   |  2 ++
 content.tex       | 25 +++++++++++++++++++++++++
 transport-pci.tex |  6 ++++++
 3 files changed, 33 insertions(+)

-- 
2.34.1


This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.

In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.

Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/


             reply	other threads:[~2023-10-21  3:51 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-21  3:51 Jiqian Chen [this message]
2023-10-21  3:51 ` [virtio-comment] [PATCH v6 1/1] content: Add new feature VIRTIO_F_PRESERVE_RESOURCES Jiqian Chen
2023-10-23  6:00   ` [virtio-comment] " Parav Pandit
2023-10-23 10:38     ` [virtio-comment] " Chen, Jiqian
2023-10-23 13:35       ` [virtio-comment] " Parav Pandit
2023-10-24 10:35         ` [virtio-comment] " Chen, Jiqian
2023-10-24 10:51           ` [virtio-comment] " Parav Pandit
2023-10-24 12:13             ` [virtio-comment] " Chen, Jiqian
2023-10-25  3:51               ` [virtio-comment] " Parav Pandit
2023-10-26 10:24                 ` [virtio-comment] " Chen, Jiqian
2023-10-26 10:30                   ` Michael S. Tsirkin
2023-10-27  3:03                     ` Chen, Jiqian
2024-01-12  7:41                       ` Chen, Jiqian
2024-01-12  8:02                         ` [virtio-comment] " Parav Pandit
2024-01-12  8:25                           ` [virtio-comment] " Chen, Jiqian
2024-01-12  8:47                             ` [virtio-comment] " Parav Pandit
2024-01-12  9:24                               ` [virtio-comment] " Chen, Jiqian
2024-01-12  9:44                                 ` [virtio-comment] " Parav Pandit
2024-01-15  7:33                                   ` [virtio-comment] " Chen, Jiqian
2024-01-15  7:37                                     ` [virtio-comment] " Parav Pandit
2024-01-15  7:48                                       ` Chen, Jiqian
2024-01-15  7:55                                         ` Parav Pandit
2024-01-15  8:20                                           ` Chen, Jiqian
2024-01-15  8:52                                             ` Parav Pandit
2024-01-15  9:09                                               ` Chen, Jiqian
2024-01-15  9:16                                                 ` Parav Pandit
2024-01-15  9:40                                                   ` Chen, Jiqian
2024-01-15  9:46                                                     ` Parav Pandit
2024-01-15 10:47                                                       ` Chen, Jiqian
2024-01-15 10:52                                                         ` Parav Pandit
2024-01-15 11:07                                                           ` Chen, Jiqian
2024-01-15 11:10                                                             ` Parav Pandit
2024-01-16  6:37                                                               ` Chen, Jiqian
2024-01-16  7:19                                                                 ` Parav Pandit
2024-01-16  8:20                                                                   ` Chen, Jiqian
2024-01-16  8:27                                                                     ` Parav Pandit
2024-01-15  0:25                         ` [virtio-comment] " Jason Wang
2024-01-15  7:25                           ` Chen, Jiqian

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=20231021035111.650248-1-Jiqian.Chen@amd.com \
    --to=jiqian.chen@amd.com \
    --cc=Honglei1.Huang@amd.com \
    --cc=Julia.Zhang@amd.com \
    --cc=Mikhail.Golubev-Ciuchea@opensynergy.com \
    --cc=Ray.Huang@amd.com \
    --cc=airlied@redhat.com \
    --cc=bob.beckett@collabora.com \
    --cc=gurchetansingh@chromium.org \
    --cc=jasowang@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=mst@redhat.com \
    --cc=olvaffe@gmail.com \
    --cc=parav@nvidia.com \
    --cc=virtio-comment@lists.oasis-open.org \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=xuanzhuo@linux.alibaba.com \
    /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).