Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp404412pxv; Thu, 24 Jun 2021 10:24:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwD0OaGYvjIYprXU+g0AICMYfuBGzspMkvpb6vbzJDrb54RHrbf6/aGFOSwA8GXrXat9BhV X-Received: by 2002:a02:ba0a:: with SMTP id z10mr5668412jan.10.1624555485134; Thu, 24 Jun 2021 10:24:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624555485; cv=none; d=google.com; s=arc-20160816; b=hnEMQelKRrf7mLbhZ5sTVS/OEaXeVBi/Hmm0SOTN1rmVw88UaGtBA5Ud9r1kpyPFVd LPKopYexoRGtgcwT5mn87mee59wZ5a1q24AmLM75JV7tnaybGWgo4Mrk+3x2WEqvCMEC qx+k/mbQwsWK9QMgIEJl2GjYXBakxKLVFCWzZpj1X6cVQiCoLxVmWsngHJ2+RV2i3t1H UWA8spIfvNoUKJEBhNhdPe1g4jz7uFXvm1v1jcJF86TMf8e0mWmfOSIpu7Mknm05r5SW /kXedY2J5Ub4gUwVFh8QwypbmKpSSnniJ/WS58My0GuY5dwWz2/TM73iLZwDmhxw3p6l shwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+rsHIuusfgMY4pqsH67Cui+AEpTgqc5yU+NQJneTe3I=; b=wuVBhKhg/IqQ7jdD+MzimXaX+RL6swqgUn1KF9UILjqQnY+nu6x/zxadTGG+Gy1rzf AxSJEemGA7CkL2EJb9m8a7416WOdsuSQtz0YemKMrvFQ9ht8pggKnsGxY/0274Fw85io 5HhEGlVmDVQBauzDkQR7kZHeYWOL2ayrmx2ZfpYC7erTZ6vbXs6ZhYaFpwO33wQUPkmU 3ej/P3NNXiO4BQ4pN/zccJiIM6epW+WdzbqQPDqFy5ofmsQjRTRmYfI2C3oVjJ8RhUqZ 3SA0+bCYPZDUOtcRnqGChJG4AmExANidgDRrdXUj+gUCYRtaJgEN2ClNEZsj4HdYp2ME gHIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nBGujxle; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p14si4936695ilo.118.2021.06.24.10.24.32; Thu, 24 Jun 2021 10:24:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nBGujxle; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232311AbhFXRZt (ORCPT + 99 others); Thu, 24 Jun 2021 13:25:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229573AbhFXRZs (ORCPT ); Thu, 24 Jun 2021 13:25:48 -0400 Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DC13C061574 for ; Thu, 24 Jun 2021 10:23:29 -0700 (PDT) Received: by mail-qk1-x731.google.com with SMTP id bm25so16298064qkb.0 for ; Thu, 24 Jun 2021 10:23:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+rsHIuusfgMY4pqsH67Cui+AEpTgqc5yU+NQJneTe3I=; b=nBGujxlend0FDFpaE8uA1VUl+5W3aXuZOEudrIKeZDfQ/+pPr4z/II/WEyNd+uPN26 soAHBGP+8BikRpyXJAG3b8cFuHlgqAS3iEFezd2Ak3P1sLNeJUFtACX4Ma/t0C5DxnCj gDadjhrj4RKoBq1/dEScJTk1qx68aEBMsAMaM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+rsHIuusfgMY4pqsH67Cui+AEpTgqc5yU+NQJneTe3I=; b=hpU5L39W9nG2spMKGn2lc4fHT8+2enBpLb7aQATWB9Dr+O+txV74fBQRlwBI9iRDbe WZD/tB+t8ulV7y10VxCPMpG03c9muLK5IMgL9RxFt6e+5ul4tPyxHkOAFnmyo3N6LyDV gRdcHk8jMAiTWgV0YQairFe6QCwTF75IMg0SNQe9USRIYQUdDrcPZGvIbTqg9rmgsfh8 YB+La0VKQTT4d4UsZG0qj4iNZSImbzAWFTkQNQ8OWYHrlIixLBorkOT6G4PpDgNj8v6u LBw5j52kjvfUiTvCKu1xHQK1DzaTeXVId4h6FB227OHbrkditymFFLqOgplUq6ZuluX7 n5rw== X-Gm-Message-State: AOAM532fPuaXyZBIiSTc5Eylg5L83159rzusLWRuTjm32WhMmylHWBxx Egzur0Fa6CZrvwEw4ChuEoYoiwDzvhHTBg== X-Received: by 2002:a05:620a:2f3:: with SMTP id a19mr3249311qko.262.1624555408703; Thu, 24 Jun 2021 10:23:28 -0700 (PDT) Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com. [209.85.219.181]) by smtp.gmail.com with ESMTPSA id k7sm3001816qke.65.2021.06.24.10.23.28 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Jun 2021 10:23:28 -0700 (PDT) Received: by mail-yb1-f181.google.com with SMTP id x189so371095ybg.7 for ; Thu, 24 Jun 2021 10:23:28 -0700 (PDT) X-Received: by 2002:a25:2405:: with SMTP id k5mr6470962ybk.405.1624555397076; Thu, 24 Jun 2021 10:23:17 -0700 (PDT) MIME-Version: 1.0 References: <20210621235248.2521620-1-dianders@chromium.org> <067dd86d-da7f-ac83-6ce6-b8fd5aba0b6f@arm.com> <498f3184-99fe-c21b-0eb0-a199f2615ceb@arm.com> In-Reply-To: From: Doug Anderson Date: Thu, 24 Jun 2021 10:23:05 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/6] iommu: Enable devices to request non-strict DMA, starting with QCom SD/MMC To: Robin Murphy Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , "Rafael J. Wysocki" , Will Deacon , Joerg Roedel , Bjorn Andersson , Ulf Hansson , Adrian Hunter , Bjorn Helgaas , Rob Clark , linux-arm-msm , linux-pci@vger.kernel.org, quic_c_gdjako@quicinc.com, "list@263.net:IOMMU DRIVERS" , Sonny Rao , Sai Prakash Ranjan , Linux MMC List , Veerabhadrarao Badiganti , Rajat Jain , Saravana Kannan , Joel Fernandes , Andy Gross , Bartosz Golaszewski , Dan Williams , Geert Uytterhoeven , Heikki Krogerus , Randy Dunlap , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, Jun 23, 2021 at 10:29 AM Doug Anderson wrote: > > * Instead of putting the details in per-device nodes, maybe it makes > sense to accept that we should be specifying these things at the IOMMU > level? If specifying things at the device tree level then the > device-tree node of the IOMMU itself would just have a list of things > that should be strict/non-strict. ...this could potentially be merged > with a hardcoded list of things in the IOMMU driver based on the IOMMU > compatible string. > > Do those sound right? > > I still haven't totally grokked the ideal way to identify devices. I > guess on Qualcomm systems each device is in its own group and so could > have its own strictness levels? ...or would it be better to list by > "stream ID" or something like that? > > If we do something like this then maybe that's a solution that could > land short-ish term? We would know right at init time whether a given > domain should be strict or non-strict and there'd be no requirements > to transition it. OK, so I have attempted to implement this in the Qualcomm IOMMU driver in v2 of this series: https://lore.kernel.org/r/20210624171759.4125094-1-dianders@chromium.org/ Hopefully that doesn't fragment the discussion too much, but it seemed like it might help move us forward to see what this would look like in code. I'll also note that I removed a few people from the CC list on v2 of the series because I'm no longer touching any code outside of the IOMMU subsystem and I thought folks would appreciate less noise in their inboxes. I've CCed a boatload of mailing lists though so it should be easy to find. If I dropped you from the CC list of v2 and you really want back on then I'm more than happy to re-add you. -Doug