|
|
Log in / Subscribe / Register

vduse: Add suspend

From:  Eugenio Pérez <eperezma-AT-redhat.com>
To:  "Michael S . Tsirkin" <mst-AT-redhat.com>
Subject:  [PATCH v5 0/2] vduse: Add suspend
Date:  Tue, 07 Jul 2026 14:33:42 +0200
Message-ID:  <20260707123344.244575-1-eperezma@redhat.com>
Cc:  Jason Wang <jasowangio-AT-gmail.com>, linux-kernel-AT-vger.kernel.org, Laurent Vivier <lvivier-AT-redhat.com>, Yongji Xie <xieyongji-AT-bytedance.com>, Xuan Zhuo <xuanzhuo-AT-linux.alibaba.com>, Stefano Garzarella <sgarzare-AT-redhat.com>, virtualization-AT-lists.linux.dev, Eugenio Pérez <eperezma-AT-redhat.com>, Maxime Coquelin <mcoqueli-AT-redhat.com>
Archive-link:  Article

Implement suspend operation for vduse 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.

This patch does not implement resume, so VMM resets the whole device
to recover from a live migration failure.  Resume optimization can be
implemented on top of these patches, as other vDPA devices have done in
the past.

This series applies on top of
https://lore.kernel.org/lkml/20260707122502.239022-1-eper...

v5:
* Rebase on latest enable series

v4:
* Add preparatory patch to not flush the kick and irq works under rwsem
  (MST).
* Fix jump over a semaphore guard (Nathan Chancellor).
* Fix take the device semaphore in the vq spinlock context (MST).
* Add suspend guard at vq_signal_irqfd so the device will not send an
  IRQ after suspend.

v3:
* Expand the patch message with information about resume operation.

v2:
* Take the rwsem only before the actual kick, not in vduse_vdpa_kick_vq.
  This assures that we're not in a critical section.

Eugenio Pérez (2):
  vduse: do not take rwsem at reset work flush
  vduse: Add suspend

 drivers/vdpa/vdpa_user/vduse_dev.c | 162 ++++++++++++++++++++++-------
 include/uapi/linux/vduse.h         |   4 +
 2 files changed, 127 insertions(+), 39 deletions(-)

-- 
2.55.0




Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds