From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ECA0D1CF98 for ; Fri, 26 Jan 2024 15:17:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706282225; cv=none; b=RQSVXtBpbmq8AB4XFi3T7YrGNOIvAW1aGjZn4f8I8YEqPvp8rB2zzKQZeBSU31GS2YGr/dV51PQ20gbnBv2MhymPxCkFi1sPnCOO8mScPCJv7ChL0f72F3g8jGApJRnL0itpNxHeeC1itjaZfRj4sLoWpuZ/QkHPiMKxpD03GXw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706282225; c=relaxed/simple; bh=ycK1Stg6RqUITxTiNF6zYf2SsEC1R2ya33fUNr0wo3M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZfU+FT8VJbV5Gsoj2aTqWeXDIo528J0f4UyscW8Yjrr0JxTE3KrRdsbLYj0lMYMo4hwqiN38fiFuMTmVSAboWc9bBPl9bt0pQfxE/4YXk2Bfjw/B3q7dWjyxQoHTxDLBkAfurWrNJVoYJmpOy7DlXD+fvU4Go8NY7qrtpitG1Mg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=K55Q8KlR; arc=none smtp.client-ip=209.85.167.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="K55Q8KlR" Received: by mail-oi1-f169.google.com with SMTP id 5614622812f47-3bd4e6a7cb0so293187b6e.3 for ; Fri, 26 Jan 2024 07:17:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1706282223; x=1706887023; darn=lists.linux.dev; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ycK1Stg6RqUITxTiNF6zYf2SsEC1R2ya33fUNr0wo3M=; b=K55Q8KlREHjsL/C3PNvf/8e+kpIKtZkj4WRQ+xZTUSKSlLh0MkOwuLQFe08mku1Ys6 8nGUc5KgOTzRsGdWVq+W+iZ9bD9XxQoKYZUZeqSqa+aGWAl0jM/E6qz4i/pWK+nKE6nE v8dOFPKIQCsE/vxW0uGZv9758QD2NkffWf/d1dB3FcO/wppsPQ8NitXya0kpUs2hSUc3 o4X77zD4st/OSCgnIifuIC0EHkvjYL8KGBGmDXEdYQoRcQ/HdfQwZ9l8LXOcnVcHweIP +zwe5MHbN//yrMjN7hOyb4fsCMabaZLxHTdZ/DE36lfSuWlLsIfqAdnBpswo7ogZCT8y 1eCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706282223; x=1706887023; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ycK1Stg6RqUITxTiNF6zYf2SsEC1R2ya33fUNr0wo3M=; b=mTxSVLolk5czz7gdOhIV/ds+h/UNx80aIrCk3GXeD8jn/Wq4NSxq613YEUoGRJOq4T hCpGKT9bYIG+zTliKmuk1zwj9IVq4sjC4qMSIjZueiIo5wU+Zf79nPrAsqvEG43HrrmC yT3eIo1QfYnIEXw+PMpEY0TdlpweV0sK8ObhDCm9HGMD3cQWrVzSuQukAhrKxwJ75J/G ad8vUZ+T6E+AlGwjUTR8R5vujTLjoKM7X79BH6nb9JcTxi0Ob6WDk/O70tA1P3oUufAR wm5DSC9kq6dvSH/0hYfrcdzRlBMJ4trcS/AMk9UMviRZCS1rVr/QPdPY5k+Y+Mlga9qp WzGg== X-Gm-Message-State: AOJu0YyPO7qppjZY3/8nvNwmnmT5Sm/gqVMCuQ/2dj8Zf6l6yFjRpkiz rqNkGcxGSgzmOOY5tiFO5xujoweoDvkaYhNbrDwuVzV2oH+pDJeM8klQw5pjXiI= X-Google-Smtp-Source: AGHT+IFrt9nryZjWKK5XB8rdZZQ0ZLiVll/0WhFtuhH2eLFjwwzfbOmZXs5b/TpVTrjEAEXhJyZ8jA== X-Received: by 2002:a05:6870:b1c4:b0:210:e14a:7a9c with SMTP id x4-20020a056870b1c400b00210e14a7a9cmr1359195oak.58.1706282222837; Fri, 26 Jan 2024 07:17:02 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-68-80-239.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.80.239]) by smtp.gmail.com with ESMTPSA id ns26-20020a056870ac9a00b00210cc6cc9eesm385454oab.33.2024.01.26.07.17.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 07:17:02 -0800 (PST) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1rTNwz-009S0o-4e; Fri, 26 Jan 2024 11:17:01 -0400 Date: Fri, 26 Jan 2024 11:17:01 -0400 From: Jason Gunthorpe To: Shivaprasad G Bhat Cc: iommu@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, aneesh.kumar@kernel.org, naveen.n.rao@linux.ibm.com, jroedel@suse.de, tpearson@raptorengineering.com, aik@amd.com, bgray@linux.ibm.com, gregkh@linuxfoundation.org, gbatra@linux.vnet.ibm.com, vaibhav@linux.ibm.com Subject: Re: [PATCH 1/2] powerpc: iommu: Bring back table group release_ownership() call Message-ID: <20240126151701.GZ50608@ziepe.ca> References: <170618450592.3805.8216395093813382208.stgit@ltcd48-lp2.aus.stglab.ibm.com> <170618451433.3805.9015493852395837391.stgit@ltcd48-lp2.aus.stglab.ibm.com> <20240125155017.GW50608@ziepe.ca> Precedence: bulk X-Mailing-List: iommu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Jan 26, 2024 at 08:43:12PM +0530, Shivaprasad G Bhat wrote: > > Also, is there any chance someone can work on actually fixing this to > > be a proper iommu driver? I think that will become important for power > > to use the common dma_iommu code in the next year... > We are looking into it. Okay, let me know, I can possibly help make parts of this happen power is the last still-current architecture to be outside the modern IOMMU and DMA API design and I'm going to start proposing things that will not be efficient on power because of this. I think a basic iommu driver using the dma API would not be so hard. I don't know what to do about the SPAPR VFIO mess though. :( Jason 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 Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 90E03C47DDF for ; Fri, 26 Jan 2024 15:17:58 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=YdgKWnD6; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4TM1Xj1vc1z3cLY for ; Sat, 27 Jan 2024 02:17:57 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=YdgKWnD6; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ziepe.ca (client-ip=2607:f8b0:4864:20::231; helo=mail-oi1-x231.google.com; envelope-from=jgg@ziepe.ca; receiver=lists.ozlabs.org) Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4TM1Wn1QmQz30Dg for ; Sat, 27 Jan 2024 02:17:07 +1100 (AEDT) Received: by mail-oi1-x231.google.com with SMTP id 5614622812f47-3bd4e6a7cb0so293188b6e.3 for ; Fri, 26 Jan 2024 07:17:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1706282223; x=1706887023; darn=lists.ozlabs.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ycK1Stg6RqUITxTiNF6zYf2SsEC1R2ya33fUNr0wo3M=; b=YdgKWnD6mzYXpBgECyp9yMDoZuPn23K5B2wvFs8BZ8wWxmAMPrMEB+SpSON17TOaoL FKZzHHx/zLhcNlw6W+bRfs7S0sXXsWLsFpne9/ugZ9bYZd1Q2eqYPHUSXXF5F2hz3MOH 3jzTaVjNNb7/vHO+5+jUJv364iDwkyGTHsHnONx88OFRJ6SIA/cJmOXkqqRLNn36j3Ko 0XwVAeT9QNc7ODvduHUD06akOmdBe5j8GyojQw13BQsFyk13GK+FFQ3bfjBQL3qD6a2E KV02a2o28mDmnGj676+g0pjkVIMx6VW6UY0Fa/si+BJzHLmdoMOgX2bBANVA/l4Co8L9 YaJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706282223; x=1706887023; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ycK1Stg6RqUITxTiNF6zYf2SsEC1R2ya33fUNr0wo3M=; b=iN6+WvDE0dvJCGgm1Uq+meZKJ3iNFYTthtY/xovlSOpMoJ0jLASJLIQpWrGKFzFQ/P NKZOSkTnLG5ojECiKpDygE1LIPl7fZHFQduFVSGILGZGgYOCp93mHUg7r9lcnaadkkOO g8Rl5HNr2p7wHhWVUW9vYqyGj7kVLKClc6lPQgGAAAJ4DLXzX6b/1UXkOrNCc6V8SNnI /5jNWLikoRkuWjxy/ZVwTFD9bO0S+wH/3nS8BtaBYIxNEgw5WlbRjedKNIYo5xZ+X7rP u41SSvEE+QYrBNxLvPpnRLcDc50FLMcLgvkV9LP+e0OCK9kcjdjG37DZrDQpMQ0x9apv IdqA== X-Gm-Message-State: AOJu0Yz9aNiQku5BPLYLdjZrrvdWaxdOi1OXW/k+V71FPtBMLgmiSEeQ MRFSoXLNDHVLQ7m5ACa14fW1qBsAGW/qAl87N38/hYBT+uB0NM8PLZJGdfaIUtg= X-Google-Smtp-Source: AGHT+IFrt9nryZjWKK5XB8rdZZQ0ZLiVll/0WhFtuhH2eLFjwwzfbOmZXs5b/TpVTrjEAEXhJyZ8jA== X-Received: by 2002:a05:6870:b1c4:b0:210:e14a:7a9c with SMTP id x4-20020a056870b1c400b00210e14a7a9cmr1359195oak.58.1706282222837; Fri, 26 Jan 2024 07:17:02 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-68-80-239.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.80.239]) by smtp.gmail.com with ESMTPSA id ns26-20020a056870ac9a00b00210cc6cc9eesm385454oab.33.2024.01.26.07.17.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 07:17:02 -0800 (PST) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1rTNwz-009S0o-4e; Fri, 26 Jan 2024 11:17:01 -0400 Date: Fri, 26 Jan 2024 11:17:01 -0400 From: Jason Gunthorpe To: Shivaprasad G Bhat Subject: Re: [PATCH 1/2] powerpc: iommu: Bring back table group release_ownership() call Message-ID: <20240126151701.GZ50608@ziepe.ca> References: <170618450592.3805.8216395093813382208.stgit@ltcd48-lp2.aus.stglab.ibm.com> <170618451433.3805.9015493852395837391.stgit@ltcd48-lp2.aus.stglab.ibm.com> <20240125155017.GW50608@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jroedel@suse.de, gbatra@linux.vnet.ibm.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, aneesh.kumar@kernel.org, tpearson@raptorengineering.com, iommu@lists.linux.dev, npiggin@gmail.com, bgray@linux.ibm.com, naveen.n.rao@linux.ibm.com, vaibhav@linux.ibm.com, linuxppc-dev@lists.ozlabs.org, aik@amd.com Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, Jan 26, 2024 at 08:43:12PM +0530, Shivaprasad G Bhat wrote: > > Also, is there any chance someone can work on actually fixing this to > > be a proper iommu driver? I think that will become important for power > > to use the common dma_iommu code in the next year... > We are looking into it. Okay, let me know, I can possibly help make parts of this happen power is the last still-current architecture to be outside the modern IOMMU and DMA API design and I'm going to start proposing things that will not be efficient on power because of this. I think a basic iommu driver using the dma API would not be so hard. I don't know what to do about the SPAPR VFIO mess though. :( Jason