Skip to content

RFC vDPA: support VHOST_GET/SET_VRING_ENDIAN

Zhu Lingshan kvm netdev virtualization 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4vDPA/ifcvf: add get/set_vq_endian support for vDPAdrivers/vdpa/ifcvf/ifcvf_base.h drivers/vdpa/ifcvf/ifcvf_main.c include/linux/vdpa.h+29 -02 replies
2/4vDPA: support ioctl VHOST_GET/SET_VRING_ENDIANdrivers/vhost/vdpa.c+31 -10 replies
3/4vDPA: detect device endian in _net_config_fill() and _fill_stats_rec()drivers/vdpa/vdpa.c+24 -40 replies
4/4vDPA: report device endian-ness to userspace through netlinkdrivers/vdpa/vdpa.c include/uapi/linux/vdpa.h+4 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/4] vDPA: support VHOST_GET/SET_VRING_ENDIAN

This series add ioctl VHOST_GET_VRING_ENDIAN and VHOST_SET_VRING_ENDIAN support for vDPA.

Endian-ness is a device wide attribute, so QEMU can get/set endian-ness of the device by these ioctls, and QEMU can be aware of the endian-ness of the device.

To support these ioctls, vendor driver needs to implement:
vdpa_config_ops.get_vq_endian: set vq endian-ness vdpa_config_ops.set_vq_endian: get vq endian-ness

This series also call vdpa_config_ops.get_config() instead of vdpa_get_config_unlocked() in vdpa_dev_net_config_fill(). Then do endian-ness covert properly through __virtio16_to_cpu by support of vdpa_config_ops.get_vq_endian. So there are no race on set_features() any more.

Zhu Lingshan (4):
vDPA/ifcvf: add get/set_vq_endian support for vDPA
vDPA: support ioctl VHOST_GET/SET_VRING_ENDIAN
vDPA: detect device endian in _net_config_fill() and _fill_stats_rec()
vDPA: report device endian-ness to userspace through netlink

 drivers/vdpa/ifcvf/ifcvf_base.h |  1 +
 drivers/vdpa/ifcvf/ifcvf_main.c | 15 +++++++++++++++
 drivers/vdpa/vdpa.c             | 31 +++++++++++++++++++++++++++----
 drivers/vhost/vdpa.c            | 32 +++++++++++++++++++++++++++++++-
 include/linux/vdpa.h            | 13 +++++++++++++
 include/uapi/linux/vdpa.h       |  1 +
 6 files changed, 88 insertions(+), 5 deletions(-)
Signature · 1 line
2.31.1