From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <alex@weka.io>
Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com
 [209.85.217.172]) by dpdk.org (Postfix) with ESMTP id 971E87E7A
 for <dev@dpdk.org>; Tue, 21 Oct 2014 09:23:53 +0200 (CEST)
Received: by mail-lb0-f172.google.com with SMTP id b6so496973lbj.17
 for <dev@dpdk.org>; Tue, 21 Oct 2014 00:32:08 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:in-reply-to:references:date
 :message-id:subject:from:to:cc:content-type;
 bh=kMocZoDJ9uPjGv3YBWcVvkHpi+7vFdNcm+xhuSh0uF8=;
 b=UsSIbrt/UXByj3gmStct/ukGzxiATSwJ1gMCIlWTskYJrPcjBcmfjWMkNxOW6hMbOn
 /XqGbIL4AjHhgkA2iqRKRVuEeYTl/42PTY+DldKI1fY3nMLU9eYooJUx63CYCbOnvm2t
 3HFSBnbCqbFK22R8I3XxooZIgfe9JlFZKekJ1X4sldzy/2xuBPRYIc0g2jrwjPCOdVoh
 0mj5YPIWkOQ3IEeHzMxGBeV+IMUNW7oOF2zQyazugHaTYgG86lgNvA2I+NENlqM/wOR/
 BsP925fL4mZ/mcjWP9+AYFIInsKva2rf9HMbfJykXz5+DPnIULD9MSMoPYPZRLJmEg+R
 DzuQ==
X-Gm-Message-State: ALoCoQlf7ymWdrWF6i9AzkU75iTnTK6YJtD1Cgy+arY/BOkzpcK+2qGXIpPOKZWZrNHs+luCBQ1v
MIME-Version: 1.0
X-Received: by 10.152.27.38 with SMTP id q6mr1189836lag.92.1413876728204; Tue,
 21 Oct 2014 00:32:08 -0700 (PDT)
Received: by 10.25.215.141 with HTTP; Tue, 21 Oct 2014 00:32:08 -0700 (PDT)
In-Reply-To: <C37D651A908B024F974696C65296B57B0F2CD832@SHSMSX101.ccr.corp.intel.com>
References: <CAKU5Fo_7fQHcYa-1ZBX8=D0SCkxZL8VLEpWYtJ6rG4DpV=g3gw@mail.gmail.com>
 <C37D651A908B024F974696C65296B57B0F2CD832@SHSMSX101.ccr.corp.intel.com>
Date: Tue, 21 Oct 2014 10:32:08 +0300
Message-ID: <CAKfHP0U-v2fLQwyEa3KBZs3kXpVMQdLU+WgLzQq6xxmrb3Brtg@mail.gmail.com>
From: Alex Markuze <alex@weka.io>
To: "Xie, Huawei" <huawei.xie@intel.com>
Content-Type: text/plain; charset=UTF-8
X-Content-Filtered-By: Mailman/MimeDel 2.1.15
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Why do we need iommu=pt?
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 21 Oct 2014 07:23:53 -0000

DPDK uses a 1:1 mapping and doesn't support IOMMU.  IOMMU allows for
simpler VM physical address translation.
The second role of IOMMU is to allow protection from unwanted memory access
by an unsafe devise that has DMA privileges. Unfortunately this protection
comes with an extremely high performance costs for high speed nics.

To your question iommu=pt disables IOMMU support for the hypervisor.

On Tue, Oct 21, 2014 at 1:39 AM, Xie, Huawei <huawei.xie@intel.com> wrote:

>
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shivapriya Hiremath
> > Sent: Monday, October 20, 2014 2:59 PM
> > To: dev@dpdk.org
> > Subject: [dpdk-dev] Why do we need iommu=pt?
> >
> > Hi,
> >
> > My question is that if the Poll mode  driver used the DMA kernel
> interface
> > to set up its mappings appropriately, would it still require that
> iommu=pt
> > be set?
> > What is the purpose of setting iommu=pt ?
> PMD allocates memory though hugetlb file system, and fills the physical
> address
> into the descriptor.
> pt is used to pass through iotlb translation. Refer to the below link.
> http://lkml.iu.edu/hypermail/linux/kernel/0906.2/02129.html
> >
> > Thank you.
>