search for: read_list

Displaying 20 results from an estimated 51 matches for "read_list".

Did you mean: read_line
2016 Jun 22
0
[PATCH 3/3] vhost: device IOTLB API
...struct vhost_dev *dev, dev->log_ctx = NULL; dev->log_file = NULL; dev->umem = NULL; + dev->iotlb = NULL; dev->mm = NULL; spin_lock_init(&dev->work_lock); INIT_LIST_HEAD(&dev->work_list); + init_waitqueue_head(&dev->wait); + INIT_LIST_HEAD(&dev->read_list); + INIT_LIST_HEAD(&dev->pending_list); + spin_lock_init(&dev->iotlb_lock); dev->worker = NULL; for (i = 0; i < dev->nvqs; ++i) { @@ -563,6 +573,15 @@ void vhost_dev_stop(struct vhost_dev *dev) } EXPORT_SYMBOL_GPL(vhost_dev_stop); +static void vhost_umem_free(struct...
2019 Jul 23
1
[PATCH 2/6] vhost: validate MMU notifier registration
...ruct vhost_dev *dev, > dev->iov_limit = iov_limit; > dev->weight = weight; > dev->byte_weight = byte_weight; > + dev->has_notifier = false; > init_llist_head(&dev->work_list); > init_waitqueue_head(&dev->wait); > INIT_LIST_HEAD(&dev->read_list); > @@ -731,6 +732,7 @@ long vhost_dev_set_owner(struct vhost_dev *dev) > if (err) > goto err_mmu_notifier; > #endif > + dev->has_notifier = true; > > return 0; > I just noticed that set owner now fails if we get a signal. Userspace could retry in theory but...
2016 Jun 23
3
[PATCH V2 0/3] basic device IOTLB support for vhost_net
This patch tries to implement an device IOTLB for vhost. This could be used with for co-operation with userspace IOMMU implementation (qemu) for a secure DMA environment (DMAR) in guest. The idea is simple. When vhost meets an IOTLB miss, it will request the assistance of userspace to do the translation, this is done through: - when there's a IOTLB miss, it will notify userspace through
2016 Jun 23
3
[PATCH V2 0/3] basic device IOTLB support for vhost_net
This patch tries to implement an device IOTLB for vhost. This could be used with for co-operation with userspace IOMMU implementation (qemu) for a secure DMA environment (DMAR) in guest. The idea is simple. When vhost meets an IOTLB miss, it will request the assistance of userspace to do the translation, this is done through: - when there's a IOTLB miss, it will notify userspace through
2019 Jun 05
0
[vhost:linux-next 12/19] drivers/vhost/vhost.h:196:22: error: field 'mmu_notifier' has incomplete type
...tex mutex; 198 struct vhost_virtqueue **vqs; 199 int nvqs; 200 struct eventfd_ctx *log_ctx; 201 struct llist_head work_list; 202 struct task_struct *worker; 203 struct vhost_umem *umem; 204 struct vhost_umem *iotlb; 205 spinlock_t iotlb_lock; 206 struct list_head read_list; 207 struct list_head pending_list; 208 wait_queue_head_t wait; 209 int iov_limit; 210 int weight; 211 int byte_weight; 212 }; 213 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all...
2019 Jul 23
0
[PATCH 2/6] vhost: validate MMU notifier registration
...,6 +630,7 @@ void vhost_dev_init(struct vhost_dev *dev, dev->iov_limit = iov_limit; dev->weight = weight; dev->byte_weight = byte_weight; + dev->has_notifier = false; init_llist_head(&dev->work_list); init_waitqueue_head(&dev->wait); INIT_LIST_HEAD(&dev->read_list); @@ -731,6 +732,7 @@ long vhost_dev_set_owner(struct vhost_dev *dev) if (err) goto err_mmu_notifier; #endif + dev->has_notifier = true; return 0; @@ -960,7 +962,11 @@ void vhost_dev_cleanup(struct vhost_dev *dev) } if (dev->mm) { #if VHOST_ARCH_CAN_ACCEL_UACCESS - mmu_notif...
2019 Jun 06
2
[PATCH] vhost: Don't use defined in VHOST_ARCH_CAN_ACCEL_UACCESS definition
...host_dev *dev, vq->iotlb = NULL; vq->invalidate_count = 0; __vhost_vq_meta_reset(vq); -#if VHOST_ARCH_CAN_ACCEL_UACCESS +#ifdef VHOST_ARCH_CAN_ACCEL_UACCESS vhost_reset_vq_maps(vq); #endif } @@ -635,7 +635,7 @@ void vhost_dev_init(struct vhost_dev *dev, INIT_LIST_HEAD(&dev->read_list); INIT_LIST_HEAD(&dev->pending_list); spin_lock_init(&dev->iotlb_lock); -#if VHOST_ARCH_CAN_ACCEL_UACCESS +#ifdef VHOST_ARCH_CAN_ACCEL_UACCESS vhost_init_maps(dev); #endif @@ -726,7 +726,7 @@ long vhost_dev_set_owner(struct vhost_dev *dev) if (err) goto err_cgroup; -#i...
2019 Jun 06
2
[PATCH] vhost: Don't use defined in VHOST_ARCH_CAN_ACCEL_UACCESS definition
...host_dev *dev, vq->iotlb = NULL; vq->invalidate_count = 0; __vhost_vq_meta_reset(vq); -#if VHOST_ARCH_CAN_ACCEL_UACCESS +#ifdef VHOST_ARCH_CAN_ACCEL_UACCESS vhost_reset_vq_maps(vq); #endif } @@ -635,7 +635,7 @@ void vhost_dev_init(struct vhost_dev *dev, INIT_LIST_HEAD(&dev->read_list); INIT_LIST_HEAD(&dev->pending_list); spin_lock_init(&dev->iotlb_lock); -#if VHOST_ARCH_CAN_ACCEL_UACCESS +#ifdef VHOST_ARCH_CAN_ACCEL_UACCESS vhost_init_maps(dev); #endif @@ -726,7 +726,7 @@ long vhost_dev_set_owner(struct vhost_dev *dev) if (err) goto err_cgroup; -#i...
2016 May 24
6
[RFC PATCH V3 0/3] basic device IOTLB support
This patch tries to implement an device IOTLB for vhost. This could be used with for co-operation with userspace IOMMU implementation (qemu) for a secure DMA environment (DMAR) in guest. The idea is simple. When vhost meets an IOTLB miss, it will request the assistance of userspace to do the translation, this is done through: - when there's a IOTLB miss, it will notify userspace through
2016 May 24
6
[RFC PATCH V3 0/3] basic device IOTLB support
This patch tries to implement an device IOTLB for vhost. This could be used with for co-operation with userspace IOMMU implementation (qemu) for a secure DMA environment (DMAR) in guest. The idea is simple. When vhost meets an IOTLB miss, it will request the assistance of userspace to do the translation, this is done through: - when there's a IOTLB miss, it will notify userspace through
2016 Jun 22
4
[PATCH 0/3] basic device IOTLB support
This patch tries to implement an device IOTLB for vhost. This could be used with for co-operation with userspace IOMMU implementation (qemu) for a secure DMA environment (DMAR) in guest. The idea is simple. When vhost meets an IOTLB miss, it will request the assistance of userspace to do the translation, this is done through: - when there's a IOTLB miss, it will notify userspace through
2016 Jun 22
4
[PATCH 0/3] basic device IOTLB support
This patch tries to implement an device IOTLB for vhost. This could be used with for co-operation with userspace IOMMU implementation (qemu) for a secure DMA environment (DMAR) in guest. The idea is simple. When vhost meets an IOTLB miss, it will request the assistance of userspace to do the translation, this is done through: - when there's a IOTLB miss, it will notify userspace through
2017 Mar 07
2
[PATCH] vhost: Move vhost.h to allow vhost driver out-of-tree compilation
...ct mm_struct *mm; - struct mutex mutex; - struct vhost_virtqueue **vqs; - int nvqs; - struct file *log_file; - struct eventfd_ctx *log_ctx; - struct llist_head work_list; - struct task_struct *worker; - struct vhost_umem *umem; - struct vhost_umem *iotlb; - spinlock_t iotlb_lock; - struct list_head read_list; - struct list_head pending_list; - wait_queue_head_t wait; -}; - -void vhost_dev_init(struct vhost_dev *, struct vhost_virtqueue **vqs, int nvqs); -long vhost_dev_set_owner(struct vhost_dev *dev); -bool vhost_dev_has_owner(struct vhost_dev *dev); -long vhost_dev_check_owner(struct vhost_dev *); -s...
2017 Mar 07
2
[PATCH] vhost: Move vhost.h to allow vhost driver out-of-tree compilation
...ct mm_struct *mm; - struct mutex mutex; - struct vhost_virtqueue **vqs; - int nvqs; - struct file *log_file; - struct eventfd_ctx *log_ctx; - struct llist_head work_list; - struct task_struct *worker; - struct vhost_umem *umem; - struct vhost_umem *iotlb; - spinlock_t iotlb_lock; - struct list_head read_list; - struct list_head pending_list; - wait_queue_head_t wait; -}; - -void vhost_dev_init(struct vhost_dev *, struct vhost_virtqueue **vqs, int nvqs); -long vhost_dev_set_owner(struct vhost_dev *dev); -bool vhost_dev_has_owner(struct vhost_dev *dev); -long vhost_dev_check_owner(struct vhost_dev *); -s...
2018 Sep 09
0
[PATCH net-next v8 5/7] net: vhost: introduce bitmap for vhost_poll
...> > dev->mm = NULL; > > dev->worker = NULL; > > + bitmap_zero(dev->work_pending, VHOST_DEV_MAX_VQ); > > init_llist_head(&dev->work_list); > > init_waitqueue_head(&dev->wait); > > INIT_LIST_HEAD(&dev->read_list); > > @@ -445,7 +458,7 @@ void vhost_dev_init(struct vhost_dev *dev, > > vhost_vq_reset(dev, vq); > > if (vq->handle_kick) > > vhost_poll_init(&vq->poll, vq->handle_kick, > > -...
2019 Jul 23
10
[PATCH 0/6] Fixes for meta data acceleration
Hi all: This series try to fix several issues introduced by meta data accelreation series. Please review. Jason Wang (6): vhost: don't set uaddr for invalid address vhost: validate MMU notifier registration vhost: fix vhost map leak vhost: reset invalidate_count in vhost_set_vring_num_addr() vhost: mark dirty pages during map uninit vhost: don't do synchronize_rcu() in
2019 May 17
0
[PATCH V2 1/4] vhost: introduce vhost_exceeds_weight()
...oid vhost_dev_init(struct vhost_dev *dev, dev->mm = NULL; dev->worker = NULL; dev->iov_limit = iov_limit; + dev->weight = weight; + dev->byte_weight = byte_weight; init_llist_head(&dev->work_list); init_waitqueue_head(&dev->wait); INIT_LIST_HEAD(&dev->read_list); diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 9490e7d..27a78a9 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -171,10 +171,13 @@ struct vhost_dev { struct list_head pending_list; wait_queue_head_t wait; int iov_limit; + int weight; + int byte_weight; }...
2017 Mar 10
0
[PATCH] vhost: Move vhost.h to allow vhost driver out-of-tree compilation
...uct vhost_virtqueue **vqs; > - int nvqs; > - struct file *log_file; > - struct eventfd_ctx *log_ctx; > - struct llist_head work_list; > - struct task_struct *worker; > - struct vhost_umem *umem; > - struct vhost_umem *iotlb; > - spinlock_t iotlb_lock; > - struct list_head read_list; > - struct list_head pending_list; > - wait_queue_head_t wait; > -}; > - > -void vhost_dev_init(struct vhost_dev *, struct vhost_virtqueue **vqs, int nvqs); > -long vhost_dev_set_owner(struct vhost_dev *dev); > -bool vhost_dev_has_owner(struct vhost_dev *dev); > -long vhost...
2019 Jun 06
0
[PATCH] vhost: Don't use defined in VHOST_ARCH_CAN_ACCEL_UACCESS definition
...vq->invalidate_count = 0; > __vhost_vq_meta_reset(vq); > -#if VHOST_ARCH_CAN_ACCEL_UACCESS > +#ifdef VHOST_ARCH_CAN_ACCEL_UACCESS > vhost_reset_vq_maps(vq); > #endif > } > @@ -635,7 +635,7 @@ void vhost_dev_init(struct vhost_dev *dev, > INIT_LIST_HEAD(&dev->read_list); > INIT_LIST_HEAD(&dev->pending_list); > spin_lock_init(&dev->iotlb_lock); > -#if VHOST_ARCH_CAN_ACCEL_UACCESS > +#ifdef VHOST_ARCH_CAN_ACCEL_UACCESS > vhost_init_maps(dev); > #endif > > @@ -726,7 +726,7 @@ long vhost_dev_set_owner(struct vhost_dev *d...
2023 Mar 28
1
[PATCH v6 11/11] vhost: allow userspace to create workers
...vhost_dev *dev, dev->umem = NULL; dev->iotlb = NULL; dev->mm = NULL; - dev->worker = NULL; dev->iov_limit = iov_limit; dev->weight = weight; dev->byte_weight = byte_weight; @@ -499,7 +502,7 @@ void vhost_dev_init(struct vhost_dev *dev, INIT_LIST_HEAD(&dev->read_list); INIT_LIST_HEAD(&dev->pending_list); spin_lock_init(&dev->iotlb_lock); - + xa_init_flags(&dev->worker_xa, XA_FLAGS_ALLOC); for (i = 0; i < dev->nvqs; ++i) { vq = dev->vqs[i]; @@ -562,32 +565,67 @@ static void vhost_detach_mm(struct vhost_dev *dev) dev-&gt...