qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH for 8.0 00/13] vDPA-net inflight descriptors migration with SVQ
@ 2022-12-05 17:04 Eugenio Pérez
  2022-12-05 17:04 ` [RFC PATCH for 8.0 01/13] vhost: add available descriptor list in SVQ Eugenio Pérez
                   ` (13 more replies)
  0 siblings, 14 replies; 30+ messages in thread
From: Eugenio Pérez @ 2022-12-05 17:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Liuxiangdong, Stefan Hajnoczi, Jason Wang, Harpreet Singh Anand,
	Gautam Dawar, Zhu Lingshan, Cindy Lu, Si-Wei Liu,
	Michael S. Tsirkin, Dr. David Alan Gilbert, Laurent Vivier,
	Eli Cohen, Stefano Garzarella, Juan Quintela, Parav Pandit

The state of the descriptors (avail or used) may not be recoverable just
looking at the guest memory.  Out of order used descriptor may override
previous avail ones in the descriptor table or avail vring.

Currently we're not migrating this status in net devices because virtio-net,
vhost-kernel etc use the descriptors in order, so the information always
recoverable from guest's memory.  However, vDPA devices may use them out of
order, and other kind of devices like block need this support.

Shadow virtqueue is able to track these and resend them at the destination.
Add them to the virtio-net migration description so they are not lose in the
process.

This is a very early RFC just to validate the first draft so expect leftovers.
To fetch and request the descriptors from a device without SVQ need to be
implemented on top. Some other notable pending items are:
* Do not send the descriptors actually recoverable from the guest memory.
* Properly version the migrate data.
* Properly abstract the descriptors access from virtio-net to SVQ.
* Do not use VirtQueueElementOld but migrate directly VirtQueueElement.
* Replace lots of assertions with runtime conditionals.
* Other TODOs in the patch message or code changes.

Thanks.

Eugenio Pérez (13):
  vhost: add available descriptor list in SVQ
  vhost: iterate only available descriptors at SVQ stop
  vhost: merge avail list and next avail descriptors detach
  vhost: add vhost_svq_save_inflight
  virtio: Specify uint32_t as VirtQueueElementOld members type
  virtio: refactor qemu_get_virtqueue_element
  virtio: refactor qemu_put_virtqueue_element
  virtio: expose VirtQueueElementOld
  virtio: add vmstate_virtqueue_element_old
  virtio-net: Migrate vhost inflight descriptors
  virtio-net: save inflight descriptors at vhost shutdown
  vhost: expose vhost_svq_add_element
  vdpa: Recover inflight descriptors

 hw/virtio/vhost-shadow-virtqueue.h |   9 ++
 include/hw/virtio/virtio-net.h     |   2 +
 include/hw/virtio/virtio.h         |  32 ++++++
 include/migration/vmstate.h        |  22 ++++
 hw/net/vhost_net.c                 |  56 ++++++++++
 hw/net/virtio-net.c                | 129 +++++++++++++++++++++++
 hw/virtio/vhost-shadow-virtqueue.c |  52 +++++++--
 hw/virtio/vhost-vdpa.c             |  11 --
 hw/virtio/virtio.c                 | 162 ++++++++++++++++++-----------
 9 files changed, 392 insertions(+), 83 deletions(-)

-- 
2.31.1




^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2023-01-17  6:55 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-05 17:04 [RFC PATCH for 8.0 00/13] vDPA-net inflight descriptors migration with SVQ Eugenio Pérez
2022-12-05 17:04 ` [RFC PATCH for 8.0 01/13] vhost: add available descriptor list in SVQ Eugenio Pérez
2022-12-05 17:04 ` [RFC PATCH for 8.0 02/13] vhost: iterate only available descriptors at SVQ stop Eugenio Pérez
2022-12-05 17:04 ` [RFC PATCH for 8.0 03/13] vhost: merge avail list and next avail descriptors detach Eugenio Pérez
2022-12-05 17:04 ` [RFC PATCH for 8.0 04/13] vhost: add vhost_svq_save_inflight Eugenio Pérez
2022-12-05 17:04 ` [RFC PATCH for 8.0 05/13] virtio: Specify uint32_t as VirtQueueElementOld members type Eugenio Pérez
2022-12-05 17:04 ` [RFC PATCH for 8.0 06/13] virtio: refactor qemu_get_virtqueue_element Eugenio Pérez
2022-12-05 17:04 ` [RFC PATCH for 8.0 07/13] virtio: refactor qemu_put_virtqueue_element Eugenio Pérez
2022-12-05 17:04 ` [RFC PATCH for 8.0 08/13] virtio: expose VirtQueueElementOld Eugenio Pérez
2022-12-05 17:04 ` [RFC PATCH for 8.0 09/13] virtio: add vmstate_virtqueue_element_old Eugenio Pérez
2022-12-05 17:04 ` [RFC PATCH for 8.0 10/13] virtio-net: Migrate vhost inflight descriptors Eugenio Pérez
2022-12-05 20:52   ` Parav Pandit
2022-12-07  8:40     ` Eugenio Perez Martin
2022-12-06  3:24   ` Jason Wang
2022-12-07  8:56     ` Eugenio Perez Martin
2023-01-16 21:01       ` Michael S. Tsirkin
2023-01-17  3:38         ` Jason Wang
2023-01-10  3:02     ` Parav Pandit
2023-01-11  4:34       ` Jason Wang
2023-01-11  4:40         ` Parav Pandit
2023-01-11  5:51           ` Jason Wang
2023-01-16 19:53             ` Parav Pandit
2023-01-16 20:58             ` Michael S. Tsirkin
2023-01-17  6:54               ` Jason Wang
2022-12-05 17:04 ` [RFC PATCH for 8.0 11/13] virtio-net: save inflight descriptors at vhost shutdown Eugenio Pérez
2022-12-05 17:04 ` [RFC PATCH for 8.0 12/13] vhost: expose vhost_svq_add_element Eugenio Pérez
2022-12-05 17:04 ` [RFC PATCH for 8.0 13/13] vdpa: Recover inflight descriptors Eugenio Pérez
2022-12-06  7:07 ` [RFC PATCH for 8.0 00/13] vDPA-net inflight descriptors migration with SVQ Jason Wang
2022-12-07  8:59   ` Eugenio Perez Martin
2022-12-08  7:31     ` Jason Wang

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