Commit 9e5eefba authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost

Pull virtio fixes from Michael Tsirkin:
 "Some minor fixes"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  vringh: fix copy direction of vringh_iov_push_kern()
  vsock/virtio: remove unused 'work' field from 'struct virtio_vsock_pkt'
  virtio_ring: fix stalls for packed rings
parents d6d5df1d b3683dee
...@@ -852,6 +852,12 @@ static inline int xfer_kern(void *src, void *dst, size_t len) ...@@ -852,6 +852,12 @@ static inline int xfer_kern(void *src, void *dst, size_t len)
return 0; return 0;
} }
static inline int kern_xfer(void *dst, void *src, size_t len)
{
memcpy(dst, src, len);
return 0;
}
/** /**
* vringh_init_kern - initialize a vringh for a kernelspace vring. * vringh_init_kern - initialize a vringh for a kernelspace vring.
* @vrh: the vringh to initialize. * @vrh: the vringh to initialize.
...@@ -958,7 +964,7 @@ EXPORT_SYMBOL(vringh_iov_pull_kern); ...@@ -958,7 +964,7 @@ EXPORT_SYMBOL(vringh_iov_pull_kern);
ssize_t vringh_iov_push_kern(struct vringh_kiov *wiov, ssize_t vringh_iov_push_kern(struct vringh_kiov *wiov,
const void *src, size_t len) const void *src, size_t len)
{ {
return vringh_iov_xfer(wiov, (void *)src, len, xfer_kern); return vringh_iov_xfer(wiov, (void *)src, len, kern_xfer);
} }
EXPORT_SYMBOL(vringh_iov_push_kern); EXPORT_SYMBOL(vringh_iov_push_kern);
......
...@@ -1499,9 +1499,6 @@ static bool virtqueue_enable_cb_delayed_packed(struct virtqueue *_vq) ...@@ -1499,9 +1499,6 @@ static bool virtqueue_enable_cb_delayed_packed(struct virtqueue *_vq)
* counter first before updating event flags. * counter first before updating event flags.
*/ */
virtio_wmb(vq->weak_barriers); virtio_wmb(vq->weak_barriers);
} else {
used_idx = vq->last_used_idx;
wrap_counter = vq->packed.used_wrap_counter;
} }
if (vq->packed.event_flags_shadow == VRING_PACKED_EVENT_FLAG_DISABLE) { if (vq->packed.event_flags_shadow == VRING_PACKED_EVENT_FLAG_DISABLE) {
...@@ -1518,7 +1515,9 @@ static bool virtqueue_enable_cb_delayed_packed(struct virtqueue *_vq) ...@@ -1518,7 +1515,9 @@ static bool virtqueue_enable_cb_delayed_packed(struct virtqueue *_vq)
*/ */
virtio_mb(vq->weak_barriers); virtio_mb(vq->weak_barriers);
if (is_used_desc_packed(vq, used_idx, wrap_counter)) { if (is_used_desc_packed(vq,
vq->last_used_idx,
vq->packed.used_wrap_counter)) {
END_USE(vq); END_USE(vq);
return false; return false;
} }
......
...@@ -48,7 +48,6 @@ struct virtio_vsock_sock { ...@@ -48,7 +48,6 @@ struct virtio_vsock_sock {
struct virtio_vsock_pkt { struct virtio_vsock_pkt {
struct virtio_vsock_hdr hdr; struct virtio_vsock_hdr hdr;
struct work_struct work;
struct list_head list; struct list_head list;
/* socket refcnt not held, only use for cancellation */ /* socket refcnt not held, only use for cancellation */
struct vsock_sock *vsk; struct vsock_sock *vsk;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment