[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200529080303.15449-1-jasowang@redhat.com>
Date: Fri, 29 May 2020 16:02:57 +0800
From: Jason Wang <jasowang@...hat.com>
To: mst@...hat.com, jasowang@...hat.com
Cc: kvm@...r.kernel.org, virtualization@...ts.linux-foundation.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
rob.miller@...adcom.com, lingshan.zhu@...el.com,
eperezma@...hat.com, lulu@...hat.com, shahafs@...lanox.com,
hanand@...inx.com, mhabets@...arflare.com, gdawar@...inx.com,
saugatm@...inx.com, vmireyno@...vell.com,
zhangweining@...jie.com.cn, eli@...lanox.com
Subject: [PATCH 0/6] vDPA: doorbell mapping
Hi all:
This series introduce basic functionality of doorbell mapping support
for vhost-vDPA. Userspace program may use mmap() to map a the doorbell
of a specific virtqueue into its address space. This is help to reudce
the syscall or vmexit overhead.
A new vdpa_config_ops was introduced to report the location of the
doorbell, vhost_vdpa may then choose to map the doorbell when:
- The doorbell register is localted at page boundary
- The doorbell register does not share page with non doorbell
registers.
With these two requriements, doorbells layout could be modelled more
easily from guest (e.g Qemu's page-per-vq model) and it would be more
safe to avoid exposing other registers to userspace directly.
IFCVF was reported to support this feature but unfortuantely the one I
used does not meet those requirements. So a new virtio-pci driver for
vDPA bus is introduced, and I verify this with page-per-vq=on with a
userspace vhost-vdpa driver in guest.
Please review.
Thanks
Jason Wang (6):
vhost: allow device that does not depend on vhost worker
vhost: use mmgrab() instead of mmget() for non worker device
vdpa: introduce get_vq_notification method
vhost_vdpa: support doorbell mapping via mmap
vdpa: introduce virtio pci driver
vdpa: vp_vdpa: report doorbell location
drivers/vdpa/Kconfig | 6 +
drivers/vdpa/Makefile | 1 +
drivers/vdpa/vp_vdpa/Makefile | 2 +
drivers/vdpa/vp_vdpa/vp_vdpa.c | 604 +++++++++++++++++++++++++++++++++
drivers/vhost/net.c | 2 +-
drivers/vhost/scsi.c | 2 +-
drivers/vhost/vdpa.c | 61 +++-
drivers/vhost/vhost.c | 80 +++--
drivers/vhost/vhost.h | 2 +
drivers/vhost/vsock.c | 2 +-
include/linux/vdpa.h | 16 +
11 files changed, 753 insertions(+), 25 deletions(-)
create mode 100644 drivers/vdpa/vp_vdpa/Makefile
create mode 100644 drivers/vdpa/vp_vdpa/vp_vdpa.c
--
2.20.1
Powered by blists - more mailing lists