From: Hanna Czenczek <hreitz@redhat.com>
To: qemu-devel@nongnu.org, virtio-fs@redhat.com
Cc: "Hanna Czenczek" <hreitz@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"German Maglione" <gmaglione@redhat.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
"Anton Kuchin" <antonkuchin@yandex-team.ru>
Subject: [PATCH v5 3/7] vhost-user.rst: Introduce suspended state
Date: Mon, 16 Oct 2023 15:42:39 +0200 [thread overview]
Message-ID: <20231016134243.68248-4-hreitz@redhat.com> (raw)
In-Reply-To: <20231016134243.68248-1-hreitz@redhat.com>
In vDPA, GET_VRING_BASE does not stop the queried vring, which is why
SUSPEND was introduced so that the returned index would be stable. In
vhost-user, it does stop the vring, so under the same reasoning, it can
get away without SUSPEND.
Still, we do want to clarify that if the device is completely stopped,
i.e. all vrings are stopped, the back-end should cease to modify any
state relating to the guest. Do this by calling it "suspended".
Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
---
docs/interop/vhost-user.rst | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst
index e5a04c04ed..035a23ed35 100644
--- a/docs/interop/vhost-user.rst
+++ b/docs/interop/vhost-user.rst
@@ -442,6 +442,19 @@ back-end must enable all rings immediately.
While processing the rings (whether they are enabled or not), the back-end
must support changing some configuration aspects on the fly.
+.. _suspended_device_state:
+
+Suspended device state
+^^^^^^^^^^^^^^^^^^^^^^
+
+While all vrings are stopped, the device is *suspended*. In addition to
+not processing any vring (because they are stopped), the device must:
+
+* not write to any guest memory regions,
+* not send any notifications to the guest,
+* not send any messages to the front-end,
+* still process and reply to messages from the front-end.
+
Multiple queue support
----------------------
@@ -529,7 +542,8 @@ ancillary data, it may be used to inform the front-end that the log has
been modified.
Once the source has finished migration, rings will be stopped by the
-source. No further update must be done before rings are restarted.
+source (:ref:`Suspended device state <suspended_device_state>`). No
+further update must be done before rings are restarted.
In postcopy migration the back-end is started before all the memory has
been received from the source host, and care must be taken to avoid
@@ -1123,6 +1137,10 @@ Front-end message types
(*a vring descriptor index for split virtqueues* vs. *vring descriptor
indices for packed virtqueues*).
+ When and as long as all of a device’s vrings are stopped, it is
+ *suspended*, see :ref:`Suspended device state
+ <suspended_device_state>`.
+
The request payload’s *num* field is currently reserved and must be
set to 0.
--
2.41.0
next prev parent reply other threads:[~2023-10-16 13:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-16 13:42 [PATCH v5 0/7] vhost-user: Back-end state migration Hanna Czenczek
2023-10-16 13:42 ` [PATCH v5 1/7] vhost-user.rst: Improve [GS]ET_VRING_BASE doc Hanna Czenczek
2023-10-16 13:42 ` [PATCH v5 2/7] vhost-user.rst: Clarify enabling/disabling vrings Hanna Czenczek
2023-10-16 13:42 ` Hanna Czenczek [this message]
2023-10-16 13:42 ` [PATCH v5 4/7] vhost-user.rst: Migrating back-end-internal state Hanna Czenczek
2023-10-16 13:42 ` [PATCH v5 5/7] vhost-user: Interface for migration state transfer Hanna Czenczek
2023-10-16 13:42 ` [PATCH v5 6/7] vhost: Add high-level state save/load functions Hanna Czenczek
2023-10-16 13:42 ` [PATCH v5 7/7] vhost-user-fs: Implement internal migration Hanna Czenczek
2023-11-02 14:18 ` [PATCH v5 0/7] vhost-user: Back-end state migration Hanna Czenczek
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=20231016134243.68248-4-hreitz@redhat.com \
--to=hreitz@redhat.com \
--cc=antonkuchin@yandex-team.ru \
--cc=eperezma@redhat.com \
--cc=gmaglione@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=virtio-fs@redhat.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 NNTP newsgroup(s).