qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4] Guest announce feature emulation using Shadow VirtQueue
@ 2022-12-21 11:50 Eugenio Pérez
  2022-12-21 11:50 ` [PATCH v3 1/4] virtio_net: Modify virtio_net_get_config to early return Eugenio Pérez
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Eugenio Pérez @ 2022-12-21 11:50 UTC (permalink / raw)
  To: qemu-devel
  Cc: Stefano Garzarella, Lei Yang, Zhu Lingshan, Eli Cohen,
	Michael S. Tsirkin, Gautam Dawar, Jason Wang, Parav Pandit,
	Laurent Vivier, Si-Wei Liu, Harpreet Singh Anand, Liuxiangdong,
	Cindy Lu

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

-- 
2.31.1




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

end of thread, other threads:[~2022-12-22  5:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-21 11:50 [PATCH v3 0/4] Guest announce feature emulation using Shadow VirtQueue Eugenio Pérez
2022-12-21 11:50 ` [PATCH v3 1/4] virtio_net: Modify virtio_net_get_config to early return Eugenio Pérez
2022-12-21 11:50 ` [PATCH v3 2/4] virtio_net: copy VIRTIO_NET_S_ANNOUNCE if device model has it Eugenio Pérez
2022-12-22  5:14   ` Jason Wang
2022-12-21 11:50 ` [PATCH v3 3/4] vdpa: handle VIRTIO_NET_CTRL_ANNOUNCE in vhost_vdpa_net_handle_ctrl_avail Eugenio Pérez
2022-12-22  5:16   ` Jason Wang
2022-12-21 11:50 ` [PATCH v3 4/4] vdpa: do not handle VIRTIO_NET_F_GUEST_ANNOUNCE in vhost-vdpa 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).