search for: vhost_vdpa_get_featur

Displaying 12 results from an estimated 12 matches for "vhost_vdpa_get_featur".

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-by: Stefano Garzarella <sgarzare at redha...
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-by: Stefano Garzarella <sgarzare at redha...
2020 Jul 20
1
[PATCH] vhost: vdpa: remove per device feature whitelist
..._ida); static dev_t vhost_vdpa_major; -static const u64 vhost_vdpa_features[] = { - [VIRTIO_ID_NET] = VHOST_VDPA_NET_FEATURES, -}; - static void handle_vq_kick(struct vhost_work *work) { struct vhost_virtqueue *vq = container_of(work, struct vhost_virtqueue, @@ -255,7 +222,6 @@ static long vhost_vdpa_get_features(struct vhost_vdpa *v, u64 __user *featurep) u64 features; features = ops->get_features(vdpa); - features &= vhost_vdpa_features[v->virtio_id]; if (copy_to_user(featurep, &features, sizeof(features))) return -EFAULT; @@ -279,9 +245,6 @@ static long vhost_vdpa_set_feature...
2023 Jun 06
2
[PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature
...ano 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. > >> > > > > > >> > &g...
2023 Jun 05
1
[PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature
...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. > > > > > > > > > > &g...
2023 Sep 09
0
[PATCH RFC v2 2/3] vhost-vdpa: introduce descriptor group backend feature
...ost_vdpa_can_resume(const struct vhost_vdpa *v) return ops->resume; } +static bool vhost_vdpa_has_desc_group(const struct vhost_vdpa *v) +{ + struct vdpa_device *vdpa = v->vdpa; + const struct vdpa_config_ops *ops = vdpa->config; + + return ops->get_vq_desc_group; +} + static long vhost_vdpa_get_features(struct vhost_vdpa *v, u64 __user *featurep) { struct vdpa_device *vdpa = v->vdpa; @@ -679,6 +687,7 @@ static long vhost_vdpa_unlocked_ioctl(struct file *filep, if (copy_from_user(&features, featurep, sizeof(features))) return -EFAULT; if (features & ~(VHOST_VDPA_BACKEND_FE...
2020 Feb 05
0
[PATCH] vhost: introduce vDPA based backend
...opy_from_user(buf, c->buf, config.len)) { > > + kvfree(buf); > > + return -EFAULT; > > + } > > + > > + ops->set_config(vdpa, config.off, buf, config.len); > > + > > + kvfree(buf); > > + return 0; > > +} > > + > > +static long vhost_vdpa_get_features(struct vhost_vdpa *v, u64 __user *featurep) > > +{ > > + struct vdpa_device *vdpa = v->vdpa; > > + const struct vdpa_config_ops *ops = vdpa->config; > > + u64 features; > > + > > + features = ops->get_features(vdpa); > > + features &= vhost_v...
2020 Feb 04
10
[PATCH] vhost: introduce vDPA based backend
...+ if (!buf) > + return -ENOMEM; > + > + if (copy_from_user(buf, c->buf, config.len)) { > + kvfree(buf); > + return -EFAULT; > + } > + > + ops->set_config(vdpa, config.off, buf, config.len); > + > + kvfree(buf); > + return 0; > +} > + > +static long vhost_vdpa_get_features(struct vhost_vdpa *v, u64 __user *featurep) > +{ > + struct vdpa_device *vdpa = v->vdpa; > + const struct vdpa_config_ops *ops = vdpa->config; > + u64 features; > + > + features = ops->get_features(vdpa); > + features &= vhost_vdpa_features[v->virtio_id]; >...
2020 Feb 04
10
[PATCH] vhost: introduce vDPA based backend
...+ if (!buf) > + return -ENOMEM; > + > + if (copy_from_user(buf, c->buf, config.len)) { > + kvfree(buf); > + return -EFAULT; > + } > + > + ops->set_config(vdpa, config.off, buf, config.len); > + > + kvfree(buf); > + return 0; > +} > + > +static long vhost_vdpa_get_features(struct vhost_vdpa *v, u64 __user *featurep) > +{ > + struct vdpa_device *vdpa = v->vdpa; > + const struct vdpa_config_ops *ops = vdpa->config; > + u64 features; > + > + features = ops->get_features(vdpa); > + features &= vhost_vdpa_features[v->virtio_id]; >...
2023 Sep 09
4
[PATCH RFC v2 0/3] vdpa: dedicated descriptor table group
Following patchset introduces dedicated group for descriptor table to reduce live migration downtime when passthrough VQ is being switched to shadow VQ. This RFC v2 is sent to incorporate the early feedback from reviewers on the uAPI and driver API part of changes, the associated driver patch set consuming ths API will come around soon along with formal submission of this series. Some initial
2023 Sep 09
4
[PATCH RFC v2 0/4] vdpa: decouple reset of iotlb mapping from device reset
In order to reduce needlessly high setup and teardown cost of iotlb mapping during live migration, it's crucial to decouple the vhost-vdpa iotlb abstraction from the virtio device life cycle, i.e. iotlb mappings should be left intact across virtio device reset [1]. For it to work, the on-chip IOMMU parent device should implement a separate .reset_map() operation callback to restore 1:1 DMA
2023 Sep 09
4
[PATCH RFC v3 0/4] vdpa: decouple reset of iotlb mapping from device reset
In order to reduce needlessly high setup and teardown cost of iotlb mapping during live migration, it's crucial to decouple the vhost-vdpa iotlb abstraction from the virtio device life cycle, i.e. iotlb mappings should be left intact across virtio device reset [1]. For it to work, the on-chip IOMMU parent device should implement a separate .reset_map() operation callback to restore 1:1 DMA