Displaying 20 results from an estimated 25 matches for "__poll_t".
2018 Sep 09
0
[PATCH net-next v8 5/7] net: vhost: introduce bitmap for vhost_poll
...st/vhost.c
> > +++ b/drivers/vhost/vhost.c
> > @@ -186,7 +186,7 @@ void vhost_work_init(struct vhost_work *work, vhost_work_fn_t fn)
> >
> > /* Init poll structure */
> > void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn,
> > - __poll_t mask, struct vhost_dev *dev)
> > + __u8 poll_id, __poll_t mask, struct vhost_dev *dev)
> > {
> > init_waitqueue_func_entry(&poll->wait, vhost_poll_wakeup);
> > init_poll_funcptr(&poll->table, vhost_poll_func);
> > @@ -194,6...
2019 Dec 05
0
kernel BUG at fs/pipe.c:LINE!
Eric Biggers <ebiggers at kernel.org> wrote:
> static __poll_t
> pipe_poll(struct file *filp, poll_table *wait)
> {
> __poll_t mask;
> struct pipe_inode_info *pipe = filp->private_data;
> unsigned int head = READ_ONCE(pipe->head);
> unsigned int tail = READ_ONCE(pipe->tail);
>
> poll_wai...
2023 Mar 28
1
[PATCH v6 02/11] vhost, vhost-net: add helper to check if vq has work
...-45,7 +45,6 @@ struct vhost_poll {
void vhost_work_init(struct vhost_work *work, vhost_work_fn_t fn);
void vhost_work_queue(struct vhost_dev *dev, struct vhost_work *work);
-bool vhost_has_work(struct vhost_dev *dev);
void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn,
__poll_t mask, struct vhost_dev *dev);
@@ -195,6 +194,7 @@ int vhost_get_vq_desc(struct vhost_virtqueue *,
struct vhost_log *log, unsigned int *log_num);
void vhost_discard_vq_desc(struct vhost_virtqueue *, int n);
+bool vhost_vq_has_work(struct vhost_virtqueue *vq);
bool vhost_vq_is_setup(stru...
2023 Mar 28
12
[PATCH v6 00/11] vhost: multiple worker support
The following patches were built over linux-next which contains various
vhost patches in mst's tree and the vhost_task patchset in Christian
Brauner's tree:
git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git
kernel.user_worker branch:
https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git/log/?h=kernel.user_worker
The latter patchset handles the review comment
2020 May 26
0
[PATCH] vdpa: bypass waking up vhost_woker for vdpa vq kick
...90 void vhost_vdpa_poll_stop(struct vhost_virtqueue *vq)
291 {
292 vhost_poll_stop(&vq->poll);
293 }
294
> 295 int vhost_vdpa_poll_start(struct vhost_virtqueue *vq)
296 {
297 struct vhost_poll *poll = &vq->poll;
298 struct file *file = vq->kick;
299 __poll_t mask;
300
301
302 if (poll->wqh)
303 return 0;
304
305 mask = vfs_poll(file, &poll->table);
306 if (mask)
307 vq->handle_kick(&vq->poll.work);
308 if (mask & EPOLLERR) {
309 vhost_poll_stop(poll);
310 return -EINVAL;
311 }...
2020 May 28
0
[PATCH] vdpa: bypass waking up vhost_woker for vdpa vq kick
...> }
> +void vhost_vdpa_poll_stop(struct vhost_virtqueue *vq)
> +{
> + vhost_poll_stop(&vq->poll);
> +}
> +
> +int vhost_vdpa_poll_start(struct vhost_virtqueue *vq)
> +{
> + struct vhost_poll *poll = &vq->poll;
> + struct file *file = vq->kick;
> + __poll_t mask;
> +
> +
> + if (poll->wqh)
> + return 0;
> +
> + mask = vfs_poll(file, &poll->table);
> + if (mask)
> + vq->handle_kick(&vq->poll.work);
> + if (mask & EPOLLERR) {
> + vhost_poll_stop(poll);
> + return -EINVAL;
> + }
> +
>...
2019 Sep 27
0
[RFC PATCH 04/13] vsock: add 'transport' member in the struct vsock_sock
...tream_has_data(vsk);
}
EXPORT_SYMBOL_GPL(vsock_stream_has_data);
s64 vsock_stream_has_space(struct vsock_sock *vsk)
{
- return transport->stream_has_space(vsk);
+ return vsk->transport->stream_has_space(vsk);
}
EXPORT_SYMBOL_GPL(vsock_stream_has_space);
@@ -861,6 +864,7 @@ static __poll_t vsock_poll(struct file *file, struct socket *sock,
mask |= EPOLLOUT | EPOLLWRNORM | EPOLLWRBAND;
} else if (sock->type == SOCK_STREAM) {
+ const struct vsock_transport *transport = vsk->transport;
lock_sock(sk);
/* Listening sockets that have connections in their accept
@@ -9...
2019 Oct 23
0
[PATCH net-next 04/14] vsock: add 'transport' member in the struct vsock_sock
...tream_has_data(vsk);
}
EXPORT_SYMBOL_GPL(vsock_stream_has_data);
s64 vsock_stream_has_space(struct vsock_sock *vsk)
{
- return transport->stream_has_space(vsk);
+ return vsk->transport->stream_has_space(vsk);
}
EXPORT_SYMBOL_GPL(vsock_stream_has_space);
@@ -869,6 +872,7 @@ static __poll_t vsock_poll(struct file *file, struct socket *sock,
mask |= EPOLLOUT | EPOLLWRNORM | EPOLLWRBAND;
} else if (sock->type == SOCK_STREAM) {
+ const struct vsock_transport *transport = vsk->transport;
lock_sock(sk);
/* Listening sockets that have connections in their accept
@@ -9...
2019 Apr 16
4
[PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl
...file *file, unsigned int cmd,
return ret;
}
-#ifdef CONFIG_COMPAT
-static long usbdev_compat_ioctl(struct file *file, unsigned int cmd,
- unsigned long arg)
-{
- int ret;
-
- ret = usbdev_do_ioctl(file, cmd, compat_ptr(arg));
-
- return ret;
-}
-#endif
-
/* No kernel lock - fine */
static __poll_t usbdev_poll(struct file *file,
struct poll_table_struct *wait)
@@ -2603,9 +2591,7 @@ const struct file_operations usbdev_file_operations = {
.read = usbdev_read,
.poll = usbdev_poll,
.unlocked_ioctl = usbdev_ioctl,
-#ifdef CONFIG_COMPAT
- .compat_ioctl = usbdev_compat_ioctl,
-#en...
2019 Apr 16
4
[PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl
...file *file, unsigned int cmd,
return ret;
}
-#ifdef CONFIG_COMPAT
-static long usbdev_compat_ioctl(struct file *file, unsigned int cmd,
- unsigned long arg)
-{
- int ret;
-
- ret = usbdev_do_ioctl(file, cmd, compat_ptr(arg));
-
- return ret;
-}
-#endif
-
/* No kernel lock - fine */
static __poll_t usbdev_poll(struct file *file,
struct poll_table_struct *wait)
@@ -2603,9 +2591,7 @@ const struct file_operations usbdev_file_operations = {
.read = usbdev_read,
.poll = usbdev_poll,
.unlocked_ioctl = usbdev_ioctl,
-#ifdef CONFIG_COMPAT
- .compat_ioctl = usbdev_compat_ioctl,
-#en...
2020 Jul 01
5
[PATCH 0/5]
Hi all:
This series tries to support batched IOTLB updating vhost-vdpa.
Currently vhost-vdpa accepts userspace mapping via IOTLB API, and it
can only forward one mapping to IOMMU or device through IOMMU API or
dma_map(). Though set_map() is designed to have the capability to pass
an rbtree based mapping to vDPA device, it's still be called at least
once for each VHOST_IOTLB_UPDATE or
2019 Apr 19
0
[PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl
...COMPAT
> -static long usbdev_compat_ioctl(struct file *file, unsigned int cmd,
> - unsigned long arg)
> -{
> - int ret;
> -
> - ret = usbdev_do_ioctl(file, cmd, compat_ptr(arg));
> -
> - return ret;
> -}
> -#endif
> -
> /* No kernel lock - fine */
> static __poll_t usbdev_poll(struct file *file,
> struct poll_table_struct *wait)
> @@ -2603,9 +2591,7 @@ const struct file_operations usbdev_file_operations = {
> .read = usbdev_read,
> .poll = usbdev_poll,
> .unlocked_ioctl = usbdev_ioctl,
> -#ifdef CONFIG_COMPAT
> - .compat_...
2018 Sep 12
1
[PATCH v2 02/17] compat_ioctl: move drivers to generic_compat_ioctl_ptrarg
...file *file, unsigned int cmd,
return ret;
}
-#ifdef CONFIG_COMPAT
-static long usbdev_compat_ioctl(struct file *file, unsigned int cmd,
- unsigned long arg)
-{
- int ret;
-
- ret = usbdev_do_ioctl(file, cmd, compat_ptr(arg));
-
- return ret;
-}
-#endif
-
/* No kernel lock - fine */
static __poll_t usbdev_poll(struct file *file,
struct poll_table_struct *wait)
@@ -2588,9 +2576,7 @@ const struct file_operations usbdev_file_operations = {
.read = usbdev_read,
.poll = usbdev_poll,
.unlocked_ioctl = usbdev_ioctl,
-#ifdef CONFIG_COMPAT
- .compat_ioctl = usbdev_compat_ioctl,
-#en...
2020 May 16
0
[PATCH RFC] vhost: add an SOF Audio DSP driver
...ock);
+}
+
+static ssize_t vhost_dsp_chr_write_iter(struct kiocb *iocb,
+ struct iov_iter *from)
+{
+ struct file *filp = iocb->ki_filp;
+ struct vhost_dsp *dsp = filp->private_data;
+ struct vhost_dev *dev = &dsp->vrdev.dev;
+
+ return vhost_chr_write_iter(dev, from);
+}
+
+static __poll_t vhost_dsp_chr_poll(struct file *filp, poll_table *wait)
+{
+ struct vhost_dsp *dsp = filp->private_data;
+ struct vhost_dev *dev = &dsp->vrdev.dev;
+
+ return vhost_chr_poll(filp, dev, wait);
+}
+
+static ssize_t vhost_dsp_data_read(struct vhost_rpmsg *vr,
+ struct vhost_rpmsg_iter...
2020 Jun 18
6
[PATCH RFC 0/5] support batched IOTLB updating in vhost-vdpa
Hi all:
This series tries to support batched IOTLB updating vhost-vdpa.
Currently vhost-vdpa accepts userspace mapping via IOTLB API, and it
can only forward one mapping to IOMMU or device through IOMMU API or
dma_map(). Though set_map() is deisgend to have the capability to pass
an rbtree based mapping to vDPA device, it's still be called at least
once for each VHOST_IOTLB_UPDATE or
2019 Jul 30
2
[PATCH v5 12/29] compat_ioctl: move drivers to compat_ptr_ioctl
...file *file, unsigned int cmd,
return ret;
}
-#ifdef CONFIG_COMPAT
-static long usbdev_compat_ioctl(struct file *file, unsigned int cmd,
- unsigned long arg)
-{
- int ret;
-
- ret = usbdev_do_ioctl(file, cmd, compat_ptr(arg));
-
- return ret;
-}
-#endif
-
/* No kernel lock - fine */
static __poll_t usbdev_poll(struct file *file,
struct poll_table_struct *wait)
@@ -2639,9 +2627,7 @@ const struct file_operations usbdev_file_operations = {
.read = usbdev_read,
.poll = usbdev_poll,
.unlocked_ioctl = usbdev_ioctl,
-#ifdef CONFIG_COMPAT
- .compat_ioctl = usbdev_compat_ioctl,
-#en...
2019 Oct 23
0
[PATCH net-next 11/14] vsock: add multi-transports support
...k_sock *vsk = vsock_sk(sk);
- vsk->transport->destruct(vsk);
+ if (vsk->transport)
+ vsk->transport->destruct(vsk);
/* When clearing these addresses, there's no need to set the family and
* possibly register the address family with the kernel.
@@ -896,7 +955,7 @@ static __poll_t vsock_poll(struct file *file, struct socket *sock,
mask |= EPOLLIN | EPOLLRDNORM;
/* If there is something in the queue then we can read. */
- if (transport->stream_is_active(vsk) &&
+ if (transport && transport->stream_is_active(vsk) &&
!(sk->sk_s...
2019 Sep 27
0
[RFC PATCH 10/13] vsock: add multi-transports support
...k_sock *vsk = vsock_sk(sk);
- vsk->transport->destruct(vsk);
+ if (vsk->transport)
+ vsk->transport->destruct(vsk);
/* When clearing these addresses, there's no need to set the family and
* possibly register the address family with the kernel.
@@ -882,7 +934,7 @@ static __poll_t vsock_poll(struct file *file, struct socket *sock,
mask |= EPOLLIN | EPOLLRDNORM;
/* If there is something in the queue then we can read. */
- if (transport->stream_is_active(vsk) &&
+ if (transport && transport->stream_is_active(vsk) &&
!(sk->sk_s...
2019 Nov 14
15
[PATCH net-next v2 00/15] vsock: add multi-transports support
Most of the patches are reviewed by Dexuan, Stefan, and Jorgen.
The following patches need reviews:
- [11/15] vsock: add multi-transports support
- [12/15] vsock/vmci: register vmci_transport only when VMCI guest/host
are active
- [15/15] vhost/vsock: refuse CID assigned to the guest->host transport
RFC: https://patchwork.ozlabs.org/cover/1168442/
v1:
2019 Sep 27
29
[RFC PATCH 00/13] vsock: add multi-transports support
Hi all,
this series adds the multi-transports support to vsock, following
this proposal:
https://www.spinics.net/lists/netdev/msg575792.html
With the multi-transports support, we can use vsock with nested VMs
(using also different hypervisors) loading both guest->host and
host->guest transports at the same time.
Before this series, vmci-transport supported this behavior but only
using