From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexey Kardashevskiy Subject: [PATCH dpdk v2] vfio/ppc64/spapr: Use correct structures for add/remove windows Date: Wed, 26 Apr 2017 18:06:41 +1000 Message-ID: <20170426080641.23676-1-aik@ozlabs.ru> Cc: Alexey Kardashevskiy To: dev@dpdk.org Return-path: Received: from ozlabs.ru (ozlabs.ru [107.173.13.209]) by dpdk.org (Postfix) with ESMTP id EF2D669A5 for ; Wed, 26 Apr 2017 10:06:44 +0200 (CEST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- Changes: v2: * changed commit log after I realized that the linux UAPI headers are currently used and if a distro is quite fresh, it has everything defined correctly --- lib/librte_eal/linuxapp/eal/eal_vfio.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.h b/lib/librte_eal/linuxapp/eal/eal_vfio.h index 239ac4d8d..4a0283cb4 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; }; -- 2.11.0