NIC vhost-vdpa state restore via Shadow CVQ
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v10 Latest12 patches 1 replyIn review
- v912 patches 1 replySuperseded
- v812 patches 9 repliesSuperseded
Earlier versions · 7
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v7 | 12 patches | 16 replies | Superseded | |
| v6 | 12 patches | 0 replies | Superseded | |
| v5 | 10 patches | 15 replies | Superseded | |
| v4 | 7 patches | 9 replies | Superseded | |
| v3 | 6 patches | 0 replies | Superseded | |
| v2 | 5 patches | 2 replies | Superseded | |
| v1 | 5 patches | 0 replies | Superseded |
Changes in v10 from the cover letter
- Rebase on latest fixes of [1].
Patches in v10 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | vhost: stop transfer elem ownership in vhost_handle_guest_kickhw/ | +4 | 0 replies | |
| 2/12 | vhost: use SVQ element ndescs instead of opaque data for desc validationhw/ | +2 | 0 replies | |
| 3/12 | vhost: Delete useless read memory barrierhw/ | +0 | 0 replies | |
| 4/12 | vhost: Do not depend on !NULL VirtQueueElement on vhost_svq_flushhw/ | +7 | 0 replies | |
| 5/12 | vhost_net: Add NetClientInfo start callbackhw/ include/ | +9 | 0 replies | |
| 6/12 | vhost_net: Add NetClientInfo stop callbackhw/ include/ | +5 | 0 replies | |
| 7/12 | vdpa: add net_vhost_vdpa_cvq_info NetClientInfonet/ | +11 | 0 replies | |
| 8/12 | vdpa: Move command buffers map to start of net devicenet/ | +58 | 0 replies | |
| 9/12 | vdpa: extract vhost_vdpa_net_cvq_add from vhost_vdpa_net_handle_ctrl_availnet/ | +38 | 0 replies | |
| 10/12 | vhost_net: add NetClientState->load() callbackhw/ include/ | +9 | 0 replies | |
| 11/12 | vdpa: Add virtio-net mac address via CVQ at startnet/ | +40 | 0 replies | |
| 12/12 | vdpa: Delete CVQ migration blockerhw/ include/ net/ | +0 | 0 replies |
Reviews trailers per patch
All 12 patches have a Reviewed-by or Acked-by.
| Patch | Jason Wang |
|---|---|
| 1/12 | A-b |
| 2/12 | A-b |
| 3/12 | A-b |
| 4/12 | A-b |
| 5/12 | A-b |
| 6/12 | A-b |
| 7/12 | A-b |
| 8/12 | A-b |
| 9/12 | A-b |
| 10/12 | A-b |
| 11/12 | A-b |
| 12/12 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v10 00/12] NIC vhost-vdpa state restore via Shadow CVQ
CVQ of net vhost-vdpa devices can be intercepted since the addition of x-svq. The virtio-net device model is updated. The migration was blocked because although the state can be megrated between VMM it was not possible to restore on the destination NIC.
This series add support for SVQ to inject external messages without the guest's knowledge, so before the guest is resumed all the guest visible state is restored. It is done using standard CVQ messages, so the vhost-vdpa device does not need to learn how to restore it: As long as they have the feature, they know how to handle it.
Depending on the device, this series may need fixes with message id [1] to achieve full live migration.
[1] <[email protected]>
v10:
- Rebase on latest fixes of [1].
v9:
- Use guest acked features instead of device's.
- Minors: fix typos and patch messages, constify vhost_vdpa and VirtIONet vars, delete unneeded increment of cursor.
v8:
- Rename NetClientInfo load to start, so is symmetrical with stop()
- Delete copy of device's in buffer at vhost_vdpa_net_load
v7:
- Remove accidental double free.
v6:
- Move map and unmap of the buffers to the start and stop of the device. This implies more callbacks on NetClientInfo, but simplifies the SVQ CVQ code.
- Not assume that in buffer is sizeof(virtio_net_ctrl_ack) in vhost_vdpa_net_cvq_add
- Reduce the number of changes from previous versions
- Delete unused memory barrier
v5:
- Rename s/start/load/
- Use independent NetClientInfo to only add load callback on cvq.
- Accept out sg instead of dev_buffers[] at vhost_vdpa_net_cvq_map_elem
- Use only out size instead of iovec dev_buffers to know if the descriptor is effectively available, allowing to delete artificial !NULL VirtQueueElement on vhost_svq_add call.
v4:
- Actually use NetClientInfo callback.
v3:
- Route vhost-vdpa start code through NetClientInfo callback.
- Delete extra vhost_net_stop_one() call.
v2:
- Fix SIGSEGV dereferencing SVQ when not in svq mode
v1 from RFC:
- Do not reorder DRIVER_OK & enable patches.
- Delete leftovers
Eugenio Pérez (12):
vhost: stop transfer elem ownership in vhost_handle_guest_kick
vhost: use SVQ element ndescs instead of opaque data for desc
validation
vhost: Delete useless read memory barrier
vhost: Do not depend on !NULL VirtQueueElement on vhost_svq_flush
vhost_net: Add NetClientInfo start callback
vhost_net: Add NetClientInfo stop callback
vdpa: add net_vhost_vdpa_cvq_info NetClientInfo
vdpa: Move command buffers map to start of net device
vdpa: extract vhost_vdpa_net_cvq_add from
vhost_vdpa_net_handle_ctrl_avail
vhost_net: add NetClientState->load() callback
vdpa: Add virtio-net mac address via CVQ at start
vdpa: Delete CVQ migration blocker
include/hw/virtio/vhost-vdpa.h | 1 - include/net/net.h | 6 + hw/net/vhost_net.c | 17 +++ hw/virtio/vhost-shadow-virtqueue.c | 27 ++-- hw/virtio/vhost-vdpa.c | 15 -- net/vhost-vdpa.c | 224 ++++++++++++++++++----------- 6 files changed, 177 insertions(+), 113 deletions(-)
Signature · 1 line
2.31.1