[dpdk-dev] [RFC][PATCH] vfio: allow to map other memory regions

Stephen Hemminger stephen at networkplumber.org
Wed May 17 19:20:23 CEST 2017


On Wed, 17 May 2017 16:44:46 +0200
Pawel Wodkowski <pawelx.wodkowski at intel.com> wrote:

>  /* IOMMU types we support */
>  static const struct vfio_iommu_type iommu_types[] = {
>  	/* x86 IOMMU, otherwise known as type 1 */
> -	{ RTE_VFIO_TYPE1, "Type 1", &vfio_type1_dma_map},
> +	{ RTE_VFIO_TYPE1, "Type 1", &vfio_type1_dma_map, &vfio_type1_dma_mem_map},
>  	/* ppc64 IOMMU, otherwise known as spapr */
> -	{ RTE_VFIO_SPAPR, "sPAPR", &vfio_spapr_dma_map},
> +	{ RTE_VFIO_SPAPR, "sPAPR", &vfio_spapr_dma_map, NULL},
>  	/* IOMMU-less mode */
> -	{ RTE_VFIO_NOIOMMU, "No-IOMMU", &vfio_noiommu_dma_map},
> +	{ RTE_VFIO_NOIOMMU, "No-IOMMU", &vfio_noiommu_dma_map, &vfio_noiommu_dma_mem_map},
>  };

For complex tables like this why not use C99 style initializer.


More information about the dev mailing list