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
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
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
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
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
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
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
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|
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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(
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
() 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
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
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:
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
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
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
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
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
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
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
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
() 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
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
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/
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:
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
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
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/
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
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
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
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
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
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
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
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
62 matches
Mail list logo