From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,URIBL_SBL,URIBL_SBL_A, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BFEFC73C46 for ; Tue, 9 Jul 2019 15:03:04 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 1EC6B21537 for ; Tue, 9 Jul 2019 15:03:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1EC6B21537 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 504621B959; Tue, 9 Jul 2019 17:03:03 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 675531B951 for ; Tue, 9 Jul 2019 17:03:01 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2019 08:02:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,470,1557212400"; d="scan'208";a="165785580" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.82]) ([10.237.220.82]) by fmsmga008.fm.intel.com with ESMTP; 09 Jul 2019 08:02:48 -0700 To: Jerin Jacob Kollanukkaran , David Marchand Cc: dev , Thomas Monjalon , Ben Walker References: <20190708142450.51597-1-jerinj@marvell.com> <0947c33d-b3be-1acc-f98e-3635cc5658d2@intel.com> <5b8685a1-9cd5-4260-4ae9-2ce128d5e3ee@intel.com> From: "Burakov, Anatoly" Message-ID: Date: Tue, 9 Jul 2019 16:02:48 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [EXT] Re: [PATCH] bus/pci: fix IOVA as VA mode selection X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 09-Jul-19 3:58 PM, Jerin Jacob Kollanukkaran wrote: >> -----Original Message----- >> From: Burakov, Anatoly >> Sent: Tuesday, July 9, 2019 8:24 PM >> To: Jerin Jacob Kollanukkaran ; David Marchand >> >> Cc: dev ; Thomas Monjalon ; Ben >> Walker >> Subject: Re: [EXT] Re: [dpdk-dev] [PATCH] bus/pci: fix IOVA as VA mode >> selection >> >> On 09-Jul-19 3:00 PM, Jerin Jacob Kollanukkaran wrote: >>>> -----Original Message----- >>>> From: Burakov, Anatoly >>>> Sent: Tuesday, July 9, 2019 7:00 PM >>>> To: Jerin Jacob Kollanukkaran ; David Marchand >>>> >>>> Cc: dev ; Thomas Monjalon ; >> Ben >>>> Walker >>>> Subject: Re: [EXT] Re: [dpdk-dev] [PATCH] bus/pci: fix IOVA as VA >>>> mode selection >>>> >> >> >> >>>> >>>>> # With top of tree, Currently it never runs in IOVA as VA mode. >>>>> That’s a separate problem to fix. Which effect all the devices >>>>> Currently supporting RTE_PCI_DRV_IOVA_AS_VA. Ie even though >> Device >>>>> support RTE_PCI_DRV_IOVA_AS_VA, it is not running With IOMMU >>>>> protection and/or root privilege is required to run DPDK. >>> >> >> By the way, there seems to be some confusion here. IOVA as PA mode does >> *not* imply running without IOMMU protection. If IOVA as PA mode is used, >> it would require root privileges (to get physical addresses), but the IOMMU >> protection is still enabled. IOMMU doesn't care what you set up your > > Yes. It was thinking more of VFIO perspective. Not igb_uio. > It is the same for both. When IOMMU is fully enabled (iommu=on at boot time), igb_uio will simply not work. VFIO will work, whichever address mode you use. When IOMMU is in pass-through mode (iommu=pt at boot time), both igb_uio and VFIO will work, although igb_uio will only support IOVA as PA mode. Both modes will enable IOMMU, and both can run in IOVA as PA mode without losing that protection. It's only when IOMMU is off, igb_uio will not engage IOMMU, and VFIO will only work in no-IOMMU mode (thus not engaging IOMMU either), and only then you lack the IOMMU protection. -- Thanks, Anatoly