2016-01-27 14:32, Anatoly Burakov:
> +/* DMA mapping function prototype.
> + * Takes VFIO container fd as a parameter.
> + * Returns 0 on success, -1 on error.
> + * */
> +typedef int (*vfio_dma_func_t)(int);
> +
> +struct vfio_iommu_type {
> + int type_id;
> + const char *name;
> + vf
Hi Thomas,
> > Is it possible (is it better) to declare these functions with
> > vfio_dma_func_t?
>
> Yeah, sure. Or maybe the other way around - maybe we could do away with
> the typedef. I'll go for the former though.
No, we can't declare the functions with a function pointer. At least I don'
Hi Thomas,
> > +/* DMA mapping function prototype.
> > + * Takes VFIO container fd as a parameter.
> > + * Returns 0 on success, -1 on error.
> > + * */
> > +typedef int (*vfio_dma_func_t)(int);
> > +
> > +struct vfio_iommu_type {
> > + int type_id;
> > + const char *name;
> > + vfio_dma_fu
This commit is adding a generic mechanism to support multiple IOMMU
types. For now, it's only type 1 (x86 IOMMU) and no-IOMMU (a special
VFIO mode that doesn't use IOMMU at all), but it's easily extended
by adding necessary definitions into eal_pci_init.h and a DMA
mapping function to eal_pci_vfio.
4 matches
Mail list logo