From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Cc: gowrishankar.m@linux.vnet.ibm.com, shreyansh.jain@nxp.com,
"Burakov, Anatoly" <anatoly.burakov@intel.com>
Subject: [dpdk-dev] [PATCH v3] vfio: fix compile on older kernels
Date: Tue, 28 Mar 2017 16:53:43 +0100 [thread overview]
Message-ID: <1490716423-26153-1-git-send-email-anatoly.burakov@intel.com> (raw)
In-Reply-To: <1490273811-22985-1-git-send-email-anatoly.burakov@intel.com>
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
Fixing compile failures for kernels without sPAPR IOMMU support.
Fixes: 0fe9830b5345 ("eal/ppc: support sPAPR IOMMU for vfio-pci")
Signed-off-by: Burakov, Anatoly <anatoly.burakov@intel.com>
---
v3: fixed compile on kernels where SPAPR_v2 is not present but SPAPR is
v2: fixed newlines
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 ac31a4f..0bf85bb 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.9.3
next prev parent reply other threads:[~2017-03-28 15:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-21 16:08 [dpdk-dev] [PATCH] " Anatoly Burakov
2017-03-22 4:46 ` Shreyansh Jain
2017-03-22 9:57 ` Burakov, Anatoly
2017-03-23 12:56 ` [dpdk-dev] [PATCH v2] " Anatoly Burakov
2017-03-27 13:17 ` Thomas Monjalon
2017-03-28 15:53 ` Anatoly Burakov [this message]
2017-03-30 14:53 ` [dpdk-dev] [PATCH v3] " Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1490716423-26153-1-git-send-email-anatoly.burakov@intel.com \
--to=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=gowrishankar.m@linux.vnet.ibm.com \
--cc=shreyansh.jain@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).