patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 16.11 1/2] vfio: fix build on old kernel
@ 2018-11-21 16:48 Luca Boccassi
  2018-11-21 16:48 ` [dpdk-stable] [PATCH 16.11 2/2] vfio: fix build Luca Boccassi
  2018-11-23  9:26 ` [dpdk-stable] [PATCH 16.11 1/2] vfio: fix build on old kernel Burakov, Anatoly
  0 siblings, 2 replies; 4+ messages in thread
From: Luca Boccassi @ 2018-11-21 16:48 UTC (permalink / raw)
  To: stable; +Cc: anatoly.burakov

From: Anatoly Burakov <anatoly.burakov@intel.com>

[ 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 <anatoly.burakov@intel.com>
---
 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
-- 
2.19.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-stable] [PATCH 16.11 2/2] vfio: fix build
  2018-11-21 16:48 [dpdk-stable] [PATCH 16.11 1/2] vfio: fix build on old kernel Luca Boccassi
@ 2018-11-21 16:48 ` Luca Boccassi
  2018-11-23  9:29   ` Burakov, Anatoly
  2018-11-23  9:26 ` [dpdk-stable] [PATCH 16.11 1/2] vfio: fix build on old kernel Burakov, Anatoly
  1 sibling, 1 reply; 4+ messages in thread
From: Luca Boccassi @ 2018-11-21 16:48 UTC (permalink / raw)
  To: stable; +Cc: anatoly.burakov

From: Anatoly Burakov <anatoly.burakov@intel.com>

[ backported from upstream commit 9fa5993f103712d10be0f0b111a3a9afc92cd9e6 ]

Some compilers require definition of vfio_iommu_spapr_tce_ddw_info
before its use in vfio_iommu_spapr_tce_info, so move tce_info
definition below tce_ddw_info.

Fixes: 468f42cc2645 ("vfio: fix build on old kernel")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/linuxapp/eal/eal_vfio.h | 29 +++++++++++++-------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.h b/lib/librte_eal/linuxapp/eal/eal_vfio.h
index 0bf85bb59..72f1f7572 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.h
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.h
@@ -60,19 +60,6 @@
 #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;
@@ -97,7 +84,21 @@ struct vfio_iommu_spapr_tce_ddw_info {
 	uint32_t max_dynamic_windows_supported;
 	uint32_t levels;
 };
-#else
+
+/* 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 /* VFIO_SPAPR_TCE_IOMMU */
+
+#else /* VFIO_SPAPR_TCE_v2_IOMMU */
 #define RTE_VFIO_SPAPR VFIO_SPAPR_TCE_v2_IOMMU
 #endif
 
-- 
2.19.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [PATCH 16.11 1/2] vfio: fix build on old kernel
  2018-11-21 16:48 [dpdk-stable] [PATCH 16.11 1/2] vfio: fix build on old kernel Luca Boccassi
  2018-11-21 16:48 ` [dpdk-stable] [PATCH 16.11 2/2] vfio: fix build Luca Boccassi
@ 2018-11-23  9:26 ` Burakov, Anatoly
  1 sibling, 0 replies; 4+ messages in thread
From: Burakov, Anatoly @ 2018-11-23  9:26 UTC (permalink / raw)
  To: Luca Boccassi, stable

On 21-Nov-18 4:48 PM, Luca Boccassi wrote:
> From: Anatoly Burakov <anatoly.burakov@intel.com>
> 
> [ 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 <anatoly.burakov@intel.com>
> ---
>   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 <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [PATCH 16.11 2/2] vfio: fix build
  2018-11-21 16:48 ` [dpdk-stable] [PATCH 16.11 2/2] vfio: fix build Luca Boccassi
@ 2018-11-23  9:29   ` Burakov, Anatoly
  0 siblings, 0 replies; 4+ messages in thread
From: Burakov, Anatoly @ 2018-11-23  9:29 UTC (permalink / raw)
  To: Luca Boccassi, stable

On 21-Nov-18 4:48 PM, Luca Boccassi wrote:
> From: Anatoly Burakov <anatoly.burakov@intel.com>
> 
> [ backported from upstream commit 9fa5993f103712d10be0f0b111a3a9afc92cd9e6 ]
> 
> Some compilers require definition of vfio_iommu_spapr_tce_ddw_info
> before its use in vfio_iommu_spapr_tce_info, so move tce_info
> definition below tce_ddw_info.
> 
> Fixes: 468f42cc2645 ("vfio: fix build on old kernel")
> 
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---

Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>

The patchset can probably be squashed into one patch, since the latter 
is fix for the former.

-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-11-23  9:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-21 16:48 [dpdk-stable] [PATCH 16.11 1/2] vfio: fix build on old kernel Luca Boccassi
2018-11-21 16:48 ` [dpdk-stable] [PATCH 16.11 2/2] vfio: fix build Luca Boccassi
2018-11-23  9:29   ` Burakov, Anatoly
2018-11-23  9:26 ` [dpdk-stable] [PATCH 16.11 1/2] vfio: fix build on old kernel Burakov, Anatoly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).