mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefano Garzarella <sgarzare@redhat.com>
To: virtualization@lists.linux-foundation.org
Cc: Jason Wang <jasowang@redhat.com>,
	Andrey Zhadchenko <andrey.zhadchenko@virtuozzo.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	"Michael S. Tsirkin" <mst@redhat.com>,
	eperezma@redhat.com, stefanha@redhat.com, netdev@vger.kernel.org,
	Stefano Garzarella <sgarzare@redhat.com>
Subject: [RFC PATCH 0/6] vdpa_sim: add support for user VA
Date: Wed, 14 Dec 2022 17:30:19 +0100	[thread overview]
Message-ID: <20221214163025.103075-1-sgarzare@redhat.com> (raw)

This series adds support for the use of user virtual addresses in the
vDPA simulator devices.

The main reason for this change is to lift the pinning of all guest memory.
Especially with virtio devices implemented in software.

The next step would be to generalize the code in vdpa-sim to allow the
implementation of in-kernel software devices. Similar to vhost, but using vDPA
so we can reuse the same software stack (e.g. in QEMU) for both HW and SW
devices.

For example, we have never merged vhost-blk, and lately there has been interest.
So it would be nice to do it directly with vDPA to reuse the same code in the
VMM for both HW and SW vDPA block devices.

The main problem (addressed by this series) was due to the pinning of all
guest memory, which thus prevented the overcommit of guest memory.

There are still some TODOs to be fixed, but I would like to have your feedback
on this RFC.

Thanks,
Stefano

Note: this series is based on Linux v6.1 + couple of fixes (that I needed to
run libblkio tests) already posted but not yet merged.

Tree available here: https://gitlab.com/sgarzarella/linux/-/tree/vdpa-sim-use-va

Stefano Garzarella (6):
  vdpa: add bind_mm callback
  vhost-vdpa: use bind_mm device callback
  vringh: support VA with iotlb
  vdpa_sim: make devices agnostic for work management
  vdpa_sim: use kthread worker
  vdpa_sim: add support for user VA

 drivers/vdpa/vdpa_sim/vdpa_sim.h     |   7 +-
 include/linux/vdpa.h                 |   8 +
 include/linux/vringh.h               |   5 +-
 drivers/vdpa/mlx5/core/resources.c   |   3 +-
 drivers/vdpa/mlx5/net/mlx5_vnet.c    |   2 +-
 drivers/vdpa/vdpa_sim/vdpa_sim.c     | 132 +++++++++++++-
 drivers/vdpa/vdpa_sim/vdpa_sim_blk.c |   6 +-
 drivers/vdpa/vdpa_sim/vdpa_sim_net.c |   6 +-
 drivers/vhost/vdpa.c                 |  22 +++
 drivers/vhost/vringh.c               | 250 +++++++++++++++++++++------
 10 files changed, 370 insertions(+), 71 deletions(-)

-- 
2.38.1


             reply	other threads:[~2022-12-14 16:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14 16:30 Stefano Garzarella [this message]
2022-12-14 16:30 ` [RFC PATCH 1/6] vdpa: add bind_mm callback Stefano Garzarella
2022-12-16  6:37   ` Jason Wang
2022-12-16  8:17     ` Stefano Garzarella
2022-12-22  4:18       ` Jason Wang
2022-12-14 16:30 ` [RFC PATCH 2/6] vhost-vdpa: use bind_mm device callback Stefano Garzarella
2022-12-14 16:30 ` [RFC PATCH 3/6] vringh: support VA with iotlb Stefano Garzarella
2022-12-14 16:30 ` [RFC PATCH 4/6] vdpa_sim: make devices agnostic for work management Stefano Garzarella
2022-12-14 16:30 ` [RFC PATCH 5/6] vdpa_sim: use kthread worker Stefano Garzarella
2022-12-14 16:30 ` [RFC PATCH 6/6] vdpa_sim: add support for user VA Stefano Garzarella
2022-12-16  7:26   ` Jason Wang
2022-12-16  8:13     ` Stefano Garzarella
2022-12-21  7:17   ` Eugenio Perez Martin
2022-12-21  9:50     ` Stefano Garzarella

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=20221214163025.103075-1-sgarzare@redhat.com \
    --to=sgarzare@redhat.com \
    --cc=andrey.zhadchenko@virtuozzo.com \
    --cc=eperezma@redhat.com \
    --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=stefanha@redhat.com \
    --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

all inboxes | Powered by JetHome®