DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Tan, Jianfeng" <jianfeng.tan@intel.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"stable@dpdk.org" <stable@dpdk.org>,
	"santosh.shukla@caviumnetworks.com"
	<santosh.shukla@caviumnetworks.com>,
	"Burakov, Anatoly" <anatoly.burakov@intel.com>,
	"thomas@monjalon.net" <thomas@monjalon.net>,
	"stephen@networkplumber.org" <stephen@networkplumber.org>,
	"peterx@redhat.com" <peterx@redhat.com>
Subject: Re: [dpdk-dev] [PATCH v2] bus/pci: forbid VA as IOVA mode if IOMMU address width too small
Date: Fri, 12 Jan 2018 01:15:21 +0000	[thread overview]
Message-ID: <ED26CBA2FAD1BF48A8719AEF02201E36513B7BEA@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <5c168150-7dcc-c110-a3d6-968738d781f7@redhat.com>

Hi Maxime,

> -----Original Message-----
> From: Maxime Coquelin [mailto:maxime.coquelin@redhat.com]
> Sent: Friday, January 12, 2018 4:20 AM
> To: Tan, Jianfeng
> Cc: dev@dpdk.org; stable@dpdk.org; santosh.shukla@caviumnetworks.com;
> Burakov, Anatoly; thomas@monjalon.net; stephen@networkplumber.org;
> peterx@redhat.com
> Subject: Re: [PATCH v2] bus/pci: forbid VA as IOVA mode if IOMMU address
> width too small
> 
> Hi Jianfeng,
> 
> On 01/09/2018 02:18 PM, Maxime Coquelin wrote:
> > Intel VT-d supports different address widths for the IOVAs, from
> > 39 bits to 56 bits.
> >
> > While recent processors support at least 48 bits, VT-d emulation
> > currently only supports 39 bits. It makes DMA mapping to fail in this
> > case when using VA as IOVA mode, as user-space virtual addresses uses
> > up to 47 bits (see kernel's Documentation/x86/x86_64/mm.txt).

Yes, I also notice this issue on some of Intel platform with limited width for IOVA. But I was always suggesting to use --base-virtaddr to work around.

> >
> > This patch parses VT-d CAP register value available in sysfs, and
> > forbid VA as IOVA mode if the GAW is 39 bits or unknown.
> >
> > Fixes: f37dfab21c98 ("drivers/net: enable IOVA mode for Intel PMDs")
> >
> > Cc: stable@dpdk.org
> > Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> > ---
> >
> > Changes in v2:
> > ==============
> > - Rework pci_one_device_iommu_support_va #ifdefery (Stephen)
> > - Don't inline introduced functions (Stephen)
> >
> >   drivers/bus/pci/linux/pci.c | 108
> ++++++++++++++++++++++++++++++++++++++++----
> >   1 file changed, 99 insertions(+), 9 deletions(-)
> >
> 
> Could you please try the patch and confirm it does not break your
> --no-huge usecase?

I've tested the --no-huge case, it still works on my xeon E5 server. I'll add my Tested-by to the original patch.

> 
> Are you fine with the fix?

Forbidding such usage seems a little overkill to me actually. How about just making it as a warning like:
  "IOMMU only support 39-bit IOVA address, you might want to use --base-virtaddr to restrict the range of virtual address (IOVA)"

Thanks,
Jianfeng

> 
> Thanks,
> Maxime

  reply	other threads:[~2018-01-12  1:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-09 13:18 Maxime Coquelin
2018-01-11 20:19 ` Maxime Coquelin
2018-01-12  1:15   ` Tan, Jianfeng [this message]
2018-01-12  3:00 ` Tan, Jianfeng
2018-01-12  3:28   ` Zhang, Qi Z
2018-01-12  3:56 ` Zhang, Qi Z
2018-01-12  8:21   ` Maxime Coquelin

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=ED26CBA2FAD1BF48A8719AEF02201E36513B7BEA@SHSMSX103.ccr.corp.intel.com \
    --to=jianfeng.tan@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=peterx@redhat.com \
    --cc=santosh.shukla@caviumnetworks.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    --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).