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=-8.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 E6C6CC433E0 for ; Wed, 20 Jan 2021 17:50:57 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8C4A823122 for ; Wed, 20 Jan 2021 17:50:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C4A823122 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SGSG5DeK8nrnO1K5ndBxHu+m2jRCxYZ7EbOQOOL5CEs=; b=Z9arupQgCaXoIWojp7gYtcvBM HxNnRmC8vNCsy/njd1w/4z3bhekmnjZ+OZiIPxxp4xtTHdAzJ1ZvETBXD+pfWopL0jbeToEDEizOM wjDSl3A34fwZCe1Uq0JhaaAKUHBpnU1Q6QtWXXFU4MQRVcsOwPpGTw6EIFAF4rgX0vEkjfgNKeFDp P/C//VLV8FIm2bOD8os5p41VcAQxroUM6m+3wx/yKluKGPmtelYrZK2JgksjSYqCrGu1K+IpZFzvz jDNzIuzrwAlPp+zeR5hLFiS2R/Wdx2++2EoAeydkbdvBp8fX2iOYqbLdP1+MJ396umhyUO+3cBWhp 6sIWi2RQA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2Hb7-0008Qk-T6; Wed, 20 Jan 2021 17:48:49 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2HWm-0005zC-5Z for linux-arm-kernel@lists.infradead.org; Wed, 20 Jan 2021 17:44:21 +0000 Received: by mail-wm1-x335.google.com with SMTP id m2so3574325wmm.1 for ; Wed, 20 Jan 2021 09:44:17 -0800 (PST) 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=XBDrkS1oD3yusqtA8y0OBGE63KTKv7F+ZOLzwqVkI2I=; b=PdmTfH14kG9PRl6fGS7BmdZgTQAEoANTBqMuycLSr30LXege/CoUiWzaSqCLGm9c0E OI5hofRqmHOYjYrnWw5TlLT2waLaHAR/y+gHT0mYHh6UMy4e0XQNPurmj2iVa6jhLXxm uLSuG38XTI7ml4u9pnqSDqXE0ULlRCVhq/fJt+40bn7r6BGPSLKVZRvBwKjFwIzSrWC7 StUUBtbaje0KKajzY/K3QxyN0qRQ2Z2LehH7r9LDgrZWXV8K/7W44Bx65lZ6pmR/0y2W eemmnDKNS6i14YBxwZsqnXg4duRbp2D87JDFqo+paL4iFEDj4k1WBs/jW9Vr5C3Kjj/0 IsAQ== 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=XBDrkS1oD3yusqtA8y0OBGE63KTKv7F+ZOLzwqVkI2I=; b=TALf5Vha7bmXYrRw+J2GVUIQVfgYaW6mg5YdMhM0rzVyhp+7tmsaBBl+T5zj8tnOul KPt9xjnNKi0cH8cRw3bEFTfGOc4Af+uWE+G7hQICgxAhMPiOjW2LhW1nsBfUYisJnbvK 1aS38j4j/ICzbJLAg+nX7n/NzdSyneiikBMAh9uJc8o46G6IIQkv0rJN5sXnJ9OIF3kB dz/J9Lzdf+5duPkkdXZgYRZ09apzZh+CDSy5Jn1Hn/e7qDqgAOcY1+2WrOK/2RfKwoN1 kKFGxvYcszDIhZWBY45ksKaZkw2wNXEaUpkcrOq0Zt2+wfNTVaKNxzKEEE5V7yYzus8r Xi8g== X-Gm-Message-State: AOAM531npW6OX6Ec36m+uh6GExv+Sor+a5cSgFLwTqhCYsVWg6rEljS9 UfVe/DxLpK7v1XBj1AexG+UhvQ== X-Google-Smtp-Source: ABdhPJwfZJ22FxfOkxX1mD/qmpstD9sUNv3GPJc1IViT4T+eQrVlLm/n8Bui8NwhbrvqMvOjfSDKmg== X-Received: by 2002:a7b:c00a:: with SMTP id c10mr5280073wmb.66.1611164656382; Wed, 20 Jan 2021 09:44:16 -0800 (PST) Received: from myrica ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id f68sm5575012wmf.6.2021.01.20.09.44.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 09:44:15 -0800 (PST) Date: Wed, 20 Jan 2021 18:43:55 +0100 From: Jean-Philippe Brucker To: Jonathan Cameron Subject: Re: [PATCH v9 06/10] iommu: Add a page fault handler Message-ID: References: <20210108145217.2254447-1-jean-philippe@linaro.org> <20210108145217.2254447-7-jean-philippe@linaro.org> <20210119133819.000015f6@Huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210119133819.000015f6@Huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210120_124420_269853_3FFF6A53 X-CRM114-Status: GOOD ( 19.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, lorenzo.pieralisi@arm.com, linux-acpi@vger.kernel.org, robin.murphy@arm.com, joro@8bytes.org, guohanjun@huawei.com, rjw@rjwysocki.net, shameerali.kolothum.thodi@huawei.com, eric.auger@redhat.com, iommu@lists.linux-foundation.org, robh+dt@kernel.org, linux-accelerators@lists.ozlabs.org, sudeep.holla@arm.com, vivek.gautam@arm.com, zhangfei.gao@linaro.org, baolu.lu@linux.intel.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, lenb@kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jan 19, 2021 at 01:38:19PM +0000, Jonathan Cameron wrote: > On Fri, 8 Jan 2021 15:52:14 +0100 > Jean-Philippe Brucker wrote: > > > Some systems allow devices to handle I/O Page Faults in the core mm. For > > example systems implementing the PCIe PRI extension or Arm SMMU stall > > model. Infrastructure for reporting these recoverable page faults was > > added to the IOMMU core by commit 0c830e6b3282 ("iommu: Introduce device > > fault report API"). Add a page fault handler for host SVA. > > > > IOMMU driver can now instantiate several fault workqueues and link them > > to IOPF-capable devices. Drivers can choose between a single global > > workqueue, one per IOMMU device, one per low-level fault queue, one per > > domain, etc. > > > > When it receives a fault event, supposedly in an IRQ handler, the IOMMU > > Why "supposedly"? Do you mean "most commonly" > > > driver reports the fault using iommu_report_device_fault(), which calls > > the registered handler. The page fault handler then calls the mm fault > > handler, and reports either success or failure with iommu_page_response(). > > When the handler succeeds, the IOMMU retries the access. > > For PRI that description is perhaps a bit missleading. IIRC the IOMMU > will only retry when it gets a new ATS query. > > > > > The iopf_param pointer could be embedded into iommu_fault_param. But > > putting iopf_param into the iommu_param structure allows us not to care > > about ordering between calls to iopf_queue_add_device() and > > iommu_register_device_fault_handler(). > > > > Signed-off-by: Jean-Philippe Brucker > > One really minor inconsistency inline that made me look twice.. > With or without that tided up FWIW. > > Reviewed-by: Jonathan Cameron Thanks! I'll fix these up and resend Jean _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel