On 01/08/2018 04:54 PM, Maxime Coquelin wrote:
On 01/08/2018 04:38 PM, Stephen Hemminger wrote:
On Mon, 8 Jan 2018 14:51:27 +0100
Maxime Coquelin <maxime.coque...@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
Ok, thanks. I do this in v2.
What about AMD64?
I haven't checked AMD64 spec yet.
From AMD IOMMU spec (see [0], page 178), the only supported Guest
Virtual Address size is 48bits, so above the 47 bits of user VA on x86.
So in this regard, AMD IOMMU is compatible with using VA as IOVA.
Cheers,
Maxime
[0]: https://support.amd.com/TechDocs/48882_IOMMU.pdf