From: Shunsuke Mie <mie@igel.co.jp>
To: "Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>,
Rusty Russell <rusty@rustcorp.com.au>
Cc: netdev@vger.kernel.org, Shunsuke Mie <mie@igel.co.jp>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
virtualization@lists.linux-foundation.org
Subject: [RFC PATCH v2 0/7] Introduce a vringh accessor for IO memory
Date: Thu, 2 Feb 2023 18:09:27 +0900 [thread overview]
Message-ID: <20230202090934.549556-1-mie@igel.co.jp> (raw)
Vringh is a host-side implementation of virtio rings, and supports the
vring located on three kinds of memories, userspace, kernel space and a
space translated iotlb.
The goal of this patchset is to refactor vringh and introduce a new vringh
accessor for the vring located on the io memory region. The io memory
accessor (iomem) is used by a driver that is not published yet, but I'm
planning to publish it. Also changes of drivers affected by this patchset
are not included yet. e.g. caif_virtio and vdpa (sim_net,blk, net/mlx5)
drivers.
This patchset can separate into 4 parts:
1. Fix a typo in the vringh header[1/7]
2. Enable a retpoline on virtio/vringh_test [2/7]
2. Unify the vringh APIs and change related [3, 4, 5, 6/7]
3. Support IOMEM to vringh [7/7]
This first part is just for typo fixing. The second part changes build
options of virtio/vringh_test. The change bring the test close to linux
kernel in retpoline. In the third part, unify the vringh API for each
accessors that are user, kern and iotlb. The main point is struct
vringh_ops that fill the gap between all accessors. The final part
introduces an iomem support to vringh according to the unified API in the
second part.
Those changes are tested for the user accessor using vringh_test and kern
and iomem using a non published driver, but I think I can add a link to a
patchset for the driver in the next version of this patchset.
v2:
- Add a build options to enable the retpoline in vringh_test
- Add experimental results of the API unification
v1: https://lore.kernel.org/virtualization/20221227022528.609839-1-mie@igel.co.jp/
- Initial patchset
Shunsuke Mie (7):
vringh: fix a typo in comments for vringh_kiov
tools/virtio: enable to build with retpoline
vringh: remove vringh_iov and unite to vringh_kiov
tools/virtio: convert to new vringh user APIs
vringh: unify the APIs for all accessors
tools/virtio: convert to use new unified vringh APIs
vringh: IOMEM support
drivers/vhost/Kconfig | 6 +
drivers/vhost/vringh.c | 721 ++++++++++++-------------------------
include/linux/vringh.h | 147 +++-----
tools/virtio/Makefile | 2 +-
tools/virtio/vringh_test.c | 123 ++++---
5 files changed, 357 insertions(+), 642 deletions(-)
--
2.25.1
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next reply other threads:[~2023-02-02 9:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-02 9:09 Shunsuke Mie [this message]
2023-02-02 9:09 ` [RFC PATCH v2 1/7] vringh: fix a typo in comments for vringh_kiov Shunsuke Mie
2023-02-02 10:32 ` Michael S. Tsirkin
2023-02-02 9:09 ` [RFC PATCH v2 2/7] tools/virtio: enable to build with retpoline Shunsuke Mie
2023-02-02 10:33 ` Michael S. Tsirkin
2023-02-02 9:09 ` [RFC PATCH v2 3/7] vringh: remove vringh_iov and unite to vringh_kiov Shunsuke Mie
2023-02-02 9:09 ` [RFC PATCH v2 4/7] tools/virtio: convert to new vringh user APIs Shunsuke Mie
2023-02-02 9:09 ` [RFC PATCH v2 5/7] vringh: unify the APIs for all accessors Shunsuke Mie
2023-02-02 9:09 ` [RFC PATCH v2 6/7] tools/virtio: convert to use new unified vringh APIs Shunsuke Mie
2023-02-02 9:09 ` [RFC PATCH v2 7/7] vringh: IOMEM support Shunsuke Mie
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=20230202090934.549556-1-mie@igel.co.jp \
--to=mie@igel.co.jp \
--cc=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--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).