[dpdk-dev] [PATCH] bus/pci: forbid VA as IOVA mode if IOMMU address width too small

Stephen Hemminger stephen at networkplumber.org
Mon Jan 8 16:38:41 CET 2018


On Mon,  8 Jan 2018 14:51:27 +0100
Maxime Coquelin <maxime.coquelin at redhat.com> wrote:

> +static inline bool
> +pci_one_device_iommu_support_va(struct rte_pci_device *dev)
> +{
> +#if defined(RTE_ARCH_PPC_64)
> +	return false;
> +#elif defined(RTE_ARCH_X86)
> +

The cleaner way to handle this kind of ifdef is:

#ifdef RTE_ARCH_X86
static bool
pci_one_device_iommu_support_va(struct rte_pci_device *dev)
{
....
}
#elif defined(RTE_ARCH_PPC_64) 
static inline bool
pci_one_device_iommu_support_va(struct rte_pci_device *dev)
{
	return false;
}
#endif

What about AMD64?
Do all ARM processors have IOMMU, I think not.


More information about the dev mailing list