From: Stefano Garzarella <sgarzare@redhat.com> To: virtualization@lists.linux-foundation.org Cc: Andrey Zhadchenko <andrey.zhadchenko@virtuozzo.com>, kvm@vger.kernel.org, "Michael S. Tsirkin" <mst@redhat.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, eperezma@redhat.com, stefanha@redhat.com Subject: [PATCH v4 0/9] vdpa_sim: add support for user VA Date: Fri, 24 Mar 2023 16:35:58 +0100 [thread overview] Message-ID: <20230324153607.46836-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. Thanks, Stefano Changelog listed in each patch. v3: https://lore.kernel.org/lkml/20230321154228.182769-1-sgarzare@redhat.com/ v2: https://lore.kernel.org/lkml/20230302113421.174582-1-sgarzare@redhat.com/ RFC v1: https://lore.kernel.org/lkml/20221214163025.103075-1-sgarzare@redhat.com/ Stefano Garzarella (9): vdpa: add bind_mm/unbind_mm callbacks vhost-vdpa: use bind_mm/unbind_mm device callbacks vringh: replace kmap_atomic() with kmap_local_page() vringh: define the stride used for translation vringh: support VA with iotlb vdpa_sim: make devices agnostic for work management vdpa_sim: use kthread worker vdpa_sim: replace the spinlock with a mutex to protect the state vdpa_sim: add support for user VA drivers/vdpa/vdpa_sim/vdpa_sim.h | 11 +- include/linux/vdpa.h | 10 ++ include/linux/vringh.h | 9 ++ drivers/vdpa/vdpa_sim/vdpa_sim.c | 161 ++++++++++++++++++++----- drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 10 +- drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 10 +- drivers/vhost/vdpa.c | 34 ++++++ drivers/vhost/vringh.c | 173 ++++++++++++++++++++++----- 8 files changed, 340 insertions(+), 78 deletions(-) -- 2.39.2 _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
WARNING: multiple messages have this Message-ID (diff)
From: Stefano Garzarella <sgarzare@redhat.com> To: virtualization@lists.linux-foundation.org Cc: stefanha@redhat.com, Jason Wang <jasowang@redhat.com>, linux-kernel@vger.kernel.org, Andrey Zhadchenko <andrey.zhadchenko@virtuozzo.com>, "Michael S. Tsirkin" <mst@redhat.com>, kvm@vger.kernel.org, netdev@vger.kernel.org, eperezma@redhat.com, Stefano Garzarella <sgarzare@redhat.com> Subject: [PATCH v4 0/9] vdpa_sim: add support for user VA Date: Fri, 24 Mar 2023 16:35:58 +0100 [thread overview] Message-ID: <20230324153607.46836-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. Thanks, Stefano Changelog listed in each patch. v3: https://lore.kernel.org/lkml/20230321154228.182769-1-sgarzare@redhat.com/ v2: https://lore.kernel.org/lkml/20230302113421.174582-1-sgarzare@redhat.com/ RFC v1: https://lore.kernel.org/lkml/20221214163025.103075-1-sgarzare@redhat.com/ Stefano Garzarella (9): vdpa: add bind_mm/unbind_mm callbacks vhost-vdpa: use bind_mm/unbind_mm device callbacks vringh: replace kmap_atomic() with kmap_local_page() vringh: define the stride used for translation vringh: support VA with iotlb vdpa_sim: make devices agnostic for work management vdpa_sim: use kthread worker vdpa_sim: replace the spinlock with a mutex to protect the state vdpa_sim: add support for user VA drivers/vdpa/vdpa_sim/vdpa_sim.h | 11 +- include/linux/vdpa.h | 10 ++ include/linux/vringh.h | 9 ++ drivers/vdpa/vdpa_sim/vdpa_sim.c | 161 ++++++++++++++++++++----- drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 10 +- drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 10 +- drivers/vhost/vdpa.c | 34 ++++++ drivers/vhost/vringh.c | 173 ++++++++++++++++++++++----- 8 files changed, 340 insertions(+), 78 deletions(-) -- 2.39.2
next reply other threads:[~2023-03-24 15:36 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-24 15:35 Stefano Garzarella [this message] 2023-03-24 15:35 ` [PATCH v4 0/9] vdpa_sim: add support for user VA Stefano Garzarella 2023-03-24 15:35 ` [PATCH v4 1/9] vdpa: add bind_mm/unbind_mm callbacks Stefano Garzarella 2023-03-24 15:35 ` Stefano Garzarella 2023-03-24 15:36 ` [PATCH v4 2/9] vhost-vdpa: use bind_mm/unbind_mm device callbacks Stefano Garzarella 2023-03-24 15:36 ` Stefano Garzarella 2023-03-24 15:36 ` [PATCH v4 3/9] vringh: replace kmap_atomic() with kmap_local_page() Stefano Garzarella 2023-03-24 15:36 ` Stefano Garzarella 2023-03-24 15:36 ` [PATCH v4 4/9] vringh: define the stride used for translation Stefano Garzarella 2023-03-24 15:36 ` Stefano Garzarella 2023-03-24 15:39 ` [PATCH v4 5/9] vringh: support VA with iotlb Stefano Garzarella 2023-03-24 15:39 ` Stefano Garzarella 2023-03-27 17:18 ` Eugenio Perez Martin 2023-03-30 13:02 ` Simon Horman 2023-03-31 7:45 ` Stefano Garzarella 2023-03-31 7:45 ` Stefano Garzarella 2023-03-24 15:39 ` [PATCH v4 6/9] vdpa_sim: make devices agnostic for work management Stefano Garzarella 2023-03-24 15:39 ` Stefano Garzarella 2023-03-24 15:39 ` [PATCH v4 7/9] vdpa_sim: use kthread worker Stefano Garzarella 2023-03-24 15:39 ` Stefano Garzarella 2023-03-24 15:39 ` [PATCH v4 8/9] vdpa_sim: replace the spinlock with a mutex to protect the state Stefano Garzarella 2023-03-24 15:39 ` Stefano Garzarella 2023-03-24 15:40 ` [PATCH v4 9/9] vdpa_sim: add support for user VA Stefano Garzarella 2023-03-24 15:40 ` 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=20230324153607.46836-1-sgarzare@redhat.com \ --to=sgarzare@redhat.com \ --cc=andrey.zhadchenko@virtuozzo.com \ --cc=eperezma@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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.