From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 6DD321B498 for ; Fri, 23 Nov 2018 10:26:36 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Nov 2018 01:26:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,269,1539673200"; d="scan'208";a="107037980" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.251.82.123]) ([10.251.82.123]) by fmsmga002.fm.intel.com with ESMTP; 23 Nov 2018 01:26:34 -0800 To: Luca Boccassi , stable@dpdk.org References: <20181121164802.8186-1-bluca@debian.org> From: "Burakov, Anatoly" Message-ID: <42e415ca-4e97-7a07-4e9e-57ded7f95019@intel.com> Date: Fri, 23 Nov 2018 09:26:34 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181121164802.8186-1-bluca@debian.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [PATCH 16.11 1/2] vfio: fix build on old kernel X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Nov 2018 09:26:36 -0000 On 21-Nov-18 4:48 PM, Luca Boccassi wrote: > From: Anatoly Burakov > > [ backported from upstream commit 468f42cc264580c078b892fe6886810fe996a75f ] > > Fixing compile failures for kernels without sPAPR IOMMU support. > > Fixes: 0fe9830b5345 ("eal/ppc: support sPAPR IOMMU for vfio-pci") > > Signed-off-by: Anatoly Burakov > --- > lib/librte_eal/linuxapp/eal/eal_vfio.h | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.h b/lib/librte_eal/linuxapp/eal/eal_vfio.h > index ac31a4fc1..0bf85bb59 100644 > --- a/lib/librte_eal/linuxapp/eal/eal_vfio.h > +++ b/lib/librte_eal/linuxapp/eal/eal_vfio.h > @@ -59,22 +59,44 @@ > #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) > + > +/* SPAPR_v2 is not present, but SPAPR might be */ > +#ifndef VFIO_SPAPR_TCE_IOMMU > +#define VFIO_IOMMU_SPAPR_TCE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12) > + > +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; > +}; > +#endif > + > 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; > +}; > #else > #define RTE_VFIO_SPAPR VFIO_SPAPR_TCE_v2_IOMMU > #endif > Reviewed-by: Anatoly Burakov -- Thanks, Anatoly