Skip to content

Guest announce feature emulation using Shadow VirtQueue

Eugenio Pérez qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 1 replyIn review

Changes in v1 from the cover letter

* Move code from vhost_net_get_config to virtio_net_get_config.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7vdpa: Save emulated features list in vhost_vdpahw/virtio/vhost-vdpa.c include/hw/virtio/vhost-vdpa.h net/vhost-vdpa.c+10 -40 replies
2/7virtio_net: Modify virtio_net_get_config to early returnhw/net/virtio-net.c+15 -130 replies
3/7virtio_net: Handle _F_STATUS emulation in virtio_net_get_confighw/net/virtio-net.c+9 -20 replies
4/7vdpa: Expose VIRTIO_NET_F_STATUS unconditionallynet/vhost-vdpa.c+3 -00 replies
5/7vdpa: handle VIRTIO_NET_CTRL_ANNOUNCE in vhost_vdpa_net_handle_ctrl_availnet/vhost-vdpa.c+12 -30 replies
6/7virtio_net: copy VIRTIO_NET_S_ANNOUNCE if device model has ithw/net/virtio-net.c+1 -00 replies
7/7vdpa: Offer VIRTIO_NET_F_GUEST_ANNOUNCE feature if SVQ is enablednet/vhost-vdpa.c+3 -00 replies

Reviews trailers per patch

None of the 7 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMichael S. Tsirkin
SeriesR-b
1/7
2/7
3/7
4/7
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/7] Guest announce feature emulation using Shadow VirtQueue

A gratuitous ARP is recommended after a live migration to reduce the amount of time needed by the network links to be aware of the new location. A hypervisor may not have the knowledge of the guest network configuration, and this is especially true on passthrough devices, so its simpler to ask the guest to do it.

However, the device control part of this feature can be totally emulated by qemu and shadow virtqueue, not needing any special feature from the actual vdpa device.

VIRTIO_NET_F_STATUS is also needed for the guest to access the status of virtio net config where announcement status bit is set. Emulating it as always active in case backend does not support it.

This series need two fixes applied:
* https://lists.nongnu.org/archive/html/qemu-devel/2022-10/msg03242.html
* https://lists.nongnu.org/archive/html/qemu-devel/2022-10/msg03241.html

v1:
* Move code from vhost_net_get_config to virtio_net_get_config.

RFC v2:
* Add VIRTIO_NET_F_STATUS emulation.

Eugenio Pérez (7):
vdpa: Save emulated features list in vhost_vdpa
virtio_net: Modify virtio_net_get_config to early return
virtio_net: Handle _F_STATUS emulation in virtio_net_get_config
vdpa: Expose VIRTIO_NET_F_STATUS unconditionally
vdpa: handle VIRTIO_NET_CTRL_ANNOUNCE in
vhost_vdpa_net_handle_ctrl_avail
virtio_net: copy VIRTIO_NET_S_ANNOUNCE if device model has it
vdpa: Offer VIRTIO_NET_F_GUEST_ANNOUNCE feature if SVQ is enabled

 include/hw/virtio/vhost-vdpa.h |  2 ++
 hw/net/virtio-net.c            | 40 +++++++++++++++++++++-------------
 hw/virtio/vhost-vdpa.c         |  8 +++----
 net/vhost-vdpa.c               | 25 ++++++++++++++++++---
 4 files changed, 53 insertions(+), 22 deletions(-)
Signature · 1 line
2.31.1