From: "Michael S. Tsirkin" <mst@redhat.com>
To: Alexandr Moshkov <dtalexundeer@yandex-team.ru>
Cc: qemu-devel@nongnu.org, "Hanna Reitz" <hreitz@redhat.com>,
"Jason Wang" <jasowangio@gmail.com>,
"Vladimir Sementsov-Ogievskiy" <vsementsov@yandex-team.ru>,
"Gonglei (Arei)" <arei.gonglei@huawei.com>,
"Jason Wang" <jasowang@redhat.com>, "Fam Zheng" <fam@euphon.net>,
qemu-block@nongnu.org, "Stefan Hajnoczi" <stefanha@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"yc-core@yandex-team.ru" <yc-core@yandex-team.ru>,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
virtio-fs@lists.linux.dev, "Kevin Wolf" <kwolf@redhat.com>,
"zhenwei pi" <zhenwei.pi@linux.dev>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Stefano Garzarella" <sgarzare@redhat.com>,
"Milan Zamazal" <mzamazal@redhat.com>,
"Raphael Norwitz" <rnorwitz@nvidia.com>
Subject: Re: [PATCH v5 0/6] vhost-user-blk: add compatibility with older qemu versions
Date: Wed, 29 Jul 2026 05:14:04 -0400 [thread overview]
Message-ID: <20260729050854-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20260728100841.3475774-1-dtalexundeer@yandex-team.ru>
On Tue, Jul 28, 2026 at 03:08:35PM +0500, Alexandr Moshkov wrote:
> v4 -> v5:
> - introduce protocol feature VHOST_USER_PROTOCOL_F_GET_VRING_BASE_SKIP_DRAIN
> to guard the new message, instead of reusing the existing
> VHOST_USER_PROTOCOL_F_GET_VRING_BASE_INLIFGHT. Update docs.
> - improved commit messages.
>
> v3 -> v4:
> - add new protocol message GET_VRING_BASE_SKIP_DRAIN instead of parameter to GET_VRING_BASE message. This new message can be send instead of GET_VRING_BASE, allowing back-end to suspend inflight I/O immediately instead of waiting and completing them.
> - rebase to newer master
>
> v2 -> v3:
> - fix complile problems
> - add assert check in do_vhost_virtio_stop
> - make inflight-migration property mutable
>
> v1 -> v2:
> - reorganize commits: make refactor commits first, then core semantic change
> - add additional pre_save check for inflight migration possibility
>
> ---
>
> This is v5 of the series previously sent as
> "[PATCH v4 0/6] vhost-user-blk: fix inflight migration compatibility".
>
> This series extends the vhost-user-blk inflight migration feature
> introduced in QEMU 11.0 to address a runtime compatibility problem.
>
> Currently, the inflight migration behaviour in vhost-user-blk is
> controlled by VHOST_USER_PROTOCOL_F_GET_VRING_BASE_INFLIGHT, which is
> negotiated once at connection time. Once the feature is negotiated, the
> back-end always uses suspend semantics on GET_VRING_BASE — there is no
> way for the front-end to request normal drain behaviour on a per-call
> basis without reconnecting. This makes it impossible to disable
> inflight-migration at runtime, which is needed when, for example,
> migrating a VM to an older QEMU version that does not support the
> feature.
This part, I do not understand.
What exactly does "migrating" mean here? Live migration?
An older QEMU will presumably either negotiate or fail to negotiate
the bit.
> To solve this, the series introduces a new protocol message
> VHOST_USER_GET_VRING_BASE_SKIP_DRAIN (id=45) guarded by a new protocol
> feature VHOST_USER_PROTOCOL_F_GET_VRING_BASE_SKIP_DRAIN. The message is
> semantically identical to GET_VRING_BASE but explicitly instructs the
> back-end to suspend in-flight I/O immediately rather than draining it.
> This gives the front-end explicit per-call control: GET_VRING_BASE for
> normal operation, GET_VRING_BASE_SKIP_DRAIN during live migration.
>
> In vhost-user-blk, GET_VRING_BASE_SKIP_DRAIN is sent only when
> inflight-migration is enabled and the device is stopping due to live
> migration (RUN_STATE_FINISH_MIGRATE). The inflight-migration property
> is also made mutable so it can be toggled via qom-set at runtime without
> reconnecting to the back-end.
>
> Alexandr Moshkov (6):
> vhost-user: add skip_drain param to do_vhost_virtqueue_stop
> vhost-user: add GET_VRING_BASE_SKIP_DRAIN message
> vhost-user: use skip_drain with GET_VRING_BASE_SKIP_DRAIN message
> vhost-user-blk: make inflight-migration prop mutable
> vhost-user-blk: move inflight_needed higher
> vhost-user-blk: use GET_VRING_BASE_SKIP_DRAIN during inflight
> migration
>
> backends/cryptodev-vhost.c | 2 +-
> backends/vhost-user.c | 2 +-
> docs/interop/vhost-user.rst | 88 +++++++++++++++++++------------
> hw/block/vhost-user-blk.c | 43 ++++++++++++---
> hw/net/vhost_net.c | 9 ++--
> hw/scsi/vhost-scsi-common.c | 2 +-
> hw/virtio/vdpa-dev.c | 2 +-
> hw/virtio/vhost-user-base.c | 2 +-
> hw/virtio/vhost-user-fs.c | 2 +-
> hw/virtio/vhost-user-scmi.c | 2 +-
> hw/virtio/vhost-user.c | 47 ++++++++++++++---
> hw/virtio/vhost-vsock-common.c | 2 +-
> hw/virtio/vhost.c | 34 ++++++++----
> include/hw/virtio/vhost-backend.h | 1 +
> include/hw/virtio/vhost-user.h | 2 +-
> include/hw/virtio/vhost.h | 7 ++-
> 16 files changed, 172 insertions(+), 75 deletions(-)
>
> --
> 2.34.1
prev parent reply other threads:[~2026-07-29 9:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 10:08 [PATCH v5 0/6] vhost-user-blk: add compatibility with older qemu versions Alexandr Moshkov
2026-07-28 10:08 ` [PATCH v5 1/6] vhost-user: add skip_drain param to do_vhost_virtqueue_stop Alexandr Moshkov
2026-07-28 10:08 ` [PATCH v5 2/6] vhost-user: add GET_VRING_BASE_SKIP_DRAIN message Alexandr Moshkov
2026-07-29 9:14 ` Michael S. Tsirkin
2026-07-28 10:08 ` [PATCH v5 3/6] vhost-user: use skip_drain with " Alexandr Moshkov
2026-07-28 10:08 ` [PATCH v5 4/6] vhost-user-blk: make inflight-migration prop mutable Alexandr Moshkov
2026-07-29 9:32 ` Michael S. Tsirkin
[not found] ` <679a33d1-0f6c-4456-ac76-1f9e1251f2ec@yandex-team.ru>
2026-07-29 10:14 ` Michael S. Tsirkin
2026-07-29 10:35 ` Alexandr Moshkov
2026-07-29 10:48 ` Michael S. Tsirkin
[not found] ` <dd1f5830-75ff-4256-a179-6a8341a3b4ec@yandex-team.ru>
2026-07-29 12:13 ` Michael S. Tsirkin
2026-07-29 14:07 ` Alexandr Moshkov
2026-07-29 14:48 ` Michael S. Tsirkin
2026-07-29 15:18 ` Alexandr Moshkov
2026-07-28 10:08 ` [PATCH v5 5/6] vhost-user-blk: move inflight_needed higher Alexandr Moshkov
2026-07-28 10:08 ` [PATCH v5 6/6] vhost-user-blk: use GET_VRING_BASE_SKIP_DRAIN during inflight migration Alexandr Moshkov
2026-07-29 9:14 ` Michael S. Tsirkin [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=20260729050854-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=arei.gonglei@huawei.com \
--cc=dtalexundeer@yandex-team.ru \
--cc=fam@euphon.net \
--cc=hreitz@redhat.com \
--cc=jasowang@redhat.com \
--cc=jasowangio@gmail.com \
--cc=kwolf@redhat.com \
--cc=mzamazal@redhat.com \
--cc=pbonzini@redhat.com \
--cc=pierrick.bouvier@linaro.org \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rnorwitz@nvidia.com \
--cc=sgarzare@redhat.com \
--cc=stefanha@redhat.com \
--cc=virtio-fs@lists.linux.dev \
--cc=vsementsov@yandex-team.ru \
--cc=yc-core@yandex-team.ru \
--cc=zhenwei.pi@linux.dev \
/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