From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: dev@dpdk.org
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
Subject: [dpdk-dev] [PATCH dpdk v2] vfio/ppc64/spapr: Use correct structures for add/remove windows
Date: Wed, 26 Apr 2017 18:06:41 +1000 [thread overview]
Message-ID: <20170426080641.23676-1-aik@ozlabs.ru> (raw)
If Linux UAPI headers in the system do not have VFIO_SPAPR_TCE_v2_IOMMU
defined, DPDK define necessary structures itself. However the existing
definitions are different from ones pushed to the mainline kernel.
This copies structures passed via VFIO_IOMMU_SPAPR_TCE_CREATE and
VFIO_IOMMU_SPAPR_TCE_REMOVE ioctls.
No change in behaviour is expected if installed linux UAPI headers
have knowledge of VFIO_SPAPR_TCE_v2_IOMMU.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
Changes:
v2:
* changed commit log after I realized that the linux UAPI headers are
currently used and if a distro is quite fresh, it has everything
defined correctly
---
lib/librte_eal/linuxapp/eal/eal_vfio.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.h b/lib/librte_eal/linuxapp/eal/eal_vfio.h
index 239ac4d8d..4a0283cb4 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.h
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.h
@@ -69,13 +69,21 @@ struct vfio_iommu_spapr_register_memory {
struct vfio_iommu_spapr_tce_create {
uint32_t argsz;
+ uint32_t flags;
+ /* in */
uint32_t page_shift;
+ uint32_t __resv1;
uint64_t window_size;
uint32_t levels;
+ uint32_t __resv2;
+ /* out */
+ uint64_t start_addr;
};
struct vfio_iommu_spapr_tce_remove {
uint32_t argsz;
+ uint32_t flags;
+ /* in */
uint64_t start_addr;
};
--
2.11.0
next reply other threads:[~2017-04-26 8:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-26 8:06 Alexey Kardashevskiy [this message]
2017-04-26 8:15 ` Burakov, Anatoly
2017-04-30 17:47 ` 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=20170426080641.23676-1-aik@ozlabs.ru \
--to=aik@ozlabs.ru \
--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).