search for: set_map

Displaying 20 results from an estimated 88 matches for "set_map".

2020 Jun 28
2
[PATCH RFC 4/5] vhost-vdpa: support IOTLB batching hints
...VALIDATE > 3) Write vhost_iotlb_msg with VHOST_IOTLB_BATCH_END flag As long as we are extending the interface, is there some way we could cut down the number of system calls needed here? > > Vhost-vdpa may decide to batch the IOMMU/IOTLB updating in step 3 when > vDPA device support set_map() ops. This is useful for the vDPA device > that want to know all the mappings to tweak their own DMA translation > logic. > > For vDPA device that doesn't require set_map(), no behavior changes. > > This capability is advertised via VHOST_BACKEND_F_IOTLB_BATCH capability. &...
2020 Jun 28
2
[PATCH RFC 4/5] vhost-vdpa: support IOTLB batching hints
...VALIDATE > 3) Write vhost_iotlb_msg with VHOST_IOTLB_BATCH_END flag As long as we are extending the interface, is there some way we could cut down the number of system calls needed here? > > Vhost-vdpa may decide to batch the IOMMU/IOTLB updating in step 3 when > vDPA device support set_map() ops. This is useful for the vDPA device > that want to know all the mappings to tweak their own DMA translation > logic. > > For vDPA device that doesn't require set_map(), no behavior changes. > > This capability is advertised via VHOST_BACKEND_F_IOTLB_BATCH capability. &...
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 VHOST_IOTLB_INVALIDATE. This is because vhost-vdpa doesn't know the userspace start or stop then updating. So this patch introduces two fla...
2020 Jun 29
1
[PATCH RFC 4/5] vhost-vdpa: support IOTLB batching hints
...t all changes take place atomically after BATCH_END? If atomically, we might need to limit batch size to make sure kernel can keep a copy in memory. > > > > > > > > Vhost-vdpa may decide to batch the IOMMU/IOTLB updating in step 3 when > > > vDPA device support set_map() ops. This is useful for the vDPA device > > > that want to know all the mappings to tweak their own DMA translation > > > logic. > > > > > > For vDPA device that doesn't require set_map(), no behavior changes. > > > > > > This capability...
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 VHOST_IOTLB_INVALIDATE. This is because vhost-vdpa doesn't know the userspace start or stop then updating. So this patch introduces two fla...
2020 Jun 18
0
[PATCH RFC 4/5] vhost-vdpa: support IOTLB batching hints
...a batch, it may do: 1) Write vhost_iotlb_msg with VHOST_IOTLB_BATCH_BEGIN flag 2) Perform a batch of IOTLB updating via VHOST_IOTLB_UPDATE/INVALIDATE 3) Write vhost_iotlb_msg with VHOST_IOTLB_BATCH_END flag Vhost-vdpa may decide to batch the IOMMU/IOTLB updating in step 3 when vDPA device support set_map() ops. This is useful for the vDPA device that want to know all the mappings to tweak their own DMA translation logic. For vDPA device that doesn't require set_map(), no behavior changes. This capability is advertised via VHOST_BACKEND_F_IOTLB_BATCH capability. Signed-off-by: Jason Wang <...
2020 Jun 29
0
[PATCH RFC 4/5] vhost-vdpa: support IOTLB batching hints
...e? I'm not sure it's worth to do that since usually we only have less than 10 regions. A possible method is to carry multiple vhost_iotlb_message in one system call. > > >> Vhost-vdpa may decide to batch the IOMMU/IOTLB updating in step 3 when >> vDPA device support set_map() ops. This is useful for the vDPA device >> that want to know all the mappings to tweak their own DMA translation >> logic. >> >> For vDPA device that doesn't require set_map(), no behavior changes. >> >> This capability is advertised via VHOST_BACKEND_F_IOT...
2023 Aug 16
1
[PATCH RFC 4/4] vhost-vdpa: introduce IOTLB_PERSIST backend feature bit
...;> +static bool vhost_vdpa_has_persistent_map(const struct vhost_vdpa *v) >>>> +{ >>>> + struct vdpa_device *vdpa = v->vdpa; >>>> + const struct vdpa_config_ops *ops = vdpa->config; >>>> + >>>> + return (!ops->set_map && !ops->dma_map) || ops->reset_map; >>> So this means the IOTLB/IOMMU mappings have already been decoupled >>> from the vdpa reset. >> Not in the sense of API, it' been coupled since day one from the >> implementations of every on-chip IOMMU parent d...
2023 Aug 22
1
[PATCH RFC 4/4] vhost-vdpa: introduce IOTLB_PERSIST backend feature bit
...vdpa_has_persistent_map(const struct vhost_vdpa *v) > >>>> +{ > >>>> + struct vdpa_device *vdpa = v->vdpa; > >>>> + const struct vdpa_config_ops *ops = vdpa->config; > >>>> + > >>>> + return (!ops->set_map && !ops->dma_map) || ops->reset_map; > >>> So this means the IOTLB/IOMMU mappings have already been decoupled > >>> from the vdpa reset. > >> Not in the sense of API, it' been coupled since day one from the > >> implementations of every on...
2023 Aug 16
1
[PATCH RFC 4/4] vhost-vdpa: introduce IOTLB_PERSIST backend feature bit
...t;> > >> +static bool vhost_vdpa_has_persistent_map(const struct vhost_vdpa *v) > >> +{ > >> + struct vdpa_device *vdpa = v->vdpa; > >> + const struct vdpa_config_ops *ops = vdpa->config; > >> + > >> + return (!ops->set_map && !ops->dma_map) || ops->reset_map; > > So this means the IOTLB/IOMMU mappings have already been decoupled > > from the vdpa reset. > Not in the sense of API, it' been coupled since day one from the > implementations of every on-chip IOMMU parent driver, namely...
2020 Feb 05
2
[PATCH] vhost: introduce vDPA based backend
...wo types of devices: 1) device without on-chip IOMMU, DMA was done via IOMMU API which only support incremental map/unmap 2) device with on-chip IOMMU, DMA could be done by device driver itself, and we could choose to pass the whole mappings to the driver at one time through vDPA bus operation (set_map) For vhost-vpda, there're two types of memory mapping: a) memory table, setup by userspace through VHOST_SET_MEM_TABLE, the whole mapping is updated in this way b) IOTLB API, incrementally done by userspace through vhost message (IOTLB_UPDATE/IOTLB_INVALIDATE) The current design is: - Reu...
2020 Feb 05
2
[PATCH] vhost: introduce vDPA based backend
...wo types of devices: 1) device without on-chip IOMMU, DMA was done via IOMMU API which only support incremental map/unmap 2) device with on-chip IOMMU, DMA could be done by device driver itself, and we could choose to pass the whole mappings to the driver at one time through vDPA bus operation (set_map) For vhost-vpda, there're two types of memory mapping: a) memory table, setup by userspace through VHOST_SET_MEM_TABLE, the whole mapping is updated in this way b) IOTLB API, incrementally done by userspace through vhost message (IOTLB_UPDATE/IOTLB_INVALIDATE) The current design is: - Reu...
2023 Aug 16
1
[PATCH RFC 1/4] vdpa: introduce .reset_map operation callback
...314,6 +314,12 @@ struct vdpa_map_file { > >> * @iova: iova to be unmapped > >> * @size: size of the area > >> * Returns integer: success (0) or error (< 0) > >> + * @reset_map: Reset device memory mapping (optional) > >> + * Needed for device that using device > >> + * specific DMA translation (on-chip IOMMU) > > This exposes the device internal to the upper layer which is not...
2020 Jun 17
12
[PATCH 0/4] vDPA: API for reporting IOVA range
Hi All: This series introduces API for reporing IOVA range. This is a must for userspace to work correclty: - for the process that uses vhost-vDPA directly to properly allocate IOVA - for VM(qemu), when vIOMMU is not enabled, fail early if GPA is out of range - for VM(qemu), when vIOMMU is enabled, determine a valid guest address width Please review. Thanks Jason Wang (4): vdpa:
2020 Jun 17
12
[PATCH 0/4] vDPA: API for reporting IOVA range
Hi All: This series introduces API for reporing IOVA range. This is a must for userspace to work correclty: - for the process that uses vhost-vDPA directly to properly allocate IOVA - for VM(qemu), when vIOMMU is not enabled, fail early if GPA is out of range - for VM(qemu), when vIOMMU is enabled, determine a valid guest address width Please review. Thanks Jason Wang (4): vdpa:
2023 Aug 21
0
[PATCH RFC 1/4] vdpa: introduce .reset_map operation callback
...t;>>> * @iova: iova to be unmapped >>>>>> * @size: size of the area >>>>>> * Returns integer: success (0) or error (< 0) >>>>>> + * @reset_map: Reset device memory mapping (optional) >>>>>> + * Needed for device that using device >>>>>> + * specific DMA translation (on-chip IOMMU) >>>>> This exposes the device interna...
2020 Feb 05
1
[PATCH] vhost: introduce vDPA based backend
...e will help much here. Qemu still need to wait for all the DMA is setup to let guest work. > >> 2) device with on-chip IOMMU, DMA could be done by device driver itself, and >> we could choose to pass the whole mappings to the driver at one time through >> vDPA bus operation (set_map) >> >> For vhost-vpda, there're two types of memory mapping: >> >> a) memory table, setup by userspace through VHOST_SET_MEM_TABLE, the whole >> mapping is updated in this way >> b) IOTLB API, incrementally done by userspace through vhost message >> (IO...
2020 Sep 24
30
[RFC PATCH 00/24] Control VQ support in vDPA
Hi All: This series tries to add the support for control virtqueue in vDPA. Control virtqueue is used by networking device for accepting various commands from the driver. It's a must to support multiqueue and other configurations. When used by vhost-vDPA bus driver for VM, the control virtqueue should be shadowed via userspace VMM (Qemu) instead of being assigned directly to Guest. This is
2020 Sep 24
30
[RFC PATCH 00/24] Control VQ support in vDPA
Hi All: This series tries to add the support for control virtqueue in vDPA. Control virtqueue is used by networking device for accepting various commands from the driver. It's a must to support multiqueue and other configurations. When used by vhost-vDPA bus driver for VM, the control virtqueue should be shadowed via userspace VMM (Qemu) instead of being assigned directly to Guest. This is
2020 Aug 05
2
[PATCH 4/4] vhost: vdpa: report iova range
...vhost_vdpa *v, u32 __user *argp) > +{ > + struct iommu_domain_geometry geo; > + struct vdpa_device *vdpa = v->vdpa; > + const struct vdpa_config_ops *ops = vdpa->config; > + struct vhost_vdpa_iova_range range; > + struct vdpa_iova_range vdpa_range; > + > + if (!ops->set_map && !ops->dma_map) { Why not just check if (ops->get_iova_range) directly? > + iommu_domain_get_attr(v->domain, > + DOMAIN_ATTR_GEOMETRY, &geo); > + range.start = geo.aperture_start; > + range.end = geo.aperture_end; > + } else { > + vdpa_rang...