Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp920488lqp; Thu, 21 Mar 2024 22:50:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUteGX+82WTEfnZrGz3BxchbKJC4UuZXoDbOEw8NvYODu0SDpZ79MrzSA7IxnI59Ig58hUyguaYMnTbGrjWbLkAJ+LxzT3xy+dVIPXqDQ== X-Google-Smtp-Source: AGHT+IFdzEwcnyH4LfU3+YgV7TPZd6ONwnFUOQYEO/rkWisF+h8omwkc/sqBGcnOCExI/dY1Ko1S X-Received: by 2002:ac8:5d47:0:b0:431:1f0d:9a70 with SMTP id g7-20020ac85d47000000b004311f0d9a70mr1451013qtx.59.1711086604404; Thu, 21 Mar 2024 22:50:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711086604; cv=pass; d=google.com; s=arc-20160816; b=V70Fff01hkmmmb1YQhxP+I1Dm+GLpUQYlv8tj2br7eTmsAv20mVEiU4Ijm1w9EmjTy 9lq9xPE7AkVZRImQ67zVp4eB8F/m/vufM441c+rM4qhMoV8W7MniFG1A5LqvkvYQQ73q cjtjbQvUnMShMPPEFHfnvblh/SxJVbawX/AQ7gj+Vnboz4zBtw0dn31ZEvP8GFyXKIGN XXf/29R52/6XIHwWyu6HjOUadN/tkt+TU0KjkGWBBwVcN+3T7hW1zpxzXg5pf2pIpcnP mPDUmqiTxLlhwvYzugZ8T0N0OwIgltbBYJCBHfkmwOL0LhKaZ6+IFX6G5V8SW7xl50cA udaA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=3dxZ97h1bBewqFSrSCxZ0u2xq2+UB+rYnjeTo4PLAV8=; fh=URrld6KYRiY4BlDzXD/A/epPX49Dhj9w/S+eWXBaUCE=; b=ioObfUN4JVKwMQsSMhjc2gVhADlElWeKaaD8RnmgEEAr69FNOq5djn+UjTBq/yhno7 oxNAJB94ZRpaiezhOqe/0f8szKEnMphNor71o1Mv0Njyxbmxkalp6XgiRzXArO27PSip c44ASS1jsh9xdGVK2dFrgqQfQudzyrjYcngUFRkHYYDisqJeO5IVc2jtnjHPIrgE17n4 AhPmwYG89Kq8HiZ1s5HEYzQ40fMrENnBnUn6eanOZufNycOwkkU+1d/QXSS3qkK9bs5I 39Hty8bI7xZrR+EV2brJul9TeF++i8DqavYutj3y50ztSUvh2AGLjR0/aSr+LKlke/z8 DFPA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=nZ6LzF89; arc=pass (i=1 spf=pass spfdomain=ellerman.id.au dkim=pass dkdomain=ellerman.id.au); spf=pass (google.com: domain of linux-kernel+bounces-110968-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110968-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 12-20020ac8574c000000b0042f512f5df5si1305691qtx.541.2024.03.21.22.50.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 22:50:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-110968-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=nZ6LzF89; arc=pass (i=1 spf=pass spfdomain=ellerman.id.au dkim=pass dkdomain=ellerman.id.au); spf=pass (google.com: domain of linux-kernel+bounces-110968-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110968-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 1EE131C21CD4 for ; Fri, 22 Mar 2024 05:50:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 81514BE4C; Fri, 22 Mar 2024 05:49:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="nZ6LzF89" Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (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 1D9FF4436; Fri, 22 Mar 2024 05:49:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=150.107.74.76 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711086594; cv=none; b=jfGGap4v2l35XgD5eudPeWhAKiuzYwaHjtzKV69aOFpjV5oC4+dHgWHq9kAS5uiyZT8PvbGm21qbVLONNrxyh/3rUMpjQbXtnftLY9rZIh+btkVdNYlHDIFSecRKVsgRMUBtkmxeZ7QBaZp3Rk94TRd5QW+TOcz2wGsBQGAsOGs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711086594; c=relaxed/simple; bh=3dxZ97h1bBewqFSrSCxZ0u2xq2+UB+rYnjeTo4PLAV8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=XcrVCqdG4PfYYUXqV4UXWRjKuAoOD8L5o3C+80jiKU+qkI3hqM1E2vV7PW/N8VMgnSaMUEFv1L0DOe5d3O+t3FsHxKUksuhUNaBcD1Nt+r294rNsIq285NMfJiKwoAuFjQDfwa8an2hCQMAZD3Cj7UDqrDrnXUCC3vfawi9qpZw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au; spf=pass smtp.mailfrom=ellerman.id.au; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b=nZ6LzF89; arc=none smtp.client-ip=150.107.74.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ellerman.id.au DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1711086589; bh=3dxZ97h1bBewqFSrSCxZ0u2xq2+UB+rYnjeTo4PLAV8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=nZ6LzF89AlrxXzDXd3QYUcFV677SbDrpe7d8wTOKSI9z4sQrwflKXJiuKHFQPldHU 2zc466eC0WPNUECV45Sx3Xt0p3N3asRi0s9bzaBSan6JBwr3zOhhUVUrDs1T62ksm4 /W+rwkWmzx4DevQBKw1AJzPA5t1pSanKbIirVQKOl1jZT0nVbCmeAEmBtTx/5gJ6ZV tqX6f6KtRH8uWu+PuXX29MEoCpJrX1QM48JFOi26G9jIV+8ciPHjHOwSGf2Y6qiB9B GXhmKc0DU09lOC4tOeZLYPTsZblimmwcieKRF01BNk/vB3B1f4up32uBu2biiUybfD VUSx1SnXOjBrQ== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4V1BHF6qs1z4wcF; Fri, 22 Mar 2024 16:49:45 +1100 (AEDT) From: Michael Ellerman To: Jason Gunthorpe , Shivaprasad G Bhat Cc: tpearson@raptorengineering.com, alex.williamson@redhat.com, linuxppc-dev@lists.ozlabs.org, npiggin@gmail.com, christophe.leroy@csgroup.eu, aneesh.kumar@kernel.org, naveen.n.rao@linux.ibm.com, gbatra@linux.vnet.ibm.com, brking@linux.vnet.ibm.com, aik@ozlabs.ru, robh@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, aik@amd.com, msuchanek@suse.de, jroedel@suse.de, vaibhav@linux.ibm.com, svaidy@linux.ibm.com Subject: Re: [RFC PATCH 1/3] powerpc/pseries/iommu: Bring back userspace view for single level TCE tables In-Reply-To: <20240319143202.GA66976@ziepe.ca> References: <171026724548.8367.8321359354119254395.stgit@linux.ibm.com> <171026725393.8367.17497620074051138306.stgit@linux.ibm.com> <20240319143202.GA66976@ziepe.ca> Date: Fri, 22 Mar 2024 16:49:43 +1100 Message-ID: <877chuke88.fsf@mail.lhotse> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Jason Gunthorpe writes: > On Tue, Mar 12, 2024 at 01:14:20PM -0500, Shivaprasad G Bhat wrote: >> The commit 090bad39b237a ("powerpc/powernv: Add indirect levels to >> it_userspace") which implemented the tce indirect levels >> support for PowerNV ended up removing the single level support >> which existed by default(generic tce_iommu_userspace_view_alloc/free() >> calls). On pSeries the TCEs are single level, and the allocation >> of userspace view is lost with the removal of generic code. > > :( :( > > If this has been broken since 2018 and nobody cared till now can we > please go in a direction of moving this code to the new iommu APIs > instead of doubling down on more of this old stuff that apparently > almost nobody cares about ?? It's broken *on pseries* (Linux as a guest), but it works fine on powernv (aka bare metal, aka Linux as Hypervisor). What's changed is folks are now testing it on pseries with Linux as a nested hypervisor. cheers