Skip to content

Guest announce feature emulation using Shadow VirtQueue

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. v3 Latest4 patches 2 repliesIn review
  2. v2 posting 2/24 patches 14 repliesSuperseded
  3. v2 RFC posting 1/28 patches 20 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC5 patches0 repliesSuperseded

Changes in v3 from the cover letter

* Properly byte swap status field of config space exposed to the guest.
* Fix comment (s/dont/don't)

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4virtio_net: Modify virtio_net_get_config to early returnhw/net/virtio-net.c+15 -130 replies
2/4virtio_net: copy VIRTIO_NET_S_ANNOUNCE if device model has ithw/net/virtio-net.c+2 -01 reply
3/4vdpa: handle VIRTIO_NET_CTRL_ANNOUNCE in vhost_vdpa_net_handle_ctrl_availnet/vhost-vdpa.c+12 -31 reply
4/4vdpa: do not handle VIRTIO_NET_F_GUEST_ANNOUNCE in vhost-vdpanet/vhost-vdpa.c+0 -10 replies

Reviews trailers per patch

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

PatchJason WangPhilippe Mathieu-DaudéMichael S. Tsirkin
1/4A-b R-b R-b
2/4A-b
3/4A-b
4/4A-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 v3 thread

Cover letter [PATCH v3 0/4] 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.

The vdpa device must offer VIRTIO_NET_F_STATUS for the guest to access the status of virtio net config where announcement status bit is set. It is possible to emulate it as always active in case backend does not support it, but this is left for the future, as there are not many devices not offering it anyway.

Patch 1 is less useful now that we don't emulate _F_STATUS anymore but QEMU coding style seems to prefer early return so leaving it in this version.

v3:
* Properly byte swap status field of config space exposed to the guest.
* Fix comment (s/dont/don't)

v2:
* Actually remove VIRTIO_NET_F_STATUS emulation. Comparing with v1, we offer the feature with virtio instead of using virtio/vhost-vdpa.

v1:
* Move code from vhost_net_get_config to virtio_net_get_config.

RFC v2:
* Add VIRTIO_NET_F_STATUS emulation.

Eugenio Pérez (4):
virtio_net: Modify virtio_net_get_config to early return
virtio_net: copy VIRTIO_NET_S_ANNOUNCE if device model has it
vdpa: handle VIRTIO_NET_CTRL_ANNOUNCE in
vhost_vdpa_net_handle_ctrl_avail
vdpa: do not handle VIRTIO_NET_F_GUEST_ANNOUNCE in vhost-vdpa

 hw/net/virtio-net.c | 30 +++++++++++++++++-------------
 net/vhost-vdpa.c    | 16 ++++++++++++----
 2 files changed, 29 insertions(+), 17 deletions(-)
Signature · 1 line
2.31.1