From: Zhu Lingshan <lingshan.zhu@intel.com>
To: jasowang@redhat.com, mst@redhat.com
Cc: virtualization@lists.linux-foundation.org,
netdev@vger.kernel.org, kvm@vger.kernel.org,
Zhu Lingshan <lingshan.zhu@intel.com>
Subject: [RFC 0/4] vDPA: support VHOST_GET/SET_VRING_ENDIAN
Date: Thu, 1 Sep 2022 18:15:57 +0800 [thread overview]
Message-ID: <20220901101601.61420-1-lingshan.zhu@intel.com> (raw)
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
next reply other threads:[~2022-09-01 10:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 10:15 Zhu Lingshan [this message]
2022-09-01 10:15 ` [RFC 1/4] vDPA/ifcvf: add get/set_vq_endian support for vDPA Zhu Lingshan
2022-09-05 8:34 ` Jason Wang
2022-09-06 2:12 ` Zhu, Lingshan
2022-09-01 10:15 ` [RFC 2/4] vDPA: support ioctl VHOST_GET/SET_VRING_ENDIAN Zhu Lingshan
2022-09-01 10:16 ` [RFC 3/4] vDPA: detect device endian in _net_config_fill() and _fill_stats_rec() Zhu Lingshan
2022-09-01 10:16 ` [RFC 4/4] vDPA: report device endian-ness to userspace through netlink Zhu Lingshan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220901101601.61420-1-lingshan.zhu@intel.com \
--to=lingshan.zhu@intel.com \
--cc=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).