From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Eugenio Pérez" <eperezma@redhat.com>
Cc: virtualization@lists.linux-foundation.org,
Jason Wang <jasowang@redhat.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, ecree.xilinx@gmail.com,
gautam.dawar@amd.com, Zhang Min <zhang.min9@zte.com.cn>,
pabloc@xilinx.com, Piotr.Uminski@intel.com,
Dan Carpenter <dan.carpenter@oracle.com>,
tanuj.kamde@amd.com, Zhu Lingshan <lingshan.zhu@intel.com>,
martinh@xilinx.com,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
lvivier@redhat.com, martinpo@xilinx.com, hanand@xilinx.com,
Eli Cohen <elic@nvidia.com>,
lulu@redhat.com, habetsm.xilinx@gmail.com,
Parav Pandit <parav@nvidia.com>, Longpeng <longpeng2@huawei.com>,
Wu Zongyong <wuzongyong@linux.alibaba.com>,
Si-Wei Liu <si-wei.liu@oracle.com>,
Stefano Garzarella <sgarzare@redhat.com>,
dinang@xilinx.com, Xie Yongji <xieyongji@bytedance.com>
Subject: Re: [PATCH v8 0/3] Implement vdpasim suspend operation
Date: Thu, 11 Aug 2022 09:58:25 -0400 [thread overview]
Message-ID: <20220811095743-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20220811135353.2549658-1-eperezma@redhat.com>
On Thu, Aug 11, 2022 at 03:53:50PM +0200, Eugenio Pérez wrote:
> Implement suspend operation for vdpa_sim devices, so vhost-vdpa will offer
> that backend feature and userspace can effectively suspend the device.
>
> This is a must before getting virtqueue indexes (base) for live migration,
> since the device could modify them after userland gets them. There are
> individual ways to perform that action for some devices
> (VHOST_NET_SET_BACKEND, VHOST_VSOCK_SET_RUNNING, ...) but there was no
> way to perform it for any vhost device (and, in particular, vhost-vdpa).
>
> After a successful return of ioctl the device must not process more virtqueue
> descriptors. The device can answer to read or writes of config fields as if it
> were not suspended. In particular, writing to "queue_enable" with a value of 1
> will not make the device start processing virtqueue buffers.
>
> In the future, we will provide features similar to
> VHOST_USER_GET_INFLIGHT_FD so the device can save pending operations.
>
> Applied on top of vhost branch.
>
> Comments are welcome.
>
> v8:
> * v7 but incremental from vhost instead of isolated.
Now I'm lost. incremental to what? Does the vhost branch now
have the correct bits?
> v7:
> * Remove ioctl leftover argument and update doc accordingly.
>
> v6:
> * Remove the resume operation, making the ioctl simpler. We can always add
> another ioctl for VM_STOP/VM_RESUME operation later.
> * s/stop/suspend/ to differentiate more from reset.
> * Clarify scope of the suspend operation.
>
> v5:
> * s/not stop/resume/ in doc.
>
> v4:
> * Replace VHOST_STOP to VHOST_VDPA_STOP in vhost ioctl switch case too.
>
> v3:
> * s/VHOST_STOP/VHOST_VDPA_STOP/
> * Add documentation and requirements of the ioctl above its definition.
>
> v2:
> * Replace raw _F_STOP with BIT_ULL(_F_STOP).
> * Fix obtaining of stop ioctl arg (it was not obtained but written).
> * Add stop to vdpa_sim_blk.
>
> [1] git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git
>
> Eugenio Pérez (3):
> vdpa: delete unreachable branch on vdpasim_suspend
> vdpa: Remove wrong doc of VHOST_VDPA_SUSPEND ioctl
> vhost: Remove invalid parameter of VHOST_VDPA_SUSPEND ioctl
>
> drivers/vdpa/vdpa_sim/vdpa_sim.c | 7 -------
> include/linux/vdpa.h | 2 +-
> include/uapi/linux/vhost.h | 17 ++++++-----------
> 3 files changed, 7 insertions(+), 19 deletions(-)
>
> --
> 2.31.1
>
next prev parent reply other threads:[~2022-08-11 13:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-11 13:53 [PATCH v8 0/3] Implement vdpasim suspend operation Eugenio Pérez
2022-08-11 13:53 ` [PATCH v8 1/3] vdpa: delete unreachable branch on vdpasim_suspend Eugenio Pérez
2022-08-19 0:55 ` Jason Wang
2022-08-11 13:53 ` [PATCH v8 2/3] vdpa: Remove wrong doc of VHOST_VDPA_SUSPEND ioctl Eugenio Pérez
2022-08-19 0:56 ` Jason Wang
2022-08-11 13:53 ` [PATCH v8 3/3] vhost: Remove invalid parameter " Eugenio Pérez
2022-08-19 0:57 ` Jason Wang
2022-08-11 13:58 ` Michael S. Tsirkin [this message]
2022-08-11 14:25 ` [PATCH v8 0/3] Implement vdpasim suspend operation Eugenio Perez Martin
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=20220811095743-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=Piotr.Uminski@intel.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dan.carpenter@oracle.com \
--cc=dinang@xilinx.com \
--cc=ecree.xilinx@gmail.com \
--cc=elic@nvidia.com \
--cc=eperezma@redhat.com \
--cc=gautam.dawar@amd.com \
--cc=habetsm.xilinx@gmail.com \
--cc=hanand@xilinx.com \
--cc=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=lingshan.zhu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longpeng2@huawei.com \
--cc=lulu@redhat.com \
--cc=lvivier@redhat.com \
--cc=martinh@xilinx.com \
--cc=martinpo@xilinx.com \
--cc=netdev@vger.kernel.org \
--cc=pabloc@xilinx.com \
--cc=parav@nvidia.com \
--cc=sgarzare@redhat.com \
--cc=si-wei.liu@oracle.com \
--cc=tanuj.kamde@amd.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=wuzongyong@linux.alibaba.com \
--cc=xieyongji@bytedance.com \
--cc=zhang.min9@zte.com.cn \
/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).