[RFC v3 00/11] Introduce VDUSE - vDPA Device in Userspace

2021-01-18 Thread Xie Yongji
tore the iova_map Xie Yongji (11): eventfd: track eventfd_signal() recursion depth separately in different cases eventfd: Increase the recursion depth of eventfd_signal() vdpa: Remove the restriction that only supports virtio-net devices vhost-vdpa: protect concurrent access to vhost device iotl

[RFC v3 01/11] eventfd: track eventfd_signal() recursion depth separately in different cases

2021-01-18 Thread Xie Yongji
deadlock case. Then it could be fine to increase the global percpu counter later. Signed-off-by: Xie Yongji --- fs/aio.c| 3 ++- fs/eventfd.c| 20 +++- include/linux/eventfd.h | 5 + 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/fs

[RFC v3 08/11] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-01-18 Thread Xie Yongji
ed to trigger interrupt callbacks and receive virtqueue kicks in userspace. Signed-off-by: Xie Yongji --- Documentation/driver-api/vduse.rst | 85 ++ Documentation/userspace-api/ioctl/ioctl-number.rst |1 + drivers/vdpa/Kconfig |7 + drivers

[RFC v3 10/11] vduse: grab the module's references until there is no vduse device

2021-01-18 Thread Xie Yongji
The module should not be unloaded if any vduse device exists. So increase the module's reference count when creating vduse device. And the reference count is kept until the device is destroyed. Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa_user/vduse_dev.c | 2 ++ 1 file changed, 2 inser

[RFC v3 11/11] vduse: Introduce a workqueue for irq injection

2021-01-18 Thread Xie Yongji
This patch introduces a dedicated workqueue for irq injection so that we are able to do some performance tuning for it. Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa_user/eventfd.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/vdpa_user/eventfd.c b

[RFC v3 09/11] vduse: Add VDUSE_GET_DEV ioctl

2021-01-19 Thread Xie Yongji
This new ioctl will be used to retrieve the file descriptor referring to userspace vDPA device to support reconnecting. Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa_user/vduse_dev.c | 30 ++ include/uapi/linux/vduse.h | 1 + 2 files changed, 31 insertions

[RFC v3 07/11] vdpa: Pass the netlink attributes to ops.dev_add()

2021-01-19 Thread Xie Yongji
Pass the netlink attributes to ops.dev_add() so that we could get some device specific attributes when creating a vdpa device. Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa.c | 2 +- drivers/vdpa/vdpa_sim/vdpa_sim.c | 3 ++- include/linux/vdpa.h | 4 +++- 3 files

[RFC v3 06/11] vhost-vdpa: Add an opaque pointer for vhost IOTLB

2021-01-19 Thread Xie Yongji
Add an opaque pointer for vhost IOTLB to store the corresponding vma->vm_file and offset on the DMA mapping. It will be used in VDUSE case later. Suggested-by: Jason Wang Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 11 --- drivers/vhost/iotlb.c|

[RFC v3 05/11] vdpa: shared virtual addressing support

2021-01-19 Thread Xie Yongji
address during DMA mapping. Suggested-by: Jason Wang Signed-off-by: Xie Yongji --- drivers/vdpa/ifcvf/ifcvf_main.c | 2 +- drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +- drivers/vdpa/vdpa.c | 5 - drivers/vdpa/vdpa_sim/vdpa_sim.c | 3 ++- drivers/vhost/vdpa.c

[RFC v3 04/11] vhost-vdpa: protect concurrent access to vhost device iotlb

2021-01-19 Thread Xie Yongji
Introduce a mutex to protect vhost device iotlb from concurrent access. Fixes: 4c8cf318("vhost: introduce vDPA-based backend") Signed-off-by: Xie Yongji --- drivers/vhost/vdpa.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vd

[RFC v3 03/11] vdpa: Remove the restriction that only supports virtio-net devices

2021-01-19 Thread Xie Yongji
With VDUSE, we should be able to support all kinds of virtio devices. Signed-off-by: Xie Yongji --- drivers/vhost/vdpa.c | 29 +++-- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 29ed4173f04e

[RFC v3 02/11] eventfd: Increase the recursion depth of eventfd_signal()

2021-01-19 Thread Xie Yongji
Increase the recursion depth of eventfd_signal() to 1. This will be used in VDUSE case later. Signed-off-by: Xie Yongji --- fs/eventfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/eventfd.c b/fs/eventfd.c index 2df24f9bada3..478cdc175949 100644 --- a/fs/eventfd.c

[RFC v2 00/13] Introduce VDUSE - vDPA Device in Userspace

2020-12-22 Thread Xie Yongji
r irq injection - Replace interval tree with array map to store the iova_map Xie Yongji (13): mm: export zap_page_range() for driver use eventfd: track eventfd_signal() recursion depth separately in different cases eventfd: Increase the recursion depth of eventfd_signal() vdpa: Remov

[RFC v2 02/13] eventfd: track eventfd_signal() recursion depth separately in different cases

2020-12-22 Thread Xie Yongji
deadlock case. Then it could be fine to increase the global percpu counter later. Signed-off-by: Xie Yongji --- fs/aio.c| 3 ++- fs/eventfd.c| 20 +++- include/linux/eventfd.h | 5 + 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/fs

[RFC v2 03/13] eventfd: Increase the recursion depth of eventfd_signal()

2020-12-22 Thread Xie Yongji
Increase the recursion depth of eventfd_signal() to 1. This will be used in VDUSE case later. Signed-off-by: Xie Yongji --- fs/eventfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/eventfd.c b/fs/eventfd.c index 2df24f9bada3..478cdc175949 100644 --- a/fs/eventfd.c

[RFC v2 04/13] vdpa: Remove the restriction that only supports virtio-net devices

2020-12-22 Thread Xie Yongji
With VDUSE, we should be able to support all kinds of virtio devices. Signed-off-by: Xie Yongji --- drivers/vhost/vdpa.c | 29 +++-- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 29ed4173f04e

[RFC v2 01/13] mm: export zap_page_range() for driver use

2020-12-22 Thread Xie Yongji
Export zap_page_range() for use in VDUSE. Signed-off-by: Xie Yongji --- mm/memory.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/memory.c b/mm/memory.c index 7d608765932b..edd2d6497bb3 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -1542,6 +1542,7 @@ void zap_page_range(struct

[RFC v2 13/13] vduse: Introduce a workqueue for irq injection

2020-12-22 Thread Xie Yongji
This patch introduces a dedicated workqueue for irq injection so that we are able to do some performance tuning for it. Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa_user/eventfd.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/vdpa_user/eventfd.c b

[RFC v2 07/13] vduse: support get/set virtqueue state

2020-12-22 Thread Xie Yongji
This patch makes vhost-vdpa bus driver can get/set virtqueue state from userspace VDUSE process. Signed-off-by: Xie Yongji --- Documentation/driver-api/vduse.rst | 4 +++ drivers/vdpa/vdpa_user/vduse_dev.c | 54 ++ include/uapi/linux/vduse.h | 9

[RFC v2 08/13] vdpa: Introduce process_iotlb_msg() in vdpa_config_ops

2020-12-22 Thread Xie Yongji
This patch introduces a new method in the vdpa_config_ops to support processing the raw vhost memory mapping message in the vDPA device driver. Signed-off-by: Xie Yongji --- drivers/vhost/vdpa.c | 5 - include/linux/vdpa.h | 7 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff

[RFC v2 05/13] vdpa: Pass the netlink attributes to ops.dev_add()

2020-12-22 Thread Xie Yongji
Pass the netlink attributes to ops.dev_add() so that we could get some device specific attributes when creating a vdpa device. Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa.c | 2 +- drivers/vdpa/vdpa_sim/vdpa_sim.c | 3 ++- include/linux/vdpa.h | 4 +++- 3 files

[RFC v2 09/13] vduse: Add support for processing vhost iotlb message

2020-12-22 Thread Xie Yongji
ocess. Signed-off-by: Xie Yongji --- Documentation/driver-api/vduse.rst | 15 +++- drivers/vdpa/vdpa_user/vduse_dev.c | 147 - include/uapi/linux/vduse.h | 11 +++ 3 files changed, 171 insertions(+), 2 deletions(-) diff --git a/Documentation/drive

[RFC v2 10/13] vduse: grab the module's references until there is no vduse device

2020-12-22 Thread Xie Yongji
The module should not be unloaded if any vduse device exists. So increase the module's reference count when creating vduse device. And the reference count is kept until the device is destroyed. Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa_user/vduse_dev.c | 2 ++ 1 file changed, 2 inser

[RFC v2 12/13] vduse: Add memory shrinker to reclaim bounce pages

2020-12-22 Thread Xie Yongji
Add a shrinker to reclaim several pages used by bounce buffer in order to avoid memory pressures. Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa_user/vduse_dev.c | 51 ++ 1 file changed, 51 insertions(+) diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b

[RFC v2 06/13] vduse: Introduce VDUSE - vDPA Device in Userspace

2020-12-22 Thread Xie Yongji
eventfd mechanism is used to trigger interrupt callbacks and receive virtqueue kicks in userspace Now we only support virtio-vdpa bus driver with this patch applied. Signed-off-by: Xie Yongji --- Documentation/driver-api/vduse.rst | 74 ++ Documentation/userspace-api/ioctl

[RFC v2 11/13] vduse/iova_domain: Support reclaiming bounce pages

2020-12-22 Thread Xie Yongji
Introduce vduse_domain_reclaim() to support reclaiming bounce page when necessary. We will do reclaiming chunk by chunk. And only reclaim the iova chunk that no one used. Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa_user/iova_domain.c | 83 ++-- drivers/vdpa

[RFC v4 00/11] Introduce VDUSE - vDPA Device in Userspace

2021-02-23 Thread Xie Yongji
move the patches on bounce pages reclaim V1 to V2: - Add vhost-vdpa support - Add some documents - Based on the vdpa management tool - Introduce a workqueue for irq injection - Replace interval tree with array map to store the iova_map Xie Yongji (11): eventfd: Increase the recursion depth of eventf

[RFC v4 01/11] eventfd: Increase the recursion depth of eventfd_signal()

2021-02-23 Thread Xie Yongji
Increase the recursion depth of eventfd_signal() to 1. This is the maximum recursion depth we have found so far. Signed-off-by: Xie Yongji --- fs/eventfd.c| 2 +- include/linux/eventfd.h | 5 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fs/eventfd.c b/fs

[RFC v4 02/11] vhost-vdpa: protect concurrent access to vhost device iotlb

2021-02-23 Thread Xie Yongji
Use vhost_dev->mutex to protect vhost device iotlb from concurrent access. Fixes: 4c8cf318("vhost: introduce vDPA-based backend") Signed-off-by: Xie Yongji --- drivers/vhost/vdpa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost

[RFC v4 03/11] vhost-iotlb: Add an opaque pointer for vhost IOTLB

2021-02-23 Thread Xie Yongji
Add an opaque pointer for vhost IOTLB. And introduce vhost_iotlb_add_range_ctx() to accept it. Suggested-by: Jason Wang Signed-off-by: Xie Yongji --- drivers/vhost/iotlb.c | 20 include/linux/vhost_iotlb.h | 3 +++ 2 files changed, 19 insertions(+), 4 deletions

[RFC v4 04/11] vdpa: Add an opaque pointer for vdpa_config_ops.dma_map()

2021-02-23 Thread Xie Yongji
Add an opaque pointer for DMA mapping. Suggested-by: Jason Wang Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 6 +++--- drivers/vhost/vdpa.c | 2 +- include/linux/vdpa.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers

[RFC v4 05/11] vdpa: Support transferring virtual addressing during DMA mapping

2021-02-23 Thread Xie Yongji
and offset will be also passed as an opaque pointer. Suggested-by: Jason Wang Signed-off-by: Xie Yongji --- drivers/vdpa/ifcvf/ifcvf_main.c | 2 +- drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +- drivers/vdpa/vdpa.c | 9 +++- drivers/vdpa/vdpa_sim/vdpa_sim.c | 2 +- drivers/vh

[RFC v4 06/11] vduse: Implement an MMU-based IOMMU driver

2021-02-23 Thread Xie Yongji
se its virtual address to access the dma buffer in kernel. And to avoid security issue, a bounce-buffering mechanism is introduced to prevent userspace accessing the original buffer directly. Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa_user/iova_domain.c

[RFC v4 09/11] Documentation: Add documentation for VDUSE

2021-02-23 Thread Xie Yongji
VDUSE (vDPA Device in Userspace) is a framework to support implementing software-emulated vDPA devices in userspace. This document is intended to clarify the VDUSE design and usage. Signed-off-by: Xie Yongji --- Documentation/userspace-api/index.rst | 1 + Documentation/userspace-api

[RFC v4 11/11] vduse: Support binding irq to the specified cpu

2021-02-23 Thread Xie Yongji
Add a parameter for the ioctl VDUSE_INJECT_VQ_IRQ to support injecting virtqueue's interrupt to the specified cpu. Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa_user/vduse_dev.c | 22 +- include/uapi/linux/vduse.h | 7 ++- 2 files changed, 23 insertions(

[RFC v4 10/11] vduse: Introduce a workqueue for irq injection

2021-02-23 Thread Xie Yongji
This patch introduces a workqueue to support injecting virtqueue's interrupt asynchronously. This is mainly for performance considerations which makes sure the push() and pop() for used vring can be asynchronous. Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa_user/vduse_dev.c

[RFC v4 07/11] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-02-23 Thread Xie Yongji
() to inject interrupt and use the eventfd mechanism to receive virtqueue kicks. Signed-off-by: Xie Yongji --- Documentation/userspace-api/ioctl/ioctl-number.rst |1 + drivers/vdpa/Kconfig | 10 + drivers/vdpa/Makefile |1 + drivers

[RFC v4 08/11] vduse: Add config interrupt support

2021-02-23 Thread Xie Yongji
This patch introduces a new ioctl VDUSE_INJECT_CONFIG_IRQ to support injecting config interrupt. Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa_user/vduse_dev.c | 24 +++- include/uapi/linux/vduse.h | 3 +++ 2 files changed, 26 insertions(+), 1 deletion(-) diff

[PATCH v6 00/10] Introduce VDUSE - vDPA Device in Userspace

2021-03-31 Thread Xie Yongji
support - Add some documents - Based on the vdpa management tool - Introduce a workqueue for irq injection - Replace interval tree with array map to store the iova_map Xie Yongji (10): file: Export receive_fd() to modules eventfd: Increase the recursion depth of eventfd_signal() vhost-vdpa:

[PATCH v6 05/10] vdpa: Add an opaque pointer for vdpa_config_ops.dma_map()

2021-03-31 Thread Xie Yongji
Add an opaque pointer for DMA mapping. Suggested-by: Jason Wang Signed-off-by: Xie Yongji Acked-by: Jason Wang --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 6 +++--- drivers/vhost/vdpa.c | 2 +- include/linux/vdpa.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions

[PATCH v6 02/10] eventfd: Increase the recursion depth of eventfd_signal()

2021-03-31 Thread Xie Yongji
signal [eventfd] --> vhost_poll_wakeup [vhost] --> vduse_vdpa_kick_vq [vduse] --> eventfd_signal[eventfd] Signed-off-by: Xie Yongji Acked-by: Jason Wang --- fs/eventfd.c| 2 +- include/linu

[PATCH v6 01/10] file: Export receive_fd() to modules

2021-03-31 Thread Xie Yongji
Export receive_fd() so that some modules can use it to pass file descriptor between processes without missing any security stuffs. Signed-off-by: Xie Yongji --- fs/file.c| 6 ++ include/linux/file.h | 7 +++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/fs

[PATCH v6 06/10] vdpa: factor out vhost_vdpa_pa_map() and vhost_vdpa_pa_unmap()

2021-03-31 Thread Xie Yongji
The upcoming patch is going to support VA mapping/unmapping. So let's factor out the logic of PA mapping/unmapping firstly to make the code more readable. Suggested-by: Jason Wang Signed-off-by: Xie Yongji Acked-by: Jason Wang --- drivers/vhost/vdpa.c

[PATCH v6 04/10] vhost-iotlb: Add an opaque pointer for vhost IOTLB

2021-03-31 Thread Xie Yongji
Add an opaque pointer for vhost IOTLB. And introduce vhost_iotlb_add_range_ctx() to accept it. Suggested-by: Jason Wang Signed-off-by: Xie Yongji Acked-by: Jason Wang --- drivers/vhost/iotlb.c | 20 include/linux/vhost_iotlb.h | 3 +++ 2 files changed, 19

[PATCH v6 03/10] vhost-vdpa: protect concurrent access to vhost device iotlb

2021-03-31 Thread Xie Yongji
Use vhost_dev->mutex to protect vhost device iotlb from concurrent access. Fixes: 4c8cf318("vhost: introduce vDPA-based backend") Cc: sta...@vger.kernel.org Signed-off-by: Xie Yongji Acked-by: Jason Wang Reviewed-by: Stefano Garzarella --- drivers/vhost/vdpa.c | 6 +- 1 fi

[PATCH v6 08/10] vduse: Implement an MMU-based IOMMU driver

2021-03-31 Thread Xie Yongji
se its virtual address to access the dma buffer in kernel. And to avoid security issue, a bounce-buffering mechanism is introduced to prevent userspace accessing the original buffer directly. Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa_user/iova_domain.c

[PATCH v6 07/10] vdpa: Support transferring virtual addressing during DMA mapping

2021-03-31 Thread Xie Yongji
and offset will be also passed as an opaque pointer. Suggested-by: Jason Wang Signed-off-by: Xie Yongji --- drivers/vdpa/ifcvf/ifcvf_main.c | 2 +- drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +- drivers/vdpa/vdpa.c | 9 +++- drivers/vdpa/vdpa_sim/vdpa_sim.c | 2 +- drivers/v

[PATCH v6 09/10] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-03-31 Thread Xie Yongji
() to inject interrupt and use the eventfd mechanism to receive virtqueue kicks. Signed-off-by: Xie Yongji --- Documentation/userspace-api/ioctl/ioctl-number.rst |1 + drivers/vdpa/Kconfig | 10 + drivers/vdpa/Makefile |1 + drivers

[PATCH v6 10/10] Documentation: Add documentation for VDUSE

2021-03-31 Thread Xie Yongji
VDUSE (vDPA Device in Userspace) is a framework to support implementing software-emulated vDPA devices in userspace. This document is intended to clarify the VDUSE design and usage. Signed-off-by: Xie Yongji --- Documentation/userspace-api/index.rst | 1 + Documentation/userspace-api

[PATCH] vhost-vdpa: protect concurrent access to vhost device iotlb

2021-04-12 Thread Xie Yongji
Signed-off-by: Xie Yongji Acked-by: Jason Wang Reviewed-by: Stefano Garzarella --- drivers/vhost/vdpa.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index e0a27e336293..bfa4c6ef554e 100644 --- a/drivers/vhost/vdpa.c +++ b/

[PATCH v5 00/11] Introduce VDUSE - vDPA Device in Userspace

2021-03-14 Thread Xie Yongji
Add some documents - Based on the vdpa management tool - Introduce a workqueue for irq injection - Replace interval tree with array map to store the iova_map Xie Yongji (11): file: Export __receive_fd() to modules eventfd: Increase the recursion depth of eventfd_signal() vhost-vdpa:

[PATCH v5 01/11] file: Export __receive_fd() to modules

2021-03-14 Thread Xie Yongji
Export __receive_fd() so that some modules can use it to pass file descriptor between processes. Signed-off-by: Xie Yongji --- fs/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/file.c b/fs/file.c index dab120b71e44..a2e5bcae63ba 100644 --- a/fs/file.c +++ b/fs/file.c @@ -1107,6

[PATCH v5 02/11] eventfd: Increase the recursion depth of eventfd_signal()

2021-03-14 Thread Xie Yongji
signal [eventfd] --> vhost_poll_wakeup [vhost] --> vduse_vdpa_kick_vq [vduse] --> eventfd_signal[eventfd] Acked-by: Jason Wang Signed-off-by: Xie Yongji --- fs/eventfd.c| 2 +- include/linu

[PATCH v5 03/11] vhost-vdpa: protect concurrent access to vhost device iotlb

2021-03-14 Thread Xie Yongji
Use vhost_dev->mutex to protect vhost device iotlb from concurrent access. Fixes: 4c8cf318("vhost: introduce vDPA-based backend") Signed-off-by: Xie Yongji --- drivers/vhost/vdpa.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/vdpa.c b/

[PATCH v5 05/11] vdpa: Add an opaque pointer for vdpa_config_ops.dma_map()

2021-03-14 Thread Xie Yongji
Add an opaque pointer for DMA mapping. Suggested-by: Jason Wang Acked-by: Jason Wang Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 6 +++--- drivers/vhost/vdpa.c | 2 +- include/linux/vdpa.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions

[PATCH v5 04/11] vhost-iotlb: Add an opaque pointer for vhost IOTLB

2021-03-14 Thread Xie Yongji
Add an opaque pointer for vhost IOTLB. And introduce vhost_iotlb_add_range_ctx() to accept it. Suggested-by: Jason Wang Acked-by: Jason Wang Signed-off-by: Xie Yongji --- drivers/vhost/iotlb.c | 20 include/linux/vhost_iotlb.h | 3 +++ 2 files changed, 19

[PATCH v5 07/11] vdpa: Support transferring virtual addressing during DMA mapping

2021-03-14 Thread Xie Yongji
and offset will be also passed as an opaque pointer. Suggested-by: Jason Wang Signed-off-by: Xie Yongji --- drivers/vdpa/ifcvf/ifcvf_main.c | 2 +- drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +- drivers/vdpa/vdpa.c | 9 +++- drivers/vdpa/vdpa_sim/vdpa_sim.c | 2 +- drivers/v

[PATCH v5 08/11] vduse: Implement an MMU-based IOMMU driver

2021-03-14 Thread Xie Yongji
se its virtual address to access the dma buffer in kernel. And to avoid security issue, a bounce-buffering mechanism is introduced to prevent userspace accessing the original buffer directly. Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa_user/iova_domain.c

[PATCH v5 09/11] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-03-14 Thread Xie Yongji
ceive virtqueue kicks. Signed-off-by: Xie Yongji --- Documentation/userspace-api/ioctl/ioctl-number.rst |1 + drivers/vdpa/Kconfig | 10 + drivers/vdpa/Makefile |1 + drivers/vdpa/vdpa_user/Makefile|5 + drivers

[PATCH v5 10/11] vduse: Add config interrupt support

2021-03-14 Thread Xie Yongji
This patch introduces a new ioctl VDUSE_INJECT_CONFIG_IRQ to support injecting config interrupt. Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa_user/vduse_dev.c | 24 +++- include/uapi/linux/vduse.h | 3 +++ 2 files changed, 26 insertions(+), 1 deletion(-) diff

[PATCH v5 11/11] Documentation: Add documentation for VDUSE

2021-03-14 Thread Xie Yongji
VDUSE (vDPA Device in Userspace) is a framework to support implementing software-emulated vDPA devices in userspace. This document is intended to clarify the VDUSE design and usage. Signed-off-by: Xie Yongji --- Documentation/userspace-api/index.rst | 1 + Documentation/userspace-api

[PATCH v5 06/11] vdpa: factor out vhost_vdpa_pa_map()

2021-03-14 Thread Xie Yongji
The upcoming patch is going to support VA mapping. So let's factor out the logic of PA mapping firstly to make the code more readable. Suggested-by: Jason Wang Signed-off-by: Xie Yongji --- drivers/vhost/vdpa.c | 46 -- 1 file changed, 28 inser