From: David Christensen <drc@linux.vnet.ibm.com>
To: dev@dpdk.org
Cc: David Christensen <drc@linux.vnet.ibm.com>
Subject: [dpdk-dev] [PATCH 1/2] vfio: use ifdef's for ppc64 spapr code
Date: Wed, 29 Apr 2020 16:29:30 -0700 [thread overview]
Message-ID: <20200429232931.87233-2-drc@linux.vnet.ibm.com> (raw)
In-Reply-To: <20200429232931.87233-1-drc@linux.vnet.ibm.com>
Enclose ppc64 specific SPAPR VFIO support with ifdef's.
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
---
lib/librte_eal/linux/eal_vfio.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/librte_eal/linux/eal_vfio.c b/lib/librte_eal/linux/eal_vfio.c
index d26e1649a..953397984 100644
--- a/lib/librte_eal/linux/eal_vfio.c
+++ b/lib/librte_eal/linux/eal_vfio.c
@@ -56,8 +56,10 @@ static struct vfio_config *default_vfio_cfg = &vfio_cfgs[0];
static int vfio_type1_dma_map(int);
static int vfio_type1_dma_mem_map(int, uint64_t, uint64_t, uint64_t, int);
+#ifdef RTE_ARCH_PPC_64
static int vfio_spapr_dma_map(int);
static int vfio_spapr_dma_mem_map(int, uint64_t, uint64_t, uint64_t, int);
+#endif
static int vfio_noiommu_dma_map(int);
static int vfio_noiommu_dma_mem_map(int, uint64_t, uint64_t, uint64_t, int);
static int vfio_dma_mem_map(struct vfio_config *vfio_cfg, uint64_t vaddr,
@@ -72,6 +74,7 @@ static const struct vfio_iommu_type iommu_types[] = {
.dma_map_func = &vfio_type1_dma_map,
.dma_user_map_func = &vfio_type1_dma_mem_map
},
+#ifdef RTE_ARCH_PPC_64
/* ppc64 IOMMU, otherwise known as spapr */
{
.type_id = RTE_VFIO_SPAPR,
@@ -79,6 +82,7 @@ static const struct vfio_iommu_type iommu_types[] = {
.dma_map_func = &vfio_spapr_dma_map,
.dma_user_map_func = &vfio_spapr_dma_mem_map
},
+#endif
/* IOMMU-less mode */
{
.type_id = RTE_VFIO_NOIOMMU,
@@ -1407,6 +1411,7 @@ vfio_type1_dma_map(int vfio_container_fd)
return rte_memseg_walk(type1_map, &vfio_container_fd);
}
+#ifdef RTE_ARCH_PPC_64
static int
vfio_spapr_dma_do_map(int vfio_container_fd, uint64_t vaddr, uint64_t iova,
uint64_t len, int do_map)
@@ -1578,7 +1583,6 @@ vfio_spapr_create_new_dma_window(int vfio_container_fd,
/* create new DMA window */
ret = ioctl(vfio_container_fd, VFIO_IOMMU_SPAPR_TCE_CREATE, create);
if (ret) {
-#ifdef VFIO_IOMMU_SPAPR_INFO_DDW
/* try possible page_shift and levels for workaround */
uint32_t levels;
@@ -1588,7 +1592,6 @@ vfio_spapr_create_new_dma_window(int vfio_container_fd,
ret = ioctl(vfio_container_fd,
VFIO_IOMMU_SPAPR_TCE_CREATE, create);
}
-#endif
if (ret) {
RTE_LOG(ERR, EAL, " cannot create new DMA window, "
"error %i (%s)\n", errno, strerror(errno));
@@ -1747,6 +1750,7 @@ vfio_spapr_dma_map(int vfio_container_fd)
return 0;
}
+#endif /* RTE_ARCH_PPC_64 */
static int
vfio_noiommu_dma_map(int __rte_unused vfio_container_fd)
--
2.18.1
next prev parent reply other threads:[~2020-04-29 23:29 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 23:29 [dpdk-dev] [PATCH 0/2] vfio: change spapr DMA window sizing operation David Christensen
2020-04-29 23:29 ` David Christensen [this message]
2020-04-30 11:14 ` [dpdk-dev] [PATCH 1/2] vfio: use ifdef's for ppc64 spapr code Burakov, Anatoly
2020-04-30 16:22 ` David Christensen
2020-04-30 16:24 ` Burakov, Anatoly
2020-04-30 17:38 ` David Christensen
2020-05-01 8:49 ` Burakov, Anatoly
2020-04-29 23:29 ` [dpdk-dev] [PATCH 2/2] vfio: modify spapr iommu support to use static window sizing David Christensen
2020-04-30 11:34 ` Burakov, Anatoly
2020-04-30 17:36 ` David Christensen
2020-05-01 9:06 ` Burakov, Anatoly
2020-05-01 16:48 ` David Christensen
2020-05-05 14:57 ` Burakov, Anatoly
2020-05-05 16:26 ` David Christensen
2020-05-06 10:18 ` Burakov, Anatoly
2020-06-30 21:38 ` [dpdk-dev] [PATCH v2 0/1] vfio: change spapr DMA window sizing operation David Christensen
2020-06-30 21:38 ` [dpdk-dev] [PATCH v2 1/1] vfio: modify spapr iommu support to use static window sizing David Christensen
2020-08-10 21:07 ` [dpdk-dev] [PATCH v3 0/1] vfio: change spapr DMA window sizing operation David Christensen
2020-08-10 21:07 ` [dpdk-dev] [PATCH v3 1/1] vfio: modify spapr iommu support to use static window sizing David Christensen
2020-09-03 18:55 ` David Christensen
2020-09-17 11:13 ` Burakov, Anatoly
2020-10-07 12:49 ` Thomas Monjalon
2020-10-07 17:44 ` David Christensen
2020-10-08 9:39 ` Burakov, Anatoly
2020-10-12 19:19 ` David Christensen
2020-10-14 9:27 ` Burakov, Anatoly
2020-10-15 17:23 ` [dpdk-dev] [PATCH v4 0/1] vfio: change spapr DMA window sizing operation David Christensen
2020-10-15 17:23 ` [dpdk-dev] [PATCH v4 1/1] vfio: modify spapr iommu support to use static window sizing David Christensen
2020-10-20 12:05 ` Thomas Monjalon
2020-10-29 21:30 ` Thomas Monjalon
2020-11-02 11:04 ` Burakov, Anatoly
2020-11-03 22:05 ` [dpdk-dev] [PATCH v5 0/1] " David Christensen
2020-11-03 22:05 ` [dpdk-dev] [PATCH v5 1/1] " David Christensen
2020-11-04 19:43 ` Thomas Monjalon
2020-11-04 21:00 ` David Christensen
2020-11-04 21:02 ` Thomas Monjalon
2020-11-04 22:25 ` David Christensen
2020-11-05 7:12 ` Thomas Monjalon
2020-11-06 22:16 ` David Christensen
2020-11-07 9:58 ` Thomas Monjalon
2020-11-09 20:35 ` [dpdk-dev] [PATCH v5 0/1] " David Christensen
2020-11-09 20:35 ` [dpdk-dev] [PATCH v6 1/1] " David Christensen
2020-11-09 21:10 ` Thomas Monjalon
2020-11-10 17:41 ` [dpdk-dev] [PATCH v7 0/1] " David Christensen
2020-11-10 17:41 ` [dpdk-dev] [PATCH v7 1/1] " David Christensen
2020-11-10 17:43 ` [dpdk-dev] [PATCH v7 0/1] " David Christensen
2020-11-10 17:43 ` [dpdk-dev] [PATCH v7 1/1] " David Christensen
2020-11-13 8:39 ` 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=20200429232931.87233-2-drc@linux.vnet.ibm.com \
--to=drc@linux.vnet.ibm.com \
--cc=dev@dpdk.org \
/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).