Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3983C7618A for ; Mon, 20 Mar 2023 13:35:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231153AbjCTNfb (ORCPT ); Mon, 20 Mar 2023 09:35:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231431AbjCTNfT (ORCPT ); Mon, 20 Mar 2023 09:35:19 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 667B8FF18; Mon, 20 Mar 2023 06:35:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=HwTdN3GBL4Kthfdvn83f/oC/vgkDbOjy8uf52YF/ONA=; b=z4+8PvzWgNfF3prAWk3ZA8V+61 BjItwaE128uM4ETKSFEQ5GdJE2ACm6U2AC2N2pbzrL7BOndLExMSFaEX3IJiYAH01GVuHuwRwGgn2 eTqyqDiV3lvnMS0c7yEZEeI1w2TcCveOcYpOyaKH9gdtV0GbItHaEl761WRUigJmguULxadcHyajr Y0A6BLGlNJttiGwP78SJjJemrKQEqYGtDbitbEsY4b8L2fFN+FFKHxsQ7berkFBBGp43Baqv4bSY0 OHgOsSKuuLtSNUL7pJ24EJoCzsFEN0OFxt25qYxGFcuFt11Nn2bQoNZTxDTgJdA1sEkl3daG/D7/d 5Cn35iSg==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1peFfM-009CWS-2i; Mon, 20 Mar 2023 13:35:12 +0000 Date: Mon, 20 Mar 2023 06:35:12 -0700 From: Christoph Hellwig To: Fenghua Yu Cc: Baolu Lu , Vinod Koul , Dave Jiang , dmaengine@vger.kernel.org, linux-kernel , Alistair Popple , Joerg Roedel , Will Deacon , Robin Murphy , Lorenzo Stoakes , Christoph Hellwig , iommu@lists.linux.dev Subject: Re: [PATCH v2 08/16] iommu: define and export iommu_access_remote_vm() Message-ID: References: <20230306163138.587484-1-fenghua.yu@intel.com> <20230306163138.587484-9-fenghua.yu@intel.com> <932aebd3-c655-3266-1acb-e41e8cbfb771@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <932aebd3-c655-3266-1acb-e41e8cbfb771@intel.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 07, 2023 at 09:55:28AM -0800, Fenghua Yu wrote: > > > > I don't quite follow here. Isn't I/O page fault already supported? > > The following patch 9 in this series explains in details why IDXD device > cannot use page fault to write to user memory: https://lore.kernel.org/dmaengine/20230306163138.587484-10-fenghua.yu@intel.com/ > > "DSA supports page fault handling through PRS. However, the DMA engine > that's processing the descriptor is blocked until the PRS response is > received. Other workqueues sharing the engine are also blocked. > Page fault handing by the driver with PRS disabled can be used to > mitigate the stalling. > > With PRS disabled while ATS remain enabled, DSA handles page faults on > a completion record by reporting an event in the event log. In this > instance, the descriptor is completed and the event log contains the > completion record address and the contents of the completion record." This seems like a completely broken I/O model, and I don't think Linux should support this model when it requires operations like access_remote_vm.