From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.45]) (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 B444C282F27 for ; Mon, 13 Apr 2026 16:10:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776096611; cv=none; b=lSkkjbHflO9aFiEB9PHOOOd+8vwi2wSBXqCAZIDA1YYMkhBz7K6TV+0mWcq/ae5NSWP2Fa2U0N2wcQqO8Sm2sHMOqeoAOKNQ5pJxYOOwyX33vGKWB4cx/ytKk7CT94WOc4PztoOWPzXS8SMibMK4YOKnHOohBqor2or6He5C0Zk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776096611; c=relaxed/simple; bh=C/3T9f7YFyndjPxorE6yY5t66bwUWgJKRml4J+HvRhw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UEMTkuuQYAv212zuJ6szxkmF3M5tOrdJOgp9+M4+dKpl9Z1ZqMhX0qyKOhX62QjQnM7IIbTlGLsJ0Kwj6di1lrA851r4jJ5q1yNzZaCuCIvCIF0B9X0SvFiU6dgbj7gL5hASZiznnTL+/fqcjWlSjG5zhOsG+5WqEFVmCKftz68= 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=ft2hNh5d; arc=none smtp.client-ip=209.85.219.45 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="ft2hNh5d" Received: by mail-qv1-f45.google.com with SMTP id 6a1803df08f44-8a58057d7baso50208386d6.1 for ; Mon, 13 Apr 2026 09:10:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1776096608; x=1776701408; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=miwNbJxKhSdJiq79jVr6441KfZMZND8Kh74V7hAFm/U=; b=ft2hNh5dJiI8Zq6PsvjCI8p6hyatAaBDnT07ikPJnLgn7rSA/2IMGQUq9VZ8RxDsJ2 ah672zSr5vD87jfH7F0J7iBOcRWulBrFip4CJtwCYMvDeCIgEw/SGd2owaDfN8sVP62B 39x/ha2WABFE5Fdr2WhIIah2T3yCLpKzGkbUmYzOmAfkawOw18ojeFo6dnICQ62Wjj5c I+Ds+7TLa6eZebwGz+ZcJSZRQfY5Xkrzv2VW9zSSeEPm3oOJuyejtJDNEi/lgqdkL3ZP 4ow1jlUrIVzsKbexs6EbqczUcrwsNO4IdVzGD4iGG2WRTJdpU/zOMHKwA+hn5vfyGtG0 GgIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776096608; x=1776701408; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=miwNbJxKhSdJiq79jVr6441KfZMZND8Kh74V7hAFm/U=; b=Cu52qyi0zwn45kjga/lFSc0P8XIuNZvZLHfY3/diT1fro/o4lXLWL+b+N/68t2IofK 19mFQvgQGnuZplr+QArK5key6XEfsfoVhaC77hw6XxATtstmA8xh3iFxjxHGbvUv2btC zUX4FYs/msqEoNdSuPAEki+fKzd/XkxiAsXNMvTU6JyEi6WoI2T9TygSkHHTk67UKoNM ba9GtCsqYC+PJvBqqXra5WOv7R+lvRIk64jgG/IF/rkSihGYsIdDmEi4aiXRnK3QWn2h gQimju2BIIRvYnitfuD7saBCA8Y5C2aAbT5WtdESLpEcpJwmqDQ5WD5YenxjQYYKA4rR iaFg== X-Forwarded-Encrypted: i=1; AFNElJ9kCrZ9KRxgj078w+r/8v+9RRIzvhiCcYUuWyheevi/YMTQcHtyN+GXV5Qu5fF0Hvn7550edWjBfGv3MxU=@vger.kernel.org X-Gm-Message-State: AOJu0YxqPj5F02RGLimC0tXph0obBDHPunzbqud9GqPTiT63BK6XFrIU to6VM7AbCE8kkG29xqM+DugxPJ3bg4Pmtf9IpwBPyFd+gImBndQ4SbzdO4mhNY/Z7paWvQmmscU 8pkaO X-Gm-Gg: AeBDieuvyPLUAd80Jok9JqzLPtbjFDGwcLzP+lc9rOyXiP/oBc+lTivjDqXDV2gnxaY POEk9aSv3PTLpbWC6bbxxHOjtt3adiexX1OSMxHziM2bf6jyRVslyFak7rH7nnAjNO81drHMCoX xWyqPKXk7o+GDsq9ReMJ35rgpTVFQ15SPrlLfh15EnrpWy9GpV8K6+ULWnIwBaOfwcIHJbpgSNG uWOsdVF1YGOXN9at8yJ0xNe0+RGrdWPFGvpPWL7JVXqyHuFKc/56q382ogey34PW6/RFMN47d0X yGhPgLdSF2kc7PqcB/501FxHFDu8R5q9T2V6JTlVS5T8HD0953dk0uAJKOdD4s5idfj6gozIf9l 4sAY+zcRGcR+AYcUKMUGUGaidtWpO9u1Ex/K/Dzt4qnaQveHlaS5Opu2wi5/YPaA58rPhXnSP6+ tHx1INJmTyEExZifjbR/NNTIif5Tkjam4hQaD+26eMJDd7Xa6ZZFKOgwoOxSSWTK7PDdJlCR8Y3 nl5hnhcmzDwkesv X-Received: by 2002:a0c:f089:0:b0:89c:3f22:c89e with SMTP id 6a1803df08f44-8ac861fd45amr187179046d6.24.1776096608349; Mon, 13 Apr 2026 09:10:08 -0700 (PDT) Received: from ziepe.ca (crbknf0213w-47-54-130-67.pppoe-dynamic.high-speed.nl.bellaliant.net. [47.54.130.67]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8ac84a10e7esm99025496d6.16.2026.04.13.09.10.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Apr 2026 09:10:07 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1wCJrS-00000005PqT-111F; Mon, 13 Apr 2026 13:10:06 -0300 Date: Mon, 13 Apr 2026 13:10:06 -0300 From: Jason Gunthorpe To: "Aneesh Kumar K.V" Cc: Mostafa Saleh , iommu@lists.linux.dev, linux-kernel@vger.kernel.org, robin.murphy@arm.com, m.szyprowski@samsung.com, will@kernel.org, maz@kernel.org, suzuki.poulose@arm.com, catalin.marinas@arm.com, jiri@resnulli.us Subject: Re: [RFC PATCH v2 1/5] dma-mapping: Avoid double decrypting with DMA_RESTRICTED_POOL Message-ID: <20260413161006.GM3694781@ziepe.ca> References: <20260330145043.1586623-1-smostafa@google.com> <20260330145043.1586623-2-smostafa@google.com> <20260330150654.GA809900@ziepe.ca> <20260413123559.GI3694781@ziepe.ca> 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Apr 13, 2026 at 08:55:28PM +0530, Aneesh Kumar K.V wrote: > Jason Gunthorpe writes: > > > On Mon, Apr 13, 2026 at 11:30:38AM +0530, Aneesh Kumar K.V wrote: > > > >> I know there is a v3, but I’m commenting here to check whether we really > >> need to do this now. In my opinion, we can keep this much simpler by > >> treating all swiotlb allocations as decrypted allocations. > > > > That's not going to work when we get to supporting T=1 devices that > > may still want SWIOTLB for encrypted memory. > > > > Earlier discussions indicated that a T=1 device would not require a > bounce buffer. On ARM, we require such devices to support 64-bit DMA so > they can operate with an unprotected IPA. That was somewhat different. To have a sane system a T=1 device should be able to access unprotected memory and there is no *requirement* that bounce buffering is used. That is very different from saying that SWIOTLB in the kernel is completely broken and unworking on T=1 devices. We should not do that, it should work correctly and we should have a sensible architecture here. It is just something that would never/rarely be triggered. Jason