qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for 8.1 v2 0/6] Move ASID test to vhost-vdpa net initialization
@ 2023-03-23 19:53 Eugenio Pérez
  2023-03-23 19:53 ` [PATCH for 8.1 v2 1/6] vdpa: Remove status in reset tracing Eugenio Pérez
                   ` (5 more replies)
  0 siblings, 6 replies; 24+ messages in thread
From: Eugenio Pérez @ 2023-03-23 19:53 UTC (permalink / raw)
  To: qemu-devel
  Cc: Liuxiangdong, Gautam Dawar, Jason Wang, alvaro.karsz,
	Gonglei (Arei),
	Lei Yang, si-wei.liu, Eli Cohen, Shannon Nelson, Laurent Vivier,
	Michael S. Tsirkin, Stefano Garzarella, Parav Pandit,
	Zhu Lingshan, Cindy Lu, longpeng2, Harpreet Singh Anand

QEMU v8.0.0-rc0 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/2616f0cd-f9e8-d183-ea78-db1be4825d9c@redhat.com/
---
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 (6):
  vdpa: Remove status in reset tracing
  vdpa: add vhost_vdpa_reset_status_fd
  vdpa: add vhost_vdpa_set_dev_features_fd
  vdpa: return errno in vhost_vdpa_get_vring_group error
  vdpa: move CVQ isolation check to net_init_vhost_vdpa
  vdpa: Cache cvq group in VhostVDPAState

 include/hw/virtio/vhost-vdpa.h |   2 +
 hw/virtio/vhost-vdpa.c         |  78 ++++++++-----
 net/vhost-vdpa.c               | 199 +++++++++++++++++++++++++++------
 hw/virtio/trace-events         |   2 +-
 4 files changed, 221 insertions(+), 60 deletions(-)

-- 
2.31.1




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

end of thread, other threads:[~2023-04-21  7:46 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23 19:53 [PATCH for 8.1 v2 0/6] Move ASID test to vhost-vdpa net initialization Eugenio Pérez
2023-03-23 19:53 ` [PATCH for 8.1 v2 1/6] vdpa: Remove status in reset tracing Eugenio Pérez
2023-03-27  9:33   ` Stefano Garzarella
2023-03-28  6:45   ` Jason Wang
2023-03-23 19:54 ` [PATCH for 8.1 v2 2/6] vdpa: add vhost_vdpa_reset_status_fd Eugenio Pérez
2023-03-27  9:34   ` Stefano Garzarella
2023-03-28  6:53   ` Jason Wang
2023-03-28  7:37     ` Eugenio Perez Martin
2023-04-21  7:45       ` Michael S. Tsirkin
2023-03-23 19:54 ` [PATCH for 8.1 v2 3/6] vdpa: add vhost_vdpa_set_dev_features_fd Eugenio Pérez
2023-03-30  6:15   ` Jason Wang
2023-03-23 19:54 ` [PATCH for 8.1 v2 4/6] vdpa: return errno in vhost_vdpa_get_vring_group error Eugenio Pérez
2023-03-27  9:34   ` Stefano Garzarella
2023-03-30  6:15   ` Jason Wang
2023-03-23 19:54 ` [PATCH for 8.1 v2 5/6] vdpa: move CVQ isolation check to net_init_vhost_vdpa Eugenio Pérez
2023-03-27  9:36   ` Stefano Garzarella
2023-03-30  6:20   ` Jason Wang
2023-03-30  6:23     ` Jason Wang
2023-03-30 10:42       ` Eugenio Perez Martin
2023-03-31  8:00         ` Jason Wang
2023-03-31 10:11           ` Eugenio Perez Martin
2023-04-03  5:32             ` Jason Wang
2023-04-03 17:21               ` Eugenio Perez Martin
2023-03-23 19:54 ` [PATCH for 8.1 v2 6/6] vdpa: Cache cvq group in VhostVDPAState Eugenio Pérez

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