From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8AE0AA00E6 for ; Tue, 9 Jul 2019 17:03:03 +0200 (CEST) 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