ASID support in vhost-vdpa net
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v9 Latest12 patches 5 repliesIn review
- v812 patches 7 repliesSuperseded
- v710 patches 9 repliesSuperseded
Earlier versions · 6
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v6 | 10 patches | 35 replies | Superseded | |
| v5 | 6 patches | 7 replies | Superseded | |
| v4 | 6 patches | 6 replies | Superseded | |
| v3 | 7 patches | 8 replies | Superseded | |
| v2 | 7 patches | 5 replies | Superseded | |
| v1 | 6 patches | 1 reply | Superseded |
Changes in v9 from the cover letter
- Reuse iova_range fetched from the device at initialization, instead of fetch it again at vhost_vdpa_net_cvq_start.
- Add comment about how migration is blocked in case ASID does not met our expectations.
- Delete warning about CVQ group not being independent.
Patches in v9 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | vdpa: use v->shadow_vqs_enabled in vhost_vdpa_svqs_start & stophw/ | +2 | 0 replies | |
| 2/12 | vhost: set SVQ device call handler at SVQ starthw/ | +2 | 0 replies | |
| 3/12 | vhost: allocate SVQ device file descriptors at device starthw/ hw/ | +30 | 0 replies | |
| 4/12 | vhost: move iova_tree set to vhost_svq_starthw/ hw/ hw/ | +8 | 0 replies | |
| 5/12 | vdpa: add vhost_vdpa_net_valid_svq_featuresnet/ | +17 | 0 replies | |
| 6/12 | vdpa: request iova_range only oncehw/ net/ | +14 | 4 replies | |
| 7/12 | vdpa: move SVQ vring features check to net/hw/ net/ | +4 | 0 replies | |
| 8/12 | vdpa: allocate SVQ array unconditionallyhw/ | +0 | 0 replies | |
| 9/12 | vdpa: add asid parameter to vhost_vdpa_dma_map/unmaphw/ hw/ include/ +1 more | +41 | 0 replies | |
| 10/12 | vdpa: store x-svq parameter in VhostVDPAStatenet/ | +3 | 0 replies | |
| 11/12 | vdpa: add shadow_data to vhost_vdpahw/ include/ net/ | +6 | 0 replies | |
| 12/12 | vdpa: always start CVQ in SVQ mode if possiblehw/ net/ | +111 | 1 reply |
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 v9 00/12] ASID support in vhost-vdpa net
Control VQ is the way net devices use to send changes to the device state, like the number of active queues or its mac address.
QEMU needs to intercept this queue so it can track these changes and is able to migrate the device. It can do it from 1576dbb5bbc4 ("vdpa: Add x-svq to NetdevVhostVDPAOptions"). However, to enable x-svq implies to shadow all VirtIO device's virtqueues, which will damage performance.
This series adds address space isolation, so the device and the guest communicate directly with them (passthrough) and CVQ communication is split in
two: The guest communicates with qemu and qemu forwards the commands to the device.
Comments are welcome. Thanks!
v9:
- Reuse iova_range fetched from the device at initialization, instead of fetch it again at vhost_vdpa_net_cvq_start.
- Add comment about how migration is blocked in case ASID does not met our expectations.
- Delete warning about CVQ group not being independent.
v8:
- Do not allocate iova_tree on net_init_vhost_vdpa if only CVQ is shadowed. Move the iova_tree allocation to vhost_vdpa_net_cvq_start and vhost_vdpa_net_cvq_stop in this case.
v7:
- Never ask for number of address spaces, just react if isolation is not possible.
- Return ASID ioctl errors instead of masking them as if the device has no asid.
- Rename listener_shadow_vq to shadow_data
- Move comment on zero initailization of vhost_vdpa_dma_map above the functions.
- Add VHOST_VDPA_GUEST_PA_ASID macro.
v6:
- Do not allocate SVQ resources like file descriptors if SVQ cannot be used.
- Disable shadow CVQ if the device does not support it because of net features.
v5:
- Move vring state in vhost_vdpa_get_vring_group instead of using a parameter.
- Rename VHOST_VDPA_NET_CVQ_PASSTHROUGH to VHOST_VDPA_NET_DATA_ASID
v4:
- Rebased on last CVQ start series, that allocated CVQ cmd bufs at load
- Squash vhost_vdpa_cvq_group_is_independent.
- Do not check for cvq index on vhost_vdpa_net_prepare, we only have one that callback registered in that NetClientInfo.
- Add comment specifying behavior if device does not support _F_ASID
- Update headers to a later Linux commit to not to remove SETUP_RNG_SEED
v3:
- Do not return an error but just print a warning if vdpa device initialization returns failure while getting AS num of VQ groups
- Delete extra newline
v2:
- Much as commented on series [1], handle vhost_net backend through NetClientInfo callbacks instead of directly.
- Fix not freeing SVQ properly when device does not support CVQ
- Add BIT_ULL missed checking device's backend feature for _F_ASID.
Eugenio Pérez (12):
vdpa: use v->shadow_vqs_enabled in vhost_vdpa_svqs_start & stop
vhost: set SVQ device call handler at SVQ start
vhost: allocate SVQ device file descriptors at device start
vhost: move iova_tree set to vhost_svq_start
vdpa: add vhost_vdpa_net_valid_svq_features
vdpa: request iova_range only once
vdpa: move SVQ vring features check to net/
vdpa: allocate SVQ array unconditionally
vdpa: add asid parameter to vhost_vdpa_dma_map/unmap
vdpa: store x-svq parameter in VhostVDPAState
vdpa: add shadow_data to vhost_vdpa
vdpa: always start CVQ in SVQ mode if possible
hw/virtio/vhost-shadow-virtqueue.h | 5 +- include/hw/virtio/vhost-vdpa.h | 16 ++- hw/virtio/vhost-shadow-virtqueue.c | 44 ++------ hw/virtio/vhost-vdpa.c | 140 +++++++++++------------ net/vhost-vdpa.c | 174 ++++++++++++++++++++++++----- hw/virtio/trace-events | 4 +- 6 files changed, 237 insertions(+), 146 deletions(-)
Signature · 1 line
2.31.1