From: "Tan, Jianfeng" <jianfeng.tan@intel.com>
To: "Yigit, Ferruh" <ferruh.yigit@intel.com>,
Thomas Monjalon <thomas@monjalon.net>,
"Richardson, Bruce" <bruce.richardson@intel.com>,
"Gonzalez Monroy, Sergio" <sergio.gonzalez.monroy@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
Santosh Shukla <santosh.shukla@caviumnetworks.com>
Subject: Re: [dpdk-dev] [PATCH] eal: disable IOVA mode detection by default
Date: Wed, 1 Nov 2017 06:37:23 +0000 [thread overview]
Message-ID: <ED26CBA2FAD1BF48A8719AEF02201E3651338AD1@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <9339bd0d-b9be-21ef-5aa8-1f5b8b5af11f@intel.com>
> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Wednesday, November 1, 2017 2:33 PM
> To: Tan, Jianfeng; Thomas Monjalon; Richardson, Bruce; Gonzalez Monroy,
> Sergio
> Cc: dev@dpdk.org; Santosh Shukla
> Subject: Re: [PATCH] eal: disable IOVA mode detection by default
>
> On 10/31/2017 7:17 PM, Tan, Jianfeng wrote:
> >
> >
> >> -----Original Message-----
> >> From: Yigit, Ferruh
> >> Sent: Wednesday, November 1, 2017 9:07 AM
> >> To: Thomas Monjalon; Richardson, Bruce; Gonzalez Monroy, Sergio
> >> Cc: dev@dpdk.org; Yigit, Ferruh; Tan, Jianfeng; Santosh Shukla
> >> Subject: [PATCH] eal: disable IOVA mode detection by default
> >>
> >> Fix kernel crash with KNI because KNI requires physical addresses.
> >>
> >> A config option introduced to disable IOVA mode detection and to set it
> >> to physical address by default. Disabling config option will enable IOVA
> >> mode detection.
> >>
> >> When there is no intension to use KNI, it is safe to enable detection.
> >>
> >> Config option disable IOVA mode detection by default to be sure only
> who
> >> is aware of result enable it.
> >>
> >> Fixes: 72d013644bd6 ("mem: honor IOVA mode in malloc virt2phy")
> >>
> >> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> >> ---
> >> Cc: Jianfeng Tan <jianfeng.tan@intel.com>
> >> Cc: Santosh Shukla <santosh.shukla@caviumnetworks.com>
> >> Cc: Thomas Monjalon <thomas@monjalon.net>
> >
> > Refer to how vhost-kernel works, we may leverage a memory region table
> to do the translation. The bad side is it's less efficient than current
> phys_to_virt.
>
> Hi Jianfeng,
>
> Can you please elaborate?
It is very similar to what Jacob proposed (KNI IOMMU).
1. Share memsegs (memory regions) with KNI, some pairs of (userspace_addr, length).
2. KNI maintains an address translation table, (userspace_addr, length, kernel_addr).
3. Every time we need a kernel va, we search the table to obtain the addr.
Thanks,
Jianfeng
>
> Thanks,
> ferruh
>
> > Another side, we did not check the result of phys_to_virt, that's why
> kernel crashes.
> >
> > Thanks,
> > Jianfeng
> >
next prev parent reply other threads:[~2017-11-01 6:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-01 1:07 Ferruh Yigit
2017-11-01 2:17 ` Tan, Jianfeng
2017-11-01 6:32 ` Ferruh Yigit
2017-11-01 6:37 ` Tan, Jianfeng [this message]
2017-11-01 7:29 ` Ferruh Yigit
2017-11-01 7:55 ` Tan, Jianfeng
2017-11-01 3:54 ` santosh
2017-11-01 4:02 ` Jerin Jacob
2017-11-01 6:21 ` Ferruh Yigit
2017-11-01 6:54 ` Jerin Jacob
2017-11-01 7:39 ` Tan, Jianfeng
2017-11-01 8:26 ` Jerin Jacob
2017-11-01 8:53 ` Tan, Jianfeng
2017-11-01 18:31 ` Ferruh Yigit
2017-11-01 8:12 ` Ferruh Yigit
2017-11-01 10:31 ` Thomas Monjalon
2017-11-01 11:06 ` santosh
2017-11-01 18:22 ` Ferruh Yigit
2017-11-01 18:11 ` Ferruh Yigit
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=ED26CBA2FAD1BF48A8719AEF02201E3651338AD1@SHSMSX103.ccr.corp.intel.com \
--to=jianfeng.tan@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=santosh.shukla@caviumnetworks.com \
--cc=sergio.gonzalez.monroy@intel.com \
--cc=thomas@monjalon.net \
/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).