From: Alexey Kardashevskiy Date: Wed, 26 Apr 2017 08:06:41 +0000 (+1000) Subject: vfio: fix structures for sPAPR IOMMU X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e11222c7f429a8cdde5206fd724161f6c363da40;p=dpdk.git vfio: fix structures for sPAPR IOMMU If Linux UAPI headers in the system do not have VFIO_SPAPR_TCE_v2_IOMMU defined, DPDK define necessary structures itself. However the existing definitions are different from ones pushed to the mainline kernel. This copies structures passed via VFIO_IOMMU_SPAPR_TCE_CREATE and VFIO_IOMMU_SPAPR_TCE_REMOVE ioctls. No change in behaviour is expected if installed linux UAPI headers have knowledge of VFIO_SPAPR_TCE_v2_IOMMU. Signed-off-by: Alexey Kardashevskiy Acked-by: Anatoly Burakov --- diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.h b/lib/librte_eal/linuxapp/eal/eal_vfio.h index 429d625506..5ff63e5d75 100644 --- a/lib/librte_eal/linuxapp/eal/eal_vfio.h +++ b/lib/librte_eal/linuxapp/eal/eal_vfio.h @@ -69,13 +69,21 @@ struct vfio_iommu_spapr_register_memory { struct vfio_iommu_spapr_tce_create { uint32_t argsz; + uint32_t flags; + /* in */ uint32_t page_shift; + uint32_t __resv1; uint64_t window_size; uint32_t levels; + uint32_t __resv2; + /* out */ + uint64_t start_addr; }; struct vfio_iommu_spapr_tce_remove { uint32_t argsz; + uint32_t flags; + /* in */ uint64_t start_addr; };