Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp683052rdb; Fri, 26 Jan 2024 07:40:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IESfIYcKPd0LFXTmVM9a3cwdiI4OcfoGM1r0rNvxY7GQfn+9SZ5hDdNmRdDjBLAymhidnNb X-Received: by 2002:a2e:a36b:0:b0:2cd:35d6:d72b with SMTP id i11-20020a2ea36b000000b002cd35d6d72bmr988816ljn.69.1706283610481; Fri, 26 Jan 2024 07:40:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706283610; cv=pass; d=google.com; s=arc-20160816; b=ei2xvvWEnjDzsMHRK1VnM1S9PDccov4IulAvMCU1gHruUupwuG9rOS2iPikvqVkPIS kkpDRSRGlL4kMIKt4Ru8a8B6vDwmtlG6ar/3PAv1nqACIq0IVUE+r1RZs/2K9xzZDgxg V4eaJhQOQzMsLPQLLa7tUwbLL5xDeCqieaQos88pfr2QaCSy/Gz3AJYDwC6SHtWg4Cwz phpt9sY9//FEt2JZfHn+zp63ZWZaeadIrEhd/Tkt+Ppvlg9W8tJpSQF2tK0UkJ3RJ6N9 nLHxydBN1L6yhjt9yRWeKyG/1xXfeCaG23Lk8WmnMmvdJGChfMAccGflFHPS1D92Ozxh 4hag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=thread-index:thread-topic:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject :references:in-reply-to:message-id:cc:to:from:date:dkim-signature :dkim-filter; bh=OoH5zbIDpJ396eDy00lpvlhmn5YGipLNWyOVCXIxgwA=; fh=nHKu8u4AfE6iMR4ipjWlB0r8MiVNEjGhw8iafZAWE/4=; b=ZgrzUPNvln1hnS/ArviCoBeEeMPfNaaKmShCWSFqyMpdBh8gEFQs7ckrYXpYTYKTyl uPYjKKnF3NFHgE2haKHjrvpJf2VpGN3GZS7wfINCZ5iHCRO09SDaZnbPxHDsH112r8AH KNIZUZFGCyXk19vOwXc7nBH3NKfDqEcmqjk0kY3m/ThLFfKn9xgwk/0wHguKgJTuaw5b nUCNBaG1qx/rkklT9vHGFeoMlerZVqPkG/PGNTZIUVC4rYk9Bsk+Tyr4j6PYmNMw0Uy3 zOdncXBLH0b5nA6geBhg6WN3wEKW2oSBgMA8MEUNGneazyNr/yjdTdu0cKeXwmYD3+Qe Jz+g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@raptorengineering.com header.s=B8E824E6-0BE2-11E6-931D-288C65937AAD header.b=ZNQ6O6b4; arc=pass (i=1 spf=pass spfdomain=raptorengineering.com dkim=pass dkdomain=raptorengineering.com dmarc=pass fromdomain=raptorengineering.com); spf=pass (google.com: domain of linux-kernel+bounces-40288-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40288-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=raptorengineering.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t28-20020a056402241c00b005597f34ece0si817116eda.313.2024.01.26.07.40.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 07:40:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40288-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@raptorengineering.com header.s=B8E824E6-0BE2-11E6-931D-288C65937AAD header.b=ZNQ6O6b4; arc=pass (i=1 spf=pass spfdomain=raptorengineering.com dkim=pass dkdomain=raptorengineering.com dmarc=pass fromdomain=raptorengineering.com); spf=pass (google.com: domain of linux-kernel+bounces-40288-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40288-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=raptorengineering.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 122061F23C05 for ; Fri, 26 Jan 2024 15:40:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A44581CFBF; Fri, 26 Jan 2024 15:40:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=raptorengineering.com header.i=@raptorengineering.com header.b="ZNQ6O6b4" Received: from raptorengineering.com (mail.raptorengineering.com [23.155.224.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E3EDC1CFB6 for ; Fri, 26 Jan 2024 15:40:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=23.155.224.40 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706283602; cv=none; b=kWrKVuszpDMYLJs5nCnfCYqtUhPQ97OvGa/+xJCCG4DDlr4v8pKCnhRIDwxNHU6ibTSIgc7jnU4Re0eKjjKnngZicxG3OzsQhx2vKvo5bQ7cZv4LILfqetqSxd6bM3dJ6uNRc0jadct/SpmxW6z4sh39puESfTuyJ0be0ou26Ig= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706283602; c=relaxed/simple; bh=zBCpP/8P5unyNO74Or9XNCmXRLENo8U5VyimSHB3VpM=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type; b=Ggt/7NYSRDHLUzuVFMJIMQVNMKgCtl34ElxAohjcHwrx7qEBlPJM21Vojq1eDwq3YrviW7dURL06hvTys4kPuycTt2VFtiRI+9Rdcv+5r1paiFxAdfJxFo09rNdKA7tVAen/CKPqKdNNlLxEvzv+KZq76IPo9sbY6qT8ak0G3WA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=raptorengineering.com; spf=pass smtp.mailfrom=raptorengineering.com; dkim=pass (1024-bit key) header.d=raptorengineering.com header.i=@raptorengineering.com header.b=ZNQ6O6b4; arc=none smtp.client-ip=23.155.224.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=raptorengineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=raptorengineering.com Received: from localhost (localhost [127.0.0.1]) by mail.rptsys.com (Postfix) with ESMTP id E6FDE8284F1B; Fri, 26 Jan 2024 09:39:59 -0600 (CST) Received: from mail.rptsys.com ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ky2a-k1hCssy; Fri, 26 Jan 2024 09:39:59 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.rptsys.com (Postfix) with ESMTP id D322782854B8; Fri, 26 Jan 2024 09:39:58 -0600 (CST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.rptsys.com D322782854B8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raptorengineering.com; s=B8E824E6-0BE2-11E6-931D-288C65937AAD; t=1706283598; bh=OoH5zbIDpJ396eDy00lpvlhmn5YGipLNWyOVCXIxgwA=; h=Date:From:To:Message-ID:MIME-Version; b=ZNQ6O6b4mOaP6wy15ucg53rS7Hz3n8WNMxH9tAlODg32Ac+qNaqLgx5lQ0DTT8rdh t2LEG8qSuyTGN4ZIA2ajj6NaCNvubCswJRn6u6jlUux0bR3RwCuxeTeRrRVYbmmdTQ 94Q4APuxwOswDXRHPHiNP/t48za48GveP4oVJVA8= X-Virus-Scanned: amavisd-new at rptsys.com Received: from mail.rptsys.com ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id uQvmigmfI0wM; Fri, 26 Jan 2024 09:39:58 -0600 (CST) Received: from vali.starlink.edu (localhost [127.0.0.1]) by mail.rptsys.com (Postfix) with ESMTP id 8E9328284F1B; Fri, 26 Jan 2024 09:39:58 -0600 (CST) Date: Fri, 26 Jan 2024 09:39:56 -0600 (CST) From: Timothy Pearson To: Jason Gunthorpe Cc: Timothy Pearson , Shivaprasad G Bhat , iommu , linuxppc-dev , linux-kernel , Michael Ellerman , npiggin , christophe leroy , aneesh kumar , naveen n rao , jroedel , aik , bgray , Greg Kroah-Hartman , gbatra , vaibhav Message-ID: <1453449220.10126352.1706283596477.JavaMail.zimbra@raptorengineeringinc.com> In-Reply-To: <20240126153806.GA50608@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> <20240126151701.GZ50608@ziepe.ca> <392247278.10124607.1706282995795.JavaMail.zimbra@raptorengineeringinc.com> <20240126153806.GA50608@ziepe.ca> Subject: Re: [PATCH 1/2] powerpc: iommu: Bring back table group release_ownership() call Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mailer: Zimbra 8.5.0_GA_3042 (ZimbraWebClient - GC112 (Linux)/8.5.0_GA_3042) Thread-Topic: powerpc: iommu: Bring back table group release_ownership() call Thread-Index: LjsszU7HTiVuL5lSzea+joNjeMRWPw== ----- Original Message ----- > From: "Jason Gunthorpe" > To: "Timothy Pearson" > Cc: "Shivaprasad G Bhat" , "iommu" , "linuxppc-dev" > , "linux-kernel" , "Michael Ellerman" > , "npiggin" , "christophe leroy" , "aneesh kumar" > , "naveen n rao" , "jroedel" , "aik" > , "bgray" , "Greg Kroah-Hartman" , "gbatra" > , "vaibhav" > Sent: Friday, January 26, 2024 9:38:06 AM > Subject: Re: [PATCH 1/2] powerpc: iommu: Bring back table group release_ownership() call > On Fri, Jan 26, 2024 at 09:29:55AM -0600, Timothy Pearson wrote: >> > 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 can get development resources on this fairly rapidly, including >> testing. We should figure out the best way forward and how to deal >> with the VFIO side of things, even if that's a rewrite at the end of >> the day the machine-specific codebase isn't *that* large for our two >> target flavors (64-bit PowerNV and 64-bit pSeries). > > I have a feeling the way forward is to just start a power driver under > drivers/iommu/ and use kconfig to make the user exclusively select > either the legacy arch or the modern iommu. > > Get that working to a level where dma_iommu is happy. > > Get iommufd support in the new driver good enough to run your > application. > > Just forget about the weird KVM and SPAPR stuff, leave it under the > kconfig of the old code and nobody will run it. Almost nobody already > runs it, apparently. We actually use QEMU/KVM/VFIO extensively at Raptor, so need the support and need it to be performant... > Remove it in a few years > > From what I remember the code under the arch directory is already very > nearly almost an iommu driver. I think someone could fairly quickly > get to something working and using dma_iommu.c. If s390 is any > experience there is some benchmarking and tweaking to get performance > equal to the arch's tweaked dma_iommu copy. > > Jason