Skip to content

Move ASID test to vhost-vdpa net initialization

Eugenio Pérez qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 4 repliesIn review
  2. v35 patches 13 repliesSuperseded
  3. v26 patches 17 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC6 patches12 repliesSuperseded

Changes in v4 from the cover letter

* Only probe one of MQ or !MQ.
* Merge vhost_vdpa_cvq_is_isolated in vhost_vdpa_probe_cvq_isolation
* Call ioctl directly instead of adding functions.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2vdpa: return errno in vhost_vdpa_get_vring_group errornet/vhost-vdpa.c+9 -00 replies
2/2vdpa: move CVQ isolation check to net_init_vhost_vdpanet/vhost-vdpa.c+111 -431 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchStefano GarzarellaJason WangLei Yang
SeriesT-b
1/2R-b A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCH v4 0/2] Move ASID test to vhost-vdpa net initialization

QEMU v8.0 is able to switch dynamically between vhost-vdpa passthrough and SVQ mode as long as the net device does not have CVQ. The net device state followed (and migrated) by CVQ requires special care.

A pre-requisite to add CVQ to that framework is to determine if devices with CVQ are migratable or not at initialization time. The solution to it is to always shadow only CVQ, and vq groups and ASID are used for that.

However, current qemu version only checks ASID at device start (as "driver set DRIVER_OK status bit"), not at device initialization. A check at initialization time is required. Otherwise, the guest would be able to set and remove migration blockers at will [1].

This series is a requisite for migration of vhost-vdpa net devices with CVQ. However it already makes sense by its own, as it reduces the number of ioctls at migration time, decreasing the error paths there.

[1] https://lore.kernel.org/qemu-devel/[email protected]/
---
v4:
* Only probe one of MQ or !MQ.
* Merge vhost_vdpa_cvq_is_isolated in vhost_vdpa_probe_cvq_isolation
* Call ioctl directly instead of adding functions.

v3:
* Only record cvq_isolated, true if the device have cvq isolated in both !MQ
* and MQ configurations.
* Drop the cache of cvq group, it can be done on top

v2:
* Take out the reset of the device from vhost_vdpa_cvq_is_isolated (reported by Lei Yang).
* Expand patch messages by Stefano G. questions.

Eugenio Pérez (2):
vdpa: return errno in vhost_vdpa_get_vring_group error
vdpa: move CVQ isolation check to net_init_vhost_vdpa

 net/vhost-vdpa.c | 147 ++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 112 insertions(+), 35 deletions(-)
Signature · 1 line
2.31.1