From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 40E9269A5 for ; Thu, 23 Mar 2017 13:56:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490273818; x=1521809818; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=Ux3zQUONF/pad1KVeyHK76a8gD2Y+x66ClfD0FUJXiA=; b=HrINjK+EM9aYOZWcuEjLKzRq4GBmUEgyZh1sjoIbxrWP+sEVB7fdaf0K VtT9L/jrDBBkPh+5zg6gbCLN2lVKYg==; Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Mar 2017 05:56:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,209,1486454400"; d="scan'208";a="79808084" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga005.fm.intel.com with ESMTP; 23 Mar 2017 05:56:54 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id v2NCurln015886; Thu, 23 Mar 2017 12:56:53 GMT Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id v2NCuqks023090; Thu, 23 Mar 2017 12:56:52 GMT Received: (from aburakov@localhost) by sivswdev02.ir.intel.com with œ id v2NCupkT023086; Thu, 23 Mar 2017 12:56:51 GMT From: Anatoly Burakov To: dev@dpdk.org Cc: gowrishankar.m@linux.vnet.ibm.com, shreyansh.jain@nxp.com, "Burakov, Anatoly" Date: Thu, 23 Mar 2017 12:56:51 +0000 Message-Id: <1490273811-22985-1-git-send-email-anatoly.burakov@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1490112483-5603-1-git-send-email-anatoly.burakov@intel.com> References: <1490112483-5603-1-git-send-email-anatoly.burakov@intel.com> Subject: [dpdk-dev] [PATCH v2] vfio: fix compile on older kernels X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Mar 2017 12:56:58 -0000 From: "Burakov, Anatoly" Fixing compile failures for kernels without sPAPR IOMMU support. Fixes: 0fe9830b5345 ("eal/ppc: support sPAPR IOMMU for vfio-pci") Signed-off-by: Burakov, Anatoly --- v2: Fixed whitespace and newlines lib/librte_eal/linuxapp/eal/eal_vfio.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.h b/lib/librte_eal/linuxapp/eal/eal_vfio.h index ac31a4f..23d2649 100644 --- a/lib/librte_eal/linuxapp/eal/eal_vfio.h +++ b/lib/librte_eal/linuxapp/eal/eal_vfio.h @@ -59,22 +59,40 @@ #define VFIO_IOMMU_SPAPR_REGISTER_MEMORY _IO(VFIO_TYPE, VFIO_BASE + 17) #define VFIO_IOMMU_SPAPR_TCE_CREATE _IO(VFIO_TYPE, VFIO_BASE + 19) #define VFIO_IOMMU_SPAPR_TCE_REMOVE _IO(VFIO_TYPE, VFIO_BASE + 20) +#define VFIO_IOMMU_SPAPR_TCE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12) + struct vfio_iommu_spapr_register_memory { uint32_t argsz; uint32_t flags; uint64_t vaddr; uint64_t size; }; + struct vfio_iommu_spapr_tce_create { uint32_t argsz; uint32_t page_shift; uint64_t window_size; uint32_t levels; }; + struct vfio_iommu_spapr_tce_remove { uint32_t argsz; uint64_t start_addr; }; + +struct vfio_iommu_spapr_tce_ddw_info { + uint64_t pgsizes; + uint32_t max_dynamic_windows_supported; + uint32_t levels; +}; + +struct vfio_iommu_spapr_tce_info { + uint32_t argsz; + uint32_t flags; + uint32_t dma32_window_start; + uint32_t dma32_window_size; + struct vfio_iommu_spapr_tce_ddw_info ddw; +}; #else #define RTE_VFIO_SPAPR VFIO_SPAPR_TCE_v2_IOMMU #endif -- 2.9.3