search for: virtio_f_ring_pack

Displaying 20 results from an estimated 161 matches for "virtio_f_ring_pack".

Did you mean: virtio_f_ring_packed
2018 Oct 12
2
[PATCH net-next V2 6/8] vhost: packed ring support
...son Wang wrote: [...] > @@ -1367,10 +1397,48 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg > vq->last_avail_idx = s.num; > /* Forget the cached index value. */ > vq->avail_idx = vq->last_avail_idx; > + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) { > + vq->last_avail_wrap_counter = wrap_counter; > + vq->avail_wrap_counter = vq->last_avail_wrap_counter; > + } > break; > case VHOST_GET_VRING_BASE: > s.index = idx; > s.num = vq->last_avail_idx; > + if (vhost_has_feature(vq, VIRTIO_F_RING...
2018 Oct 12
2
[PATCH net-next V2 6/8] vhost: packed ring support
...son Wang wrote: [...] > @@ -1367,10 +1397,48 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg > vq->last_avail_idx = s.num; > /* Forget the cached index value. */ > vq->avail_idx = vq->last_avail_idx; > + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) { > + vq->last_avail_wrap_counter = wrap_counter; > + vq->avail_wrap_counter = vq->last_avail_wrap_counter; > + } > break; > case VHOST_GET_VRING_BASE: > s.index = idx; > s.num = vq->last_avail_idx; > + if (vhost_has_feature(vq, VIRTIO_F_RING...
2018 Oct 15
2
[PATCH net-next V2 6/8] vhost: packed ring support
...,10 +1397,48 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg >>> vq->last_avail_idx = s.num; >>> /* Forget the cached index value. */ >>> vq->avail_idx = vq->last_avail_idx; >>> + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) { >>> + vq->last_avail_wrap_counter = wrap_counter; >>> + vq->avail_wrap_counter = vq->last_avail_wrap_counter; >>> + } >>> break; >>> case VHOST_GET_VRING_BASE: >>> s.index = idx; >>> s.num = vq->las...
2018 Oct 15
2
[PATCH net-next V2 6/8] vhost: packed ring support
...,10 +1397,48 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg >>> vq->last_avail_idx = s.num; >>> /* Forget the cached index value. */ >>> vq->avail_idx = vq->last_avail_idx; >>> + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) { >>> + vq->last_avail_wrap_counter = wrap_counter; >>> + vq->avail_wrap_counter = vq->last_avail_wrap_counter; >>> + } >>> break; >>> case VHOST_GET_VRING_BASE: >>> s.index = idx; >>> s.num = vq->las...
2023 Jun 05
2
[PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature
vhost-vdpa IOCTLs (eg. VHOST_GET_VRING_BASE, VHOST_SET_VRING_BASE) don't support packed virtqueue well yet, so let's filter the VIRTIO_F_RING_PACKED feature for now in vhost_vdpa_get_features(). This way, even if the device supports it, we don't risk it being negotiated, then the VMM is unable to set the vring state properly. Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend") Cc: stable at vger.kernel.org Signed-off-b...
2023 Jun 05
2
[PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature
vhost-vdpa IOCTLs (eg. VHOST_GET_VRING_BASE, VHOST_SET_VRING_BASE) don't support packed virtqueue well yet, so let's filter the VIRTIO_F_RING_PACKED feature for now in vhost_vdpa_get_features(). This way, even if the device supports it, we don't risk it being negotiated, then the VMM is unable to set the vring state properly. Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend") Cc: stable at vger.kernel.org Signed-off-b...
2018 Oct 15
1
[PATCH net-next V2 6/8] vhost: packed ring support
...ctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg >>>>> vq->last_avail_idx = s.num; >>>>> /* Forget the cached index value. */ >>>>> vq->avail_idx = vq->last_avail_idx; >>>>> + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) { >>>>> + vq->last_avail_wrap_counter = wrap_counter; >>>>> + vq->avail_wrap_counter = vq->last_avail_wrap_counter; >>>>> + } >>>>> break; >>>>> case VHOST_GET_VRING_BASE: >>>>>...
2018 May 16
2
[RFC v4 5/5] virtio_ring: enable packed ring
...g.c > index de3839f3621a..b158692263b0 100644 > --- a/drivers/virtio/virtio_ring.c > +++ b/drivers/virtio/virtio_ring.c > @@ -1940,6 +1940,8 @@ void vring_transport_features(struct virtio_device *vdev) > break; > case VIRTIO_F_IOMMU_PLATFORM: > break; > + case VIRTIO_F_RING_PACKED: > + break; Why not just add this *case* under the previous *case*? > default: > /* We don't understand this bit. */ > __virtio_clear_bit(vdev, i); MBR, Sergei
2018 May 16
1
[RFC v4 5/5] virtio_ring: enable packed ring
...;> --- a/drivers/virtio/virtio_ring.c >>> +++ b/drivers/virtio/virtio_ring.c >>> @@ -1940,6 +1940,8 @@ void vring_transport_features(struct virtio_device *vdev) >>> break; >>> case VIRTIO_F_IOMMU_PLATFORM: >>> break; >>> + case VIRTIO_F_RING_PACKED: >>> + break; >> >> Why not just add this *case* under the previous *case*? > > Do you mean fallthrough? Something like: > > case VIRTIO_F_IOMMU_PLATFORM: > case VIRTIO_F_RING_PACKED: > break; Yes, exactly. :-) > Best regards, > Tiwe...
2018 Oct 12
0
[PATCH net-next V2 6/8] vhost: packed ring support
...; > @@ -1367,10 +1397,48 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg > > vq->last_avail_idx = s.num; > > /* Forget the cached index value. */ > > vq->avail_idx = vq->last_avail_idx; > > + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) { > > + vq->last_avail_wrap_counter = wrap_counter; > > + vq->avail_wrap_counter = vq->last_avail_wrap_counter; > > + } > > break; > > case VHOST_GET_VRING_BASE: > > s.index = idx; > > s.num = vq->last_avail_idx; > > +...
2018 Oct 15
0
[PATCH net-next V2 6/8] vhost: packed ring support
...ring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg > > > > vq->last_avail_idx = s.num; > > > > /* Forget the cached index value. */ > > > > vq->avail_idx = vq->last_avail_idx; > > > > + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) { > > > > + vq->last_avail_wrap_counter = wrap_counter; > > > > + vq->avail_wrap_counter = vq->last_avail_wrap_counter; > > > > + } > > > > break; > > > > case VHOST_GET_VRING_BASE: > > > > s.index...
2018 May 16
2
[RFC v4 5/5] virtio_ring: enable packed ring
...g.c > index de3839f3621a..b158692263b0 100644 > --- a/drivers/virtio/virtio_ring.c > +++ b/drivers/virtio/virtio_ring.c > @@ -1940,6 +1940,8 @@ void vring_transport_features(struct virtio_device *vdev) > break; > case VIRTIO_F_IOMMU_PLATFORM: > break; > + case VIRTIO_F_RING_PACKED: > + break; Why not just add this *case* under the previous *case*? > default: > /* We don't understand this bit. */ > __virtio_clear_bit(vdev, i); MBR, Sergei
2018 May 22
2
[RFC V4 PATCH 7/8] vhost: packed ring support
...ex 8304c30..f2a0f5b 100644 > --- a/drivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -1358,6 +1382,8 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg > break; > } > vq->last_avail_idx = s.num; > + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) > + vq->avail_wrap_counter = s.num >> 31; > /* Forget the cached index value. */ > vq->avail_idx = vq->last_avail_idx; > break; > @@ -1366,6 +1392,8 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg > s.num = vq-&g...
2018 May 22
2
[RFC V4 PATCH 7/8] vhost: packed ring support
...ex 8304c30..f2a0f5b 100644 > --- a/drivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -1358,6 +1382,8 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg > break; > } > vq->last_avail_idx = s.num; > + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) > + vq->avail_wrap_counter = s.num >> 31; > /* Forget the cached index value. */ > vq->avail_idx = vq->last_avail_idx; > break; > @@ -1366,6 +1392,8 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg > s.num = vq-&g...
2023 Jun 05
1
[PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature
...un 05, 2023 at 01:06:44PM +0200, Stefano Garzarella wrote: > > > > > > > vhost-vdpa IOCTLs (eg. VHOST_GET_VRING_BASE, VHOST_SET_VRING_BASE) > > > > > > > don't support packed virtqueue well yet, so let's filter the > > > > > > > VIRTIO_F_RING_PACKED feature for now in vhost_vdpa_get_features(). > > > > > > > > > > > > > > This way, even if the device supports it, we don't risk it being > > > > > > > negotiated, then the VMM is unable to set the vring state properly. > >...
2018 Jul 16
0
[PATCH net-next V2 6/8] vhost: packed ring support
...tqueue *vq, unsigned int num, sizeof *used + num * sizeof *used->ring + s); } +static int vq_access_ok(struct vhost_virtqueue *vq, unsigned int num, + struct vring_desc __user *desc, + struct vring_avail __user *avail, + struct vring_used __user *used) +{ + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) + return vq_access_ok_packed(vq, num, desc, avail, used); + else + return vq_access_ok_split(vq, num, desc, avail, used); +} + static void vhost_vq_meta_update(struct vhost_virtqueue *vq, const struct vhost_umem_node *node, int type) @@ -1318,6 +1343,7 @@ long vhost_vring_ioctl(s...
2018 May 16
0
[RFC V4 PATCH 7/8] vhost: packed ring support
...+++ b/drivers/vhost/net.c @@ -71,7 +71,8 @@ enum { VHOST_NET_FEATURES = VHOST_FEATURES | (1ULL << VHOST_NET_F_VIRTIO_NET_HDR) | (1ULL << VIRTIO_NET_F_MRG_RXBUF) | - (1ULL << VIRTIO_F_IOMMU_PLATFORM) + (1ULL << VIRTIO_F_IOMMU_PLATFORM) | + (1ULL << VIRTIO_F_RING_PACKED) }; enum { diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 8304c30..f2a0f5b 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -323,6 +323,8 @@ static void vhost_vq_reset(struct vhost_dev *dev, vhost_reset_is_le(vq); vhost_disable_cross_endian(vq); vq-&gt...
2019 May 03
1
[PATCH 03/10] virtio/s390: enable packed ring
On Fri, 26 Apr 2019 20:32:38 +0200 Halil Pasic <pasic at linux.ibm.com> wrote: > Nothing precludes to accepting VIRTIO_F_RING_PACKED any more. "precludes us from accepting" > > Signed-off-by: Halil Pasic <pasic at linux.ibm.com> > --- > drivers/s390/virtio/virtio_ccw.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/s390/virtio/virtio_ccw.c b/drivers...
2023 Jun 06
2
[PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature
..., Jun 05, 2023 at 01:06:44PM +0200, Stefano Garzarella wrote: > >> > > > > vhost-vdpa IOCTLs (eg. VHOST_GET_VRING_BASE, VHOST_SET_VRING_BASE) > >> > > > > don't support packed virtqueue well yet, so let's filter the > >> > > > > VIRTIO_F_RING_PACKED feature for now in vhost_vdpa_get_features(). > >> > > > > > >> > > > > This way, even if the device supports it, we don't risk it being > >> > > > > negotiated, then the VMM is unable to set the vring state properly. > >&gt...
2018 Feb 14
0
[PATCH RFC 2/2] vhost: packed ring support
...+++ b/drivers/vhost/net.c @@ -67,7 +67,8 @@ enum { VHOST_NET_FEATURES = VHOST_FEATURES | (1ULL << VHOST_NET_F_VIRTIO_NET_HDR) | (1ULL << VIRTIO_NET_F_MRG_RXBUF) | - (1ULL << VIRTIO_F_IOMMU_PLATFORM) + (1ULL << VIRTIO_F_IOMMU_PLATFORM) | + (1ULL << VIRTIO_F_RING_PACKED) }; enum { @@ -473,6 +474,7 @@ static void handle_tx(struct vhost_net *net) struct socket *sock; struct vhost_net_ubuf_ref *uninitialized_var(ubufs); bool zcopy, zcopy_used; + struct vring_used_elem used; mutex_lock(&vq->mutex); sock = vq->private_data; @@ -494,6 +496,8...