Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4436212rdh; Wed, 29 Nov 2023 01:09:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IFhkU5+xPtCQ6nbvMYrUg0bz+EYcJBqbfS1VOsU9r+bpTRQqH+gXDa9JQ8o40G8YhRwAOL7 X-Received: by 2002:a17:902:ee55:b0:1cf:bd01:1c9c with SMTP id 21-20020a170902ee5500b001cfbd011c9cmr15821512plo.4.1701248985544; Wed, 29 Nov 2023 01:09:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701248985; cv=none; d=google.com; s=arc-20160816; b=wv2t+CGd2ZjepWVWvyJnopSA66MlIVx9GukscAZhLBkZwGw+ZCU1MrWgxfaxUrmc7V qyTk67d3zXhpGHzNsQENyuRk6zXJlb8LDE3Imen+QWsCXH8oFPxos+SG8huPSSSHD8Aw oO5DbcBoytHywmd0krmCUCXbAcscbK64fdRHYK0fhhbdy4kznqZWLvXfxEX/YzZ/ykkC BY5DaHKeA8J7ztVdKG8rMEoIkc1IP/ypoiYk/LWEawQ+OlALPN+fqlGKbeAzZEKkBOCz t/oLrgN7/SPAFO6W1TsmizmrvrPQFaIEwQCzeNln8A4t+sIdwLhrz+STniZz/WvFLYLe 77Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=ms6jG4EogBncNKUbtnlOC8HriAh6+72+XRG4JQrCAPM=; fh=ipk8T5B3jpdLpHBY7MRg9Fn+Vsh+s+b9CO9qvTUenwc=; b=PrNIGhtD8LkwAUtBJufP0attSNavpdjyIxKr2zxs3OTMoVdlsnTReSECpUTdm7Y42p nTGTH1hL0HqUsPVS0DIiQ+hmA8fnMHkTpe6iafM7g9kfCRkXqKIecyFuTMTAD9QdEGTn 8IddFuagVQsRy++9C2b/V5H83N+ge5mwKM3aHEwB8RNpsafSOESY3eZyHJE9fPJUj3RZ q+qZjOu69vsXUa05eT6JRwNNrnTJw/DjMtLa5rxws6b4pG/jtZOG6Fq4xoQ5K8pUefjM 1Iq7Nx+h3uBy2Mn7tYWoYP+CdYIWTTwVJaxvRlA8TAxWagikECehkcPo8GRTcoRZ6gZ3 S/UA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id c10-20020a170903234a00b001d00a866032si2251270plh.223.2023.11.29.01.09.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 01:09:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 5708F809025D; Wed, 29 Nov 2023 01:09:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232731AbjK2JJZ convert rfc822-to-8bit (ORCPT + 99 others); Wed, 29 Nov 2023 04:09:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232622AbjK2JJX (ORCPT ); Wed, 29 Nov 2023 04:09:23 -0500 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 776E519B1; Wed, 29 Nov 2023 01:09:28 -0800 (PST) Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4SgD5t3LfDz6HJkv; Wed, 29 Nov 2023 17:09:06 +0800 (CST) Received: from lhrpeml100002.china.huawei.com (unknown [7.191.160.241]) by mail.maildlp.com (Postfix) with ESMTPS id 93A30140EE7; Wed, 29 Nov 2023 17:08:25 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (7.191.163.240) by lhrpeml100002.china.huawei.com (7.191.160.241) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 29 Nov 2023 09:08:21 +0000 Received: from lhrpeml500005.china.huawei.com ([7.191.163.240]) by lhrpeml500005.china.huawei.com ([7.191.163.240]) with mapi id 15.01.2507.035; Wed, 29 Nov 2023 09:08:21 +0000 From: Shameerali Kolothum Thodi To: Lu Baolu , Jason Gunthorpe , "Kevin Tian" , Joerg Roedel , Will Deacon , Robin Murphy , Jean-Philippe Brucker , Nicolin Chen , Yi Liu , Jacob Pan CC: "iommu@lists.linux.dev" , "linux-kselftest@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v2 0/6] IOMMUFD: Deliver IO page faults to user space Thread-Topic: [PATCH v2 0/6] IOMMUFD: Deliver IO page faults to user space Thread-Index: AQHaB7eiyREckpQTNkq/zZ6Gqko1E7CRNsbw Date: Wed, 29 Nov 2023 09:08:21 +0000 Message-ID: <55ed1ac0f2024c429b396cb751773d62@huawei.com> References: <20231026024930.382898-1-baolu.lu@linux.intel.com> In-Reply-To: <20231026024930.382898-1-baolu.lu@linux.intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.227.178] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 29 Nov 2023 01:09:42 -0800 (PST) > -----Original Message----- > From: Lu Baolu [mailto:baolu.lu@linux.intel.com] > Sent: 26 October 2023 03:49 > To: Jason Gunthorpe ; Kevin Tian ; > Joerg Roedel ; Will Deacon ; Robin > Murphy ; Jean-Philippe Brucker > ; Nicolin Chen ; Yi Liu > ; Jacob Pan > Cc: iommu@lists.linux.dev; linux-kselftest@vger.kernel.org; > virtualization@lists.linux-foundation.org; linux-kernel@vger.kernel.org; Lu > Baolu > Subject: [PATCH v2 0/6] IOMMUFD: Deliver IO page faults to user space > > Hi folks, > > This series implements the functionality of delivering IO page faults to > user space through the IOMMUFD framework for nested translation. Nested > translation is a hardware feature that supports two-stage translation > tables for IOMMU. The second-stage translation table is managed by the > host VMM, while the first-stage translation table is owned by user > space. This allows user space to control the IOMMU mappings for its > devices. > > When an IO page fault occurs on the first-stage translation table, the > IOMMU hardware can deliver the page fault to user space through the > IOMMUFD framework. User space can then handle the page fault and > respond > to the device top-down through the IOMMUFD. This allows user space to > implement its own IO page fault handling policies. > > User space indicates its capability of handling IO page faults by > setting the IOMMU_HWPT_ALLOC_IOPF_CAPABLE flag when allocating a > hardware page table (HWPT). IOMMUFD will then set up its infrastructure > for page fault delivery. On a successful return of HWPT allocation, the > user can retrieve and respond to page faults by reading and writing to > the file descriptor (FD) returned in out_fault_fd. > > The iommu selftest framework has been updated to test the IO page fault > delivery and response functionality. > > This series is based on the latest implementation of nested translation > under discussion [1] and the page fault handling framework refactoring in > the IOMMU core [2]. > > The series and related patches are available on GitHub: [3] > > [1] > https://lore.kernel.org/linux-iommu/20230921075138.124099-1-yi.l.liu@int > el.com/ > [2] > https://lore.kernel.org/linux-iommu/20230928042734.16134-1-baolu.lu@li > nux.intel.com/ > [3] > https://github.com/LuBaolu/intel-iommu/commits/iommufd-io-pgfault-deliv > ery-v2 Hi Baolu, Do you have a corresponding Qemu git to share? I could give it a spin on our ARM platform. Please let me know. Thanks, Shameer