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