]> git.baikalelectronics.ru Git - kernel.git/commit
vdpa_sim: Implement suspend vdpa op
authorEugenio Pérez <eperezma@redhat.com>
Wed, 10 Aug 2022 17:15:12 +0000 (19:15 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 11 Aug 2022 08:31:15 +0000 (04:31 -0400)
commit19b5d9a640258c0d31e51a41e3b53c1a4af1ed9a
tree6703d351f23ce447ff7847df1d502c50c3406f70
parent61ba0dbd4a2d6809674bacb7ee488ea42e6347d6
vdpa_sim: Implement suspend vdpa op

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 get 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).

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Message-Id: <20220810171512.2343333-5-eperezma@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/vdpa_sim/vdpa_sim.c
drivers/vdpa/vdpa_sim/vdpa_sim.h
drivers/vdpa/vdpa_sim/vdpa_sim_blk.c
drivers/vdpa/vdpa_sim/vdpa_sim_net.c