From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 9011A1B319 for ; Tue, 7 Nov 2017 10:40:17 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 0C1F820C00; Tue, 7 Nov 2017 04:40:17 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 07 Nov 2017 04:40:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=R9kTnnRqgnSVHu0PuOa070aUqA QqufopeT1NhEjaIWw=; b=OIEcCgxYcbQ/28q2n15hz9l5jWxaGPoOf4aYp4r0XX ZS6IneAJCZzis/Tm+zPq6JxEBmXeJq1jJGVhA5BC7uvF0LhCwxNzX3sZYsBfLPfH KTL5RN6ghSGeaBPF420Bw207bgXHwpLxYn6l3UYpRMoNsOBwCHRoBIW2MR87OUa2 g= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=R9kTnn RqgnSVHu0PuOa070aUqAQqufopeT1NhEjaIWw=; b=A9eBK9cPXns6TTP3iPNrlC attn3uy5W7WzjgZyH0mTXBAnUBL3amMZk4uJlxdlYUvnvZ77jDAKQfOsY8AEPicY UXFrO8AEhmKqLQDSgMdamTJ1fUr9yI2NF47zZrITKGN6NvO4B4s5rgjMR/99XEJQ bQa8fTdsZ9BoFi0xRUyJKrGwUtdMXX1FFIN86kQClOYwwwWs9sHCPB2QHaCHJCjS GnNkC5Eyf5yEHOcy53H8YCTRd4dwdM2gBOlnXnJ1nk8yAGT1B81NVsOfOQdKG399 tKfumJ2YQ7tmN0kYJQNR773VHALYfPusHgvlTOOq6LHTafR19SLMt94k2XF5aAvA == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id B802D241BE; Tue, 7 Nov 2017 04:40:16 -0500 (EST) From: Thomas Monjalon To: Jonas Pfefferle1 , anatoly.burakov@intel.com Cc: dev@dpdk.org Date: Tue, 07 Nov 2017 10:40:15 +0100 Message-ID: <3858523.3OloCCdIaW@xps> In-Reply-To: References: <1509465586-7436-1-git-send-email-jpf@zurich.ibm.com> <3884119.bRk7rexRDt@xps> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] vfio: noiommu check error handling 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: , X-List-Received-Date: Tue, 07 Nov 2017 09:40:17 -0000 07/11/2017 10:05, Jonas Pfefferle1: > Thomas Monjalon wrote on 11/06/2017 09:25:15 PM: > > > From: Thomas Monjalon > > To: Jonas Pfefferle , anatoly.burakov@intel.com > > Cc: dev@dpdk.org > > Date: 11/06/2017 09:55 PM > > Subject: Re: [dpdk-dev] [PATCH v2] vfio: noiommu check error handling > > > > 31/10/2017 16:59, Jonas Pfefferle: > > > Check and report errors on open/read in noiommu check. > > > > > > Signed-off-by: Jonas Pfefferle > > > > I cannot decide to apply this patch as it does not explain what > > it is fixing, and as it is not reviewed. > > > > This patch adds error handling and logging to the noiommu check. > Also, on older kernels when the noiommu_enable file does not exist it > assumes noiommu is not enabled instead of returning -1. > Note that in rte_pci_get_iommu_class (drivers/bus/pci/linux/pci.c) > is the only usage of the function and it assumes return == 1: > noiommu is enabled any other return value noiommu disabled, i.e. > my code change does not change the behavior of this function. > We might want to check for errors in rte_pci_get_iommu_class > as well since assuming it is not enabled when we cannot open > and read it might lead to iova == VA being used even if noiommu is > enabled. > > All this comes back to what I proposed before: instead of > the noiommu and PPC64 check we should decide which iova mode > to use depending on the iommu types available. > The type should be already available at the point where we > decide on the iova type. > (iommu types supported is checked by vfio_get_container_fd) Is there something urgent for 17.11? Or can it be refined in 18.02? Anatoly, any thought?