[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 3/8] vhost-user.rst: Clarify enabling/disabling vrings
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v4 3/8] vhost-user.rst: Clarify enabling/disabling vrings |
Date: |
Thu, 5 Oct 2023 13:43:33 -0400 |
On Wed, Oct 04, 2023 at 02:58:59PM +0200, Hanna Czenczek wrote:
> Currently, the vhost-user documentation says that rings are to be
> initialized in a disabled state when VHOST_USER_F_PROTOCOL_FEATURES is
> negotiated. However, by the time of feature negotiation, all rings have
> already been initialized, so it is not entirely clear what this means.
>
> At least the vhost-user-backend Rust crate's implementation interpreted
> it to mean that whenever this feature is negotiated, all rings are to
> put into a disabled state, which means that every SET_FEATURES call
> would disable all rings, effectively halting the device. This is
> problematic because the VHOST_F_LOG_ALL feature is also set or cleared
> this way, which happens during migration. Doing so should not halt the
> device.
>
> Other implementations have interpreted this to mean that the device is
> to be initialized with all rings disabled, and a subsequent SET_FEATURES
> call that does not set VHOST_USER_F_PROTOCOL_FEATURES will enable all of
> them. Here, SET_FEATURES will never disable any ring.
>
> This interpretation does not suffer the problem of unintentionally
> halting the device whenever features are set or cleared, so it seems
> better and more reasonable.
>
> We can clarify this in the documentation by making it explicit that the
> enabled/disabled state is tracked even while the vring is stopped.
> Every vring is initialized in a disabled state, and SET_FEATURES without
> VHOST_USER_F_PROTOCOL_FEATURES simply becomes one way to enable all
> vrings.
>
> Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
> ---
> docs/interop/vhost-user.rst | 32 +++++++++++++++++---------------
> 1 file changed, 17 insertions(+), 15 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
signature.asc
Description: PGP signature
- Re: [PATCH v4 2/8] vhost-user.rst: Improve [GS]ET_VRING_BASE doc, (continued)
- Re: [PATCH v4 2/8] vhost-user.rst: Improve [GS]ET_VRING_BASE doc, Stefan Hajnoczi, 2023/10/05
- Re: [Virtio-fs] [PATCH v4 2/8] vhost-user.rst: Improve [GS]ET_VRING_BASE doc, Hanna Czenczek, 2023/10/06
- Re: [Virtio-fs] [PATCH v4 2/8] vhost-user.rst: Improve [GS]ET_VRING_BASE doc, Michael S. Tsirkin, 2023/10/06
- Re: [Virtio-fs] [PATCH v4 2/8] vhost-user.rst: Improve [GS]ET_VRING_BASE doc, Hanna Czenczek, 2023/10/06
- Re: [Virtio-fs] [PATCH v4 2/8] vhost-user.rst: Improve [GS]ET_VRING_BASE doc, Hanna Czenczek, 2023/10/06
- Re: [Virtio-fs] [PATCH v4 2/8] vhost-user.rst: Improve [GS]ET_VRING_BASE doc, Michael S. Tsirkin, 2023/10/07
- Re: [Virtio-fs] [PATCH v4 2/8] vhost-user.rst: Improve [GS]ET_VRING_BASE doc, Michael S. Tsirkin, 2023/10/07
[PATCH v4 6/8] vhost-user: Interface for migration state transfer, Hanna Czenczek, 2023/10/04
[PATCH v4 3/8] vhost-user.rst: Clarify enabling/disabling vrings, Hanna Czenczek, 2023/10/04
[PATCH v4 7/8] vhost: Add high-level state save/load functions, Hanna Czenczek, 2023/10/04
[PATCH v4 8/8] vhost-user-fs: Implement internal migration, Hanna Czenczek, 2023/10/04
Re: [PATCH v4 0/8] vhost-user: Back-end state migration, Stefan Hajnoczi, 2023/10/05