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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE433C2BB85 for ; Thu, 16 Apr 2020 08:54:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 472852078B for ; Thu, 16 Apr 2020 08:54:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="LLp5LveC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 472852078B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B55538E009D; Thu, 16 Apr 2020 04:54:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id ADF698E0001; Thu, 16 Apr 2020 04:54:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 980628E009D; Thu, 16 Apr 2020 04:54:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0035.hostedemail.com [216.40.44.35]) by kanga.kvack.org (Postfix) with ESMTP id 7945A8E0001 for ; Thu, 16 Apr 2020 04:54:13 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 28C00181AEF1A for ; Thu, 16 Apr 2020 08:54:13 +0000 (UTC) X-FDA: 76713106386.05.base54_24ce4a9e75301 X-HE-Tag: base54_24ce4a9e75301 X-Filterd-Recvd-Size: 3939 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Thu, 16 Apr 2020 08:54:12 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id x18so3902269wrq.2 for ; Thu, 16 Apr 2020 01:54:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ZEfcdbyCoFlwcBaVZ+sf0k9hPs9ies0vbK3IcfLzskw=; b=LLp5LveCwz1C/4FgavId+LAMO+lPQeQAh5i6g/dwBkd5KRmxdDAOZ9/FDSM6LaE2DO Td6D1PD2vfJMUfU418BKIvqN2n542k0/GOSD1zFfk3KEg6YVnVpiYcQElgtfTWfhW1Hc pyRHcoAoIzLIeqmthE1eiaqNblTBPZh2QK//NuiYOH4m49CJlMjlge+Af8W0dLnPXfDM TI6i6FGWr2uL3dkWfiES2q+uTGrtmI8VH2eWwpnuQoWS1aDfIKdtLlIrcAMs/dkatob5 C2RU6qFiWHenxSdOpD61IuhKr0PagtaYgwqeoLijcAccCZ9r8LhwudjqfQNZwoQRmc4d jdrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ZEfcdbyCoFlwcBaVZ+sf0k9hPs9ies0vbK3IcfLzskw=; b=l9JeHz7Td+WSS87JltxxIEzz1pDctDjq7wRj6xkhy2I7t+yi4k/KySZbah8xA53jUi juKJaTycHUleHrMFBu4WK4bQaFgbROnrRTZuPRpd34tp56Z0H7Y47vFAp8WubkpgJNJo ftFWdZLsLBvoSPFfJGz6seJNmHJ1HBPafW9TGuXqdQrvnWPr4SZhOfGrhqQlePea/3hx CXJs39g7yd8bwiBMhBOdZXm/2gsgtTaWipsGRxzXGCzlzmPfucz0BzoY4kDpYL8KDrJV RNTD7/UDDnocOIWn1dQDAIaIBlaZmx/oTxMUvDJGif1t0UBM0rjXOmsGuISfy7BTsWhu zuAg== X-Gm-Message-State: AGi0PuZ3ExYrLp8QPMXbdO7sTivfqKPryqeSrrFYdcepCoRwRDddG2A4 JJ4btRc9f7FpiUm2uAsUbLeuyg== X-Google-Smtp-Source: APiQypL1oyr16FXQx+dkfWQBU6EhMLZhnOgOJbCMSB0gnYSQVADLx4g3CAzdUNtaCRw76OTkBu7LoA== X-Received: by 2002:a5d:6305:: with SMTP id i5mr34790010wru.203.1587027251542; Thu, 16 Apr 2020 01:54:11 -0700 (PDT) Received: from myrica ([2001:171b:226b:54a0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id u7sm3027041wmg.41.2020.04.16.01.54.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 01:54:11 -0700 (PDT) Date: Thu, 16 Apr 2020 10:54:02 +0200 From: Jean-Philippe Brucker To: Christoph Hellwig Cc: iommu@lists.linux-foundation.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, joro@8bytes.org, catalin.marinas@arm.com, will@kernel.org, robin.murphy@arm.com, kevin.tian@intel.com, baolu.lu@linux.intel.com, Jonathan.Cameron@huawei.com, jacob.jun.pan@linux.intel.com, christian.koenig@amd.com, zhangfei.gao@linaro.org, jgg@ziepe.ca, xuzaibo@huawei.com Subject: Re: [PATCH v5 02/25] iommu/sva: Manage process address spaces Message-ID: <20200416085402.GB1286150@myrica> References: <20200414170252.714402-1-jean-philippe@linaro.org> <20200414170252.714402-3-jean-philippe@linaro.org> <20200416072852.GA32000@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200416072852.GA32000@infradead.org> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Apr 16, 2020 at 12:28:52AM -0700, Christoph Hellwig wrote: > > + rcu_read_lock(); > > + hlist_for_each_entry_rcu(bond, &io_mm->devices, mm_node) > > + io_mm->ops->invalidate(bond->sva.dev, io_mm->pasid, io_mm->ctx, > > + start, end - start); > > + rcu_read_unlock(); > > +} > > What is the reason that the devices don't register their own notifiers? > This kinds of multiplexing is always rather messy, and you do it for > all the methods. This sends TLB and ATC invalidations through the IOMMU, it doesn't go through device drivers Thanks, Jean